您的位置:首页 > 编程语言 > Java开发

Eclipse / Spring Tool Suite 配置

2016-04-10 12:12 691 查看
001. 安装 project lombok.jar
download_url: https://projectlombok.org/download.html
002. eclipse.ini / sts.ini
增加或者修改

-vm
D:/Program Files/Java/jre7/bin
-vmargs
-Dosgi.requiredJavaVersion=1.6
-DtolerateIllegalAmbiguousVarargsInvocation=true
-Xmx1024M
-Xms1024M
-Xmn384M
-XX:PermSize=256M
-XX:MaxPermSize=1024M
-javaagent:lombok.jar
-Xbootclasspath/a:lombok.jar 

003. 插件-svn
Eclipse update site URL: http://subclipse.tigris.org/update_1.10.x Zipped downloads: http://subclipse.tigris.org/servlets/ProjectDocumentList?folderID=2240 Archived releases: http://subclipse.tigris.org/archive  site-1.10.10.zip

004. 插件-反编译01 (反编译插件二选一即可, 个人推荐01)
JadClipse for Eclipse 4.0 4.0.0  http://feeling.sourceforge.net/update(失效)
org.sf.feeling.decompiler_1.0.2.zip  单独下载zip安装

设置没有源码的class文件使用反编译查看
Window --> Preferences --> General --> Editos --> File Associations --> *.class without source 默认使用类反编译器查看
Window --> Preferences --> Java 类反编译器 --> 默认使用 JD-Core

005.插件-反编译02
net.sf.jadclipse_3.3.0.jar https://sourceforge.net/projects/jadclipse/ jad.exe                    http://varaneckas.com/jad/
放到IDE plugins目录下
启动Eclipse/STS后需要指定jad.exe路径和反编译文件缓存路径

006. 修改Eclipse/STS General 主题(看喜好设置) 等
Window --> Preferences --> General --> Appearance --> theme选择Classic 或者Windows Classic
Window --> Preferences --> General --> Appearance --> Colors and Fonts --> Basic --> 设置字体为 Courier New / Consolas 
Window --> Preferences --> General --> 勾选 Show heap status 显示eclipse/sts内存使用情况
Window --> Preferences --> General --> Search 去掉勾选 Reuse editos to show matches

Window --> Preferences --> General --> Startup and Shutdown
去掉勾选 Refresh workspace on startup 和 Confirm exit when Closing last window 
去掉勾选不需要的启动插件()

007. 编码设置
Window --> Preferences --> General --> Workspace --> Text File encoding 设置为 UTF-8
Window --> Preferences --> General --> Content Types --> 修改Text项的Default encoding 为 UTF-8,然后点击后面的update
注意里面还有java properties files 和JSP需要单独设置下(他们默认的是ISO-8859-1)

008. Editors
Window --> Preferences --> General --> Editos 
| 勾选 insert spaces for tabs
| 勾选 Show line numbers
| 修改 Selection foreground color       (×)
| 修改 Background color (85, 165, 225)  (×)
Window --> Preferences --> General --> Editos --> Text Editors --> Spelling --> 去掉勾选 Enable spell checking

009. 插件更新
Window --> Preferences --> Install/Update --> Automatic Updates --> 去掉勾选 Automatically find new updates and notify me

010. Java 相关设置 Window --> Preferences --> Java
|--> 类反编译器 --> 默认使用JD-Core
|--> Code Style --> Clean up --> --> codestyle --> 勾选 Use blocks in if/while/for/do statements 代码块加花括号
|--> Code Style --> Formatter --> Indentation --> 使用 Spaces Only , Size 设置为4; Line Wrapping 换行 设置多少字符换行
|--> Code Style --> Code Templates --> Types 和Methods 设置如下
/**
* @author ${user}
* @date ${currentDate:date('yyyy-MM-dd')}
* ${tags}
*/
|--> Compiler 设置编译版本(1.8, 1.7 等等, 看自己JDK设置)
|--> Editor --> Content Assist --> 设置Auto Activation triggers for Java : 把.和26个字母全部输入后, 可以在写java代码时候输入什么字符都会自动提示
|--> Editor --> Save Actions 可以勾选保存的时候进行格式化处理等
|--> Install JREs 指定JRE路径, 可以指定VM参数, 类似eclips.ini的设置

011. Maven设置 Window --> Preferences --> Maven
|--> Installations 指定MAVEN_HOME
|--> User Setting 指定个人maven的.setting.xml文件
setting.xml 中建议加上 如下内容(profiles标签下), 可以在eclipse/sts新建maven项目时匹配对应的jdk版本,避免默认使用J2SE-5,出错
<profile>     
<id>jdk-1.8</id>       
<activation>       
<activeByDefault>true</activeByDefault>       
<jdk>1.8</jdk>       
</activation>       
<properties>       
<maven.compiler.source>1.8</maven.compiler.source>       
<maven.compiler.target>1.8</maven.compiler.target>       
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>       
 </properties>       
</profile>

012. Server 配置 

    Window --> Preferences --> Server --> Runtime Environments --> 添加
a86f
自己的Server配置

013. Validation校验

    Window --> Preferences --> Validation --> 去掉所有的校验

014. Window --> Preferences --> Web
|--> CSS Files --> Editor --> 设置line with; Indent using spaces, size 设置为4,和java保持一致
|--> HTML Files --> Editor --> 设置line with; Indent using spaces, size 设置为4,和java保持一致
|--> JSP Files --> encoding 设置为UTF-8

015. Window --> Preferences --> XML
|-->XML Files --> Editor --> 设置line with; Indent using spaces, size 设置为4,和java保持一致

016. 设置tomcat内存配置
-Xmx768M -Xss512k -XX:MaxPermSize=512M

017.ExtJs编辑插件
spket
ext-5.1.0.jsb2 for ExtJs-5.1.0

018. 安装主题插件
help --> Eclipse Marketplace --> 搜索 Eclipse Color Theme 然后安装,重启Eclipse

在Window --> Preferences --> General --> Appearance --> Color Theme 选择自己喜欢的编辑器主题
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息