`
feelar
  • 浏览: 5204 次
  • 性别: Icon_minigender_1
  • 来自: 北京
最近访客 更多访客>>
社区版块
存档分类
最新评论

eclipse配置

 
阅读更多
1.tab由空格代替
window -> preferences -> java -> code style -> formatter -> show.. -> Indentation -> general setti-> tab policy -> space only -> 3

2.80列线
window -> preferences -> Editors -> Text Editors -> show main margin

3.对import的处理
(1)如果import了某个包下面的至少2个类, 那么使用*
window -> preferences -> java -> code style -> organize import -> number of imports needed for *

(2)自动排序
ctrl + shift + o
可以将自动排序加到save action里面,在保存文件的时候自动完成这个工作
window -> preferences -> java -> editor -> save actions -> organize imports

(3)自动添加import
ctrl + shift + m

4.删除行尾空格
(1)配置clean up,然后执行source -> clean up
preferences -> java -> code style -> clean up -> code organize -> formatter -> remove trailing whitespace

(2)将删除行尾空格配置在save actions里面,save文件的时候自动完成
preferences -> java -> editor -> save actions -> additional actions -> configure -> code organizing -> formatter -> remove trailing whitespace
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics