如何强制 Eclipse 要求默认工作区?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7058782/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 20:25:45  来源:igfitidea点击:

How to force Eclipse to ask for default workspace?

eclipseeclipse-cdtworkspace

提问by michael nesterenko

I noticed that after installing cdt, Eclipse always loads the default workspace. The workspace listed in the config.iniin osgi.instance.area.default. Eclipse does not ask which workspace to open regardless if Prompt for workspace on startupis set or not.

我注意到安装 cdt 后,Eclipse 总是加载默认工作区。中列出的工作区config.iniosgi.instance.area.default。无论是否Prompt for workspace on startup设置,Eclipse 都不会询问要打开哪个工作区。

How do I force Eclipse to ask which workspace to load on startup?

如何强制 Eclipse 询问在启动时加载哪个工作区?

回答by fasseg

I had the same problem with indigo on linux 3.0 X86_64: After runnning eclipse -cleaneverything went back to normal.

我在 linux 3.0 X86_64 上使用 indigo 遇到了同样的问题:运行后eclipse -clean一切都恢复正常。

Thanks to some comment on the eclipse issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=134412

感谢对 eclipse 问题的一些评论:https: //bugs.eclipse.org/bugs/show_bug.cgi?id=134412

回答by Andreas

It works for me if I tick the box 'Prompt for workspace on startup', which you find in Window > Preferences > General > Startup and Shutdown > Workspaces.

如果我勾选“启动时提示工作区”框,它对我有用,您可以在“窗口”>“首选项”>“常规”>“启动和关闭”>“工作区”中找到它。

HTH

HTH

回答by Robert Taylor

Inside the configuration/.settings folder of your Eclipse installation, there is a file called org.eclipse.ui.ide.prefs. Open this file in a text editor and change the property SHOW_WORKSPACE_SELECTION_DIALOGfrom false to true.

在 Eclipse 安装的 configuration/.settings 文件夹中,有一个名为org.eclipse.ui.ide.prefs. 在文本编辑器中打开此文件并将属性SHOW_WORKSPACE_SELECTION_DIALOG从 false更改为 true。

Tested with Eclipse 3.7 on Windows.

在 Windows 上使用 Eclipse 3.7 进行测试。

回答by Michael Szczepaniak

I use Eclipse Indigo, and this is how I do it:

我使用 Eclipse Indigo,这就是我的做法:

Window > Preferences > Startup and Shutdown > Workspaces

窗口 > 首选项 > 启动和关闭 > 工作区

check box at the top of the window: "Prompt for workspace on startup"

窗口顶部的复选框:“启动时提示输入工作区”

回答by sacrilege

Version: Ecliplse CIndigo Service Release 2

版本:Ecliplse CIndigo Service Release 2

  1. File > Switch Workspace > Other...
  2. In the textbox, write the path in the Workspace or Browse
  1. 文件 > 切换工作区 > 其他...
  2. 在文本框中,在工作区或浏览中写入路径

It automatically sets the default Workspace during exit. To change Workspace go back to step 1.

它会在退出时自动设置默认工作区。要更改工作区,请返回步骤 1。

回答by Yongju

The “Prompt for workspace at startup” checkbox did not working. You can setting default workspace, Look for the folder named “configuration” in the Eclipse installation directory, and open up the “config.ini” file. You'll edit the "osgi.instance.area.default" to supply your desired default workspace.

“启动时提示工作区”复选框不起作用。可以设置默认工作空间,在Eclipse安装目录中找到名为“configuration”的文件夹,打开“config.ini”文件。您将编辑“osgi.instance.area.default”以提供所需的默认工作区。

回答by ashah

I followed the thread and tired all things but didn't work. Finally I saw that my eclipse shortcut target is like below

我跟着线程,累了所有的东西,但没有工作。最后我看到我的eclipse快捷方式目标如下

C:\Eclipse_3.6\eclipse\eclipse.exe -clean -data "C:\workplace" ...

I simply removed -data option and it worked. Now I got popup to choose workspace at startup.

我只是删除了 -data 选项并且它起作用了。现在我在启动时弹出选择工作区。

cheers.

干杯。

回答by 11101101b

I had the same issue (in Eclipse Juno), but I just wanted to change the default workspace to the one I'm using. There is a setting in:

我遇到了同样的问题(在 Eclipse Juno 中),但我只想将默认工作区更改为我正在使用的工作区。有一个设置:

ECLIPSE_DIRECTORY/configuration/config.ini

ECLIPSE_DIRECTORY/configuration/config.ini

that is causing a specific workspace to be loaded without prompting for a workspace. If you just want to change the default workspace, you can just modify the value or add it if it doesn't exist:

这会导致在不提示输入工作空间的情况下加载特定工作空间。如果您只想更改默认工作区,则可以修改该值或在它不存在时添加它:

[email protected]/some_workspace

[email protected]/some_workspace

or

或者

osgi.instance.area.default=/some/absolute/path/some_workspace

osgi.instance.area.default=/some/absolute/path/some_workspace

回答by AllBlackt

Starting eclipse with eclipse -clean did wonders for me.

使用 eclipse -clean 启动 eclipse 对我来说很神奇。

回答by Phil Hymanson

Aptana 3.2.2

Aptana 3.2.2

\configuration.settings\org.eclipse.ui.ide.prefs

\configuration.settings\org.eclipse.ui.ide.prefs

Edit:

编辑:

RECENT_WORKSPACES=I\:\PDT\workspace

It will check the recent workspace, so just set it to what you want, I do it for running off external drive.

它将检查最近的工作区,因此只需将其设置为您想要的,我这样做是为了运行外部驱动器。