ITeye博客

eclipse 常用设置

fly533 · 2018-08-08 11:13 · 开发工具 · 非技术 · Markdown

写好代码需要个好的工具辅助,eclipse完整设置。让你事半功倍! 以下截图为eclipse-photon版本。

1、字体大小 详细步骤参考文章: https://www.cnblogs.com/xiezhidong/p/6048256.html

2、tab转空格 Windows->Preferences->General->Editors->Text Editors,选中“Insert spaces for tabs”。

另外需要针对java文件设置一次: window->preference-左侧菜单:Java -> Code Style -> Formatter, 然后点击Active profile中的Edit按钮, Tab policy 右边的下拉框,选择Space only 然后下面的Indentation size 和 Tab size 都设置成你要的空格数即可!一般是4个空格

3、自动换行字数 Preferences->Java->Code Style->Formatter->Edit ->Line Wrapping->Maximum line width:默认80 修改成120就行了。

4、默认utf-8 a、windows->Preferences->general->Workspace,右侧Text file encoding,选择Other,改变为UTF-8,以后新建立工程其属性对话框中的Text file encoding即为UTF-8。 b、windows->Preferences...打开"首选项"对话框,左侧导航树,导航到general->Content Types,右侧Context Types树,点开Text中每一个子项,并将其编码设置为"UTF-8",点update! 其他java应用开发相关的文件如:properties、XML等已经由Eclipse缺省指定,分别为ISO8859-1,UTF-8,如开发中确需改变编码格式则可以在此指定。

5 、maven设置 一般需要设置自己的setting.xml,在setting.xml中指定公司的私服、并设置repository的目录(默认是C盘当前用户目录下)

setting.xml文件下载http://dl.iteye.com/topics/download/e384f6d0-7f11-3669-af9b-11c8365d7353

6、jetty插件 一般web工程在eclipse中启动时,需要指定额外的tomcat来启动,比较繁琐。使用jetty插件启动更方便。不过现在更多的项目使用springboot搭建,这里就不详细说明安装及使用。 使用参考文章:https://www.cnblogs.com/Fairy-02-11/p/6186918.html

7、切换为unix下的换行符 Windows->Preferences->General->Workspace -> New text file line delimiter 选中Unix https://blog.csdn.net/ljgstudy/article/details/25542279

8、阿里java代码规范插件——强力推荐 插件地址: https://p3c.alibaba.com/plugin/eclipse/update https://blog.csdn.net/qq_34359363/article/details/78284187

9、指定jdk启动(部分高版本eclipse不支持低版本jdk) 打开eclipse安装目录下的eclipse.ini 添加参数: -vm C:\Program Files\Java\jdk1.7.0_80\bin

11、js、html插件 aptana-3 ? Spket ?

12、js debug ?

13、 svn忽略target 文件夹 *.settings .classpath .project等文件 在eclipse中,Windows -> Preferences -> Team -> Ignored Resources里点 “Add Pattern”。 添加:target *.settings .classpath .project ,然后再"运用"-->"确定",重新编译代码即可

14、注释模板 https://blog.csdn.net/KunGe_/article/details/78215580?locationNum=9&fps=1 注释模板下载http://dl.iteye.com/topics/download/8a2d9c74-0e46-3d62-ab7c-5c7befabb00d

15 、适当的代码提示设置 https://jingyan.baidu.com/article/5553fa82a40d9865a3393469.html

16、视情况安装svn插件 建议通过eclipse marketplace

17、 安装STS 用于spring boot开发

载自我的印象笔记https://www.evernote.com/shard/s170/sh/e3c36682-794d-488f-b851-6775c3b72aac/e5ecda56f2db221d ,可看到最新的改动。

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。