先来看下我设置后的颜色对比
图中有些地方看着好像有点不一样,是因为eclipse设置了字体加粗,所以看着有点区别。
废话不多说,开始设置
1、java代码颜色设置
eclipse - preferences-java-editor-syntax coloring
然后可以看到三块:java、javadoc、comments
- java:设置代码的各个部分颜色
- javadoc:设置外部注释颜色。
- comments:设置内部注释颜色,比如/**等等等*/ //等等
-
先来看看java部分:
选择java:
然后对立面的部分一个一个设置:RGB颜色
Annotation element reference : 0、0、0;
Annotations : 186 、 44 、 162
Brackets: 0、0、0
Classes: 112 、60 、169 Bold
Deprecated menbers: 0、0、0 Bold
Enums:170、13 、145
Fields:128 、0 、128
Inherited field: 63 、110 、116
Interfaces: 0、0、0 Bold
Keyword'return':170、13、145 Bold
Keyword excluding 'return':186、44、162 Bold
Local variables :0、0、0
Method declarations:0、0、0
Methods : 112、62、169
numbers:42、0、255
Operators:0、0、0
Others:78、123、0
Static fields112、60、169
Static final fields : 0、0、192
Static method invocations : 78、129、135
Strings:209、68、48
- Javadoc设置
HTML markup:0、0、0
links:10、131、0
Others:10、131、0
Tags:10、131、0
- Comments设置:
Muti-line comment:10、131、0
Single-line comment:10、131、0
Task tags:10、131、0 Bold
设置完点击apply
2、背景色设置:
eclipse - preferences-General-editor-TextEditors
选择Background color:208、240、215
点击apply就ok啦
3、设置代码的字体大小
eclipse - preferences-General-Appearance-Colors and Fonts-Basic
选中Text Font 点击右边的Edit设置字体大小14
点击apply就ok啦

4、主题下载和设置
顺便提一下,我这边的主题样式选则是theme:light、Color and Font theme :Default
当然你也可以下载主题、和颜色
如图,里面有几个就是我下载的
具体下载方法:
help --> Eclipse Marketplace
打开Marketplace;
搜索中输入theme回车搜索点击installed,next,到最后finish,这个过程要下载主题,下载完了会弹提示框让你选中是否重启eclipse,点击重启就行了,我这里就不截图了。
重启后继续到eclipse - preferences-General-Appearance看看,就有你刚才下载的主题了,选中主题,点击apply就更换主题了
5、设置导出与导入
颜色设置是可以导出保存的,等下次重新安装的时候,只需导入替换就可完成上面的设置
File - Export
在弹出的对话框中选择 Preference项目,然后点击Next。
选择好存储路径点击finish就ok啦。
导入,选择import,在弹出的对话框中选择 Preference项目,然后点击Next。找到之前存储的设置文件,点击finish就ok啦
点击finish就ok啦。