Eclipse 在哪里存储有关要启动的工作区的信息?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12385413/
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-19 18:57:51  来源:igfitidea点击:

Where does Eclipse store the info about which workspace to start up with?

eclipse

提问by Borek Bernard

When I launch Eclipse it starts with one of the workspaces I created and selected "don't ask again" (standardly, Eclipse asks about which workspace to start with during the startup).

当我启动 Eclipse 时,它​​从我创建并选择“不再询问”的工作区之一开始(通常,Eclipse 会询问在启动期间从哪个工作区开始)。

So it must store somewhere which workspace to use. Where does it store this piece of information?

因此它必须存储要使用的工作空间的某个地方。它在哪里存储这条信息?

采纳答案by Bart Friederichs

In

$HOME/.eclipse/org.eclipse.platform_3.7.0_155965261/configuration/.settings

$HOME/.eclipse/org.eclipse.platform_3.7.0_155965261/configuration/.settings

there is a file

有一个文件

org.eclipse.ui.ide.prefs

org.eclipse.ui.ide.prefs

where it is stored.

它的存储位置。

回答by Guillaume Poussel

With Eclipse Juno, I can see this information in: eclipse\configuration\.settingsfile.

使用 Eclipse Juno,我可以在:eclipse\configuration\.settings文件中看到此信息 。

I guess you are looking for RECENT_WORKSPACESand SHOW_WORKSPACE_SELECTION_DIALOGvars.

我猜你正在寻找RECENT_WORKSPACESSHOW_WORKSPACE_SELECTION_DIALOGvars。

回答by J Steven Perry

The settings have changed since this question was posted, as newer versions of Eclipse have been released.

自从发布此问题以来,设置已更改,因为已发布了较新版本的 Eclipse。

With Eclipse Luna, navigate to $ECLIPSE_HOME/eclipse/configuration/.settingsand the file org.eclipse.ui.ide.prefscontains settings like this (Windows file configuration shown):

使用 Eclipse Luna,导航到$ECLIPSE_HOME/eclipse/configuration/.settings该文件org.eclipse.ui.ide.prefs包含这样的设置(显示了Windows 文件配置):

MAX_RECENT_WORKSPACES=5
RECENT_WORKSPACES=C\:\src\eclipse-workspaces\luna\MyApp\nC\:\src\eclipse-workspaces\luna\MyOtherApp
RECENT_WORKSPACES_PROTOCOL=3
SHOW_WORKSPACE_SELECTION_DIALOG=true
eclipse.preferences.version=1

Each entry in RECENT_WORKSPACESappears to be delimited by \nwith no spaces. Whenever I manually shuffle my workspaces around (which is rare, but it happens), I've had great success hand-editing this file, saving it, and having the new paths show up just fine in the Workspace Lancher/Select a Workspace dialog.

中的每个条目RECENT_WORKSPACES似乎都由\n没有空格分隔。每当我手动调整我的工作区时(这种情况很少见,但确实发生过),我在手动编辑这个文件、保存它并让新路径在 Workspace Lancher/Select a Workspace 对话框中显示得很好时取得了巨大的成功.

回答by yodamad

You have eclipse configuration files in "eclipse_home"/configuration and the one you may looking for is in settings directory : org.eclipse.ui.ide.prefs

您在“eclipse_home”/configuration 中有 Eclipse 配置文件,您可能要查找的文件位于 settings 目录中:org.eclipse.ui.ide.prefs

回答by Cédric K.

If Eclipse has been installed with ubuntu-make, the file location is ~/.local/share/umake/ide/eclipse-jee/configuration/.settings/org.eclipse.ui.ide.prefs.

如果 Eclipse 已与ubuntu-make一起安装,则文件位置为~/.local/share/umake/ide/eclipse-jee/configuration/.settings/org.eclipse.ui.ide.prefs.