eclipse怎么设置经典代码样式?

对代码展示样式进行配置

一、进入相应设备窗口

1、打开eclipse,进入菜单栏‘窗口’下的首选项设置,英文是‘preferences’

2、进入首选项后,进入如图,相应位置。

eclipse怎么设置经典代码样式?

3、进入后,在右侧会出现‘Syntax coloring’相应设置窗口,如图,在Java下拉菜单中依次点击进行相关设置。

eclipse怎么设置经典代码样式?

二、对相关属性进行配置

1、首先对Annotations’注释,进行如图配置,并点确定。 

eclipse怎么设置经典代码样式?

2、对‘Brackets’符号,进行如图配置,并点确定。

eclipse怎么设置经典代码样式?

3、对‘Classes’类名及‘Deprecated members’弃用的成员,进行如图配置,并点确定。

eclipse怎么设置经典代码样式?

eclipse怎么设置经典代码样式?

4、对‘Enums’枚举及‘Fields’变量,进行如图配置,并点确定。

eclipse怎么设置经典代码样式?

eclipse怎么设置经典代码样式?

5、对‘ Keyword 'return'’return关键字及‘Keyword excluding 'return' ’其他关键字,进行如图配置,并点确定。

eclipse怎么设置经典代码样式?

eclipse怎么设置经典代码样式?

6、对‘ Method declarations’方法定义及‘Methods ’方法,进行如图配置,并点确定。

eclipse怎么设置经典代码样式?

eclipse怎么设置经典代码样式?

7、对‘ Others’其他及‘Operators’运算符,进行如图配置,并点确定。

eclipse怎么设置经典代码样式?

eclipse怎么设置经典代码样式?

8、对‘ Static fields’静态变量及‘Strings’字符串,进行如图配置,并点确定。

eclipse怎么设置经典代码样式?

eclipse怎么设置经典代码样式?

9、然后如图,点击应用并确认。

eclipse怎么设置经典代码样式?

注意事项:

本次设置只针对.java格式文件代码进行配置,如其他格式可相应配置。