Windows 环境配置
- HOME
- JAVA_HOME
- PATH
eclipse 插件配置
安装方式:Help -> Install New Software -> Add -> Archive,或者通过 Help -> Eclipse Marketplace 来安装
- 安装 Eclipse Color Theme 插件,配置编辑器样式
- StartExplorer,跨平台的 eclipse 快捷打开文件所在文件夹的插件
- Subversive - SVN Team Provider 插件
- EGit - Git Team Provider 插件,用于 git 管理
- Enide Studio 插件,Node.js,JavaScript 等开发插件
- UML Designer (Eclipse Kepler version) 3.0,UML 设计插件
eclipse 加速
- validation 中,关闭 build 下的所有校验(可以保留Classpath Dependency Validator),只开启 manual 手工校验
- Plug-in Development > Target Platform > plug-in 中关闭无关或暂且不用的 plug-in
- Preferences > General > Startup and Shutdown 取消无关或暂且不用的 plug-ins
- 将 Preferences 中的 Dashboard 调整为不随 eclipse 启动
编码配置
- Preferences > General > Workspace 中 Text file encoding 改为 UTF-8
- Preferences > General > Content Types 中更改 Text 下的 Java Properties File、Java Source File、Javascript Source File、JSP 为 UTF-8,其余 content types 的编码可以根据需要进行调整
字体设置
- Preferences > General > Appearance > Colors and Fonts 中 更改 Basic 下的 Text Font,建议字体:Consolas、Courier new、Inconsolata,脚本改为:中欧字符
快捷键设置
- Preferences > General > Keys 中 Content Assist 快捷键更改为 alt + /
标签装饰
- Preferences > General > Appearance > Label Decorations 设置各种标签装饰
Console 输出
- Preferences > Run/Debug > Console 设置 Console buffer size(characters) 为 800000
编辑区配置
- Preferences > General > Editors > Text Editors (或者在文件编辑区域左侧边,点击右键),勾选 Show Line Numbers 开启行号显示
拼写检查
- Preferences > General > Editors > Text Editors > Spelling 中取消勾选 Enable spell checking,关闭拼写检查
代码风格及代码模板
- Preferences > Java > Code Style > Formatter 中配置 Java 代码风格
- Preferences > Java > Code Style > Code Templates 中勾选 Automatically add comments for new methods and types 开启 comments
- Preferences > Java > Editor > Templates 中配置代码模板
- Preferences > XML > XML Files > Editors 中 Formatting 块中 Line width(行宽) 更改为合适的值,例如:100
常见警告解决办法
- git 工具未安装:安装 git http://git-scm.com/ 工具,按说明配置 System Settings;或者取消警告消息
1 | # 错误消息 |
- HOME 环境变量未设置:设置 HOME 环境变量;或者取消告警消息
1 | # 错误消息 |
- pom.xml 文件未设置 project.build.sourceEncoding 属性
1 | # 错误消息 |
1 | <!-- 解决办法:在 pom.xml 的 project 节点下增加如下内容 --> |