恢复到 Eclipse 默认设置
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4118632/
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
Revert to Eclipse default settings
提问by Michael
I know there is the option in Eclipse to 'restore defaults'.
我知道 Eclipse 中有“恢复默认值”的选项。
The problem is I had imported a .epf to change my editors font/colors.
问题是我导入了一个 .epf 来更改我的编辑器字体/颜色。
I'm not a big fan of the changes and would like to go back. I've tried deleting the eclipse folder and downloading a fresh copy, but the styles persist.
我不是这些变化的忠实粉丝,我想回去。我试过删除 eclipse 文件夹并下载一个新的副本,但样式仍然存在。
I assume there is a config file somewhere that I could possibly delete.
我假设某处有一个我可以删除的配置文件。
Anyway, if you could help me out here I would appreciate it. I've looked for solutions but they all seem to point to the same answer that doesn't work for me.
无论如何,如果你能在这里帮助我,我将不胜感激。我一直在寻找解决方案,但它们似乎都指向了对我不起作用的相同答案。
回答by Rikus Khan
You can reset to the default color scheme in the Window>Preferences options page. This example will be for resetting a theme used for Java.
您可以在“窗口”>“首选项”选项页面中重置为默认配色方案。此示例将用于重置用于 Java 的主题。
Navigate to Windows>Preferences>Java>Editor. Click on Syntax Coloring. Click "Restore Defaults" and "Apply". Then, navigate to General>Editors. Click on Text Editors. Click on "Restore Defaults" and "Apply".
导航到Windows>Preferences>Java>Editor。单击语法着色。单击“恢复默认值”和“应用”。然后,导航到General>Editors。单击文本编辑器。单击“恢复默认值”和“应用”。
I had the same issue and the above steps cleared up my problem. Also, the Show line numberscheck box is on the last page from above.
我遇到了同样的问题,上述步骤解决了我的问题。此外,显示行号复选框位于上方的最后一页。
回答by James O'Rourke
I followed the instructions of Ronan on this one and worked well.
我按照 Ronan 的指示进行了此操作,并且效果很好。
rm -r $WORKSPACE_DIR/.metadata/.plugins/org.eclipse.core.runtime/.settings/
Relaunch eclipse.
重新启动日食。
I had installed the an eclipse preference for colours.
我已经安装了对颜色的日食偏好。
One would think eclipse could make it simpler to remove preferences than this manual process.
有人会认为 eclipse 可以使删除首选项比这个手动过程更简单。
回答by Ronan Walsh
I encountered this problem also, I went with the second answer, however, I only removed /.metadata/.plugins/org.eclipse.core.runtime/.settings - this way I was able to preserve my workspace settings (source code etc)
我也遇到了这个问题,我选择了第二个答案,但是,我只删除了 /.metadata/.plugins/org.eclipse.core.runtime/.settings - 这样我就可以保留我的工作区设置(源代码等) )
Going forward I would recommend downloading the Eclipise Color Theme Plugin from http://www.eclipsecolorthemes.org/- This allows you to switch between a range of color themes easily, and easily switch back to 'Default'
展望未来,我建议从http://www.eclipsecolorthemes.org/下载 Eclipise 颜色主题插件- 这使您可以轻松地在一系列颜色主题之间切换,并轻松切换回“默认”
回答by Trung
It is simple.
很简单。
First, you open eclipse but with workspace different with workspace you have working. then, you choose File/ Export/ --> General/ Preferences--> choose to folder which you want to pick the file *.epf
首先,您打开 Eclipse,但工作空间与您工作的工作空间不同。然后,您选择File/ Export/ --> General/ Preferences--> 选择要选择文件 *.epf 的文件夹
Second, you open eclipse with workspace you want to work. Then choose File/ Import/ --> General/ Preferences--> choose to folder which you had picked the file *.epf and OK
其次,使用要工作的工作区打开 eclipse。然后选择File/ Import/ --> General/ Preferences--> 选择您选择文件 *.epf 的文件夹,然后确定
Have fun!
玩得开心!
回答by egemen.evin
"Restore Defaults" is not working.
“恢复默认值”不起作用。
You must remove the all file in the /.../workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/ directory.
您必须删除 /.../workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/ 目录中的所有文件。
回答by Romain Linsolas
The settings of plugins, including the core ones, are saved in the [workspace_dir]/.metadata/.plugins
directories ([workspace_dir]
refers to the workspace directory you use).
插件的设置,包括核心的,都保存在[workspace_dir]/.metadata/.plugins
目录中([workspace_dir]
指你使用的工作空间目录)。
So if you remove the [workspace_dir]/.metadata
, you will reset allthe properties defined (which will include all the properties, not only the font ones). Another idea is to create and use a new workspace. Be careful, as your code source may be located in your [workspace_dir]/
directory.
因此,如果删除[workspace_dir]/.metadata
,您将重置所有定义的属性(包括所有属性,而不仅仅是字体属性)。另一个想法是创建和使用新的工作区。请小心,因为您的代码源可能位于您的[workspace_dir]/
目录中。
But why don't you just use Use System Font
button in the Eclipse Properties dialog?
但是为什么不直接Use System Font
在 Eclipse 属性对话框中使用按钮呢?
回答by Chris
I had the same problem. My path back to default was as follows:
我有同样的问题。我恢复默认的路径如下:
- Install Eclipse Color ThemesPlugin (http://www.eclipsecolorthemes.org/)
- Navigate to Window->Preferences
- Navigate to General->Appearance->Color Themes
- Click Restore Defaults, then click Apply
- 安装Eclipse 颜色主题插件 (http://www.eclipsecolorthemes.org/)
- 导航到窗口->首选项
- 导航到常规->外观->颜色主题
- 单击恢复默认值,然后单击应用
That should take care of it.
那应该照顾它。
回答by Noris
I went to My workspace
我去了我的工作区
directory/.metadata/.plugins/org.eclipse.core.runtime/.settings/
目录/.metadata/.plugins/org.eclipse.core.runtime/.settings/
and then deleted all recently added files !!
然后删除所有最近添加的文件!
回答by fijau
To me the first answer by Rikus Khanwas almost what I needed. It wasn't enough to go to ,e.g. General > Editors > Text editorsand click Restore Defaults. I had to choose every single subcategory, namely: Accessibility, Annotations, Hyperlinking, etc., and manually restore their defaults as well. Apparently restoring defaults doesn't propagate down the tree.
对我来说,Rikus Khan的第一个答案几乎就是我所需要的。仅转到 ,例如General > Editors > Text editors并单击Restore Defaults是不够的。我必须选择每个子类别,即:Accessibility、Annotations、Hyperlinking等,并手动恢复它们的默认值。显然,恢复默认值不会沿树向下传播。
The problem I had was the underscoring of warnings and errors in Java editor changed to highliting (after importing RainbowDrops.epf, recommended by the MoonRise UI Theme) and didn't want to revert when changing syntax coloring and other related options. This option itself is located in the aforementioned Annotations > Errorsand Warnings.
我遇到的问题是 Java 编辑器中警告和错误的下划线更改为高亮显示(在导入RainbowDrops.epf 之后,由MoonRiseUI 主题推荐)并且在更改语法着色和其他相关选项时不想还原。此选项本身位于上述Annotations > Errorsand Warnings 中。
回答by mzzzzb
Deleting everything under your workspace's .metadata\.plugins\org.eclipse.core.runtime\.settings
will restore to defaults but you will lose every other setting too. You can selectively undo changes made by importing RainbowDrops.epf
删除工作区下的所有内容.metadata\.plugins\org.eclipse.core.runtime\.settings
将恢复为默认值,但您也会丢失所有其他设置。您可以有选择地撤消通过导入 RainbowDrops.epf 所做的更改
Open RanbowDrops.epf
. Mine looks like this
打开RanbowDrops.epf
。我的看起来像这样
file_export_version=3.0
/instance/ccw.core/ccw.preferences.editor_color.FUNCTION=167,236,33
/instance/ccw.core/ccw.preferences.editor_color.FUNCTION.bold=false
...
/instance/com.adobe.flexide.as.core/asASDocItalic=true
/instance/com.adobe.flexide.as.core/asASDocColor=#626262
...
/instance/com.android.ide.eclipse.ddms/logcat.msg.color.assert=205,22,137
/instance/com.android.ide.eclipse.ddms/logcat.msg.color.debug=123,182,234
...
/instance/com.powerflasher.fdt.ui/AS_CONSTANTS_color=152,118,170
/instance/com.powerflasher.fdt.ui/AS_CORE_color=18,144,195
the lines starting with /instance/ccw.core
will go into file ccw.core.prefs
. Lines instance/com.adobe.flexide.as.core
will go into com.adobe.flexide.as.core.prefs
and so on. You need to delete those files only. There are quite a lot of them though (i had to delete 53), easy way to sift them is to find the first one and sort by modification time they will group together.
开头的/instance/ccw.core
行将进入 file ccw.core.prefs
。线 instance/com.adobe.flexide.as.core
将进入com.adobe.flexide.as.core.prefs
等等。您只需要删除这些文件。虽然有很多(我不得不删除 53 个),筛选它们的简单方法是找到第一个并按修改时间排序它们将组合在一起。
BTW there is nice dark theme available by default in eclipse 4.7 (2017). You can try and switch color themes without this kind of hassle by installing Eclipse Color Themes plugin, it also has good selection of dark color themes too.
顺便说一句,eclipse 4.7(2017)默认提供了不错的深色主题。您可以通过安装 Eclipse Color Themes 插件来尝试切换颜色主题而没有这种麻烦,它也有很好的深色主题选择。