作為一個(gè)java開(kāi)發(fā),哪種IDE更好,需要自己去嘗試下,自己喜歡哪種哪種對(duì)于自己就是最好的。
1. 下載地址:http://spring.io/tools/sts/legacy
本次選擇的是 spring-tool-suite-3.9.4.RELEASE-e4.7.3a-win32-x86_64.zip
2. 安裝SVN插件
https://dl.bintray.com/subclipse/releases/subclipse/4.2.x/
只需要安裝著一個(gè)插件,git和maven都安裝好了
3. 配置maven
preferences-》maven
4.配置jdk
preferences-》Java-》instainstalled jres
把默認(rèn)的jre換成JDK,否則啟動(dòng)maven項(xiàng)目會(huì)報(bào)錯(cuò)
并添加參數(shù) -Dmaven.multiModuleProjectDirectory=$M2_HOME
順便引入JDK原文件
5.修改字體背景等
字體:preferences-> general->appdearance->colors and fonts->basic->text font
選擇字體 Inconsolata 14 Bold
背景色:preferences-> general->editors->text editors ->backgroud color
把色調(diào)調(diào)成:85 飽和度調(diào)成:123 亮度調(diào)成205 即可調(diào)成豆沙綠色了 然后點(diǎn)確定確定
6.修改控制臺(tái)文件顏色
調(diào)出控制臺(tái),右鍵修改菜單,為深綠色
7.代碼提示修改
? Java-》editor-》content assist
觸發(fā)條件:.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
調(diào)整代碼提示順序及其他-點(diǎn)開(kāi)下一級(jí)advanced
把template proposals 和? Java proposals 放在最前面
8.關(guān)閉拼寫檢查
preferences-> general->editors->text editors ->spelling
9.文件默認(rèn)編碼設(shè)置
preferences-> general->workspace?
text file encoding? :UTF-8
new text file line delimiter unix (tab 變空格)
10.優(yōu)化啟動(dòng)速度
startup and shutdown -》全部關(guān)掉
11.關(guān)閉自動(dòng)更新
install/update 關(guān)閉
12.自動(dòng)類注釋
注釋模板:Java-》code style-》code templates
先勾線下面 自動(dòng)類和方法注釋 的復(fù)選框
編輯commonts-types:
/**
* @Description: ${todo}
* @author ${user}或直接寫名字
* @date ${date}? ${time}
* ${tags}
*/
@date 這一行可以改成:${currentDate:date('yyyy-MM-dd HH:mm')}
13.代碼格式化不換行
Java代碼 Preferences->Java->Code Style->Formatter->Edit ->Line Wrapping->Maximum line width:默認(rèn)120
Html代碼 Window->Preferences->Web-> Html Files->editor->Line width->默認(rèn)72
14.去除不用的菜單和按鈕
Windows-》Perspective-》customize?Perspective
15.git常用設(shè)置
error.log里會(huì)報(bào)一個(gè)HOME環(huán)境變量的警告,設(shè)置了一下不成功,不過(guò)不設(shè)置也沒(méi)問(wèn)題
還可以把警告的提示關(guān)了?Team > Git > Confirmations and Warnings
user.email:
user.name:
http.sslVerify : false
core.autocrlf : fasle(是否轉(zhuǎn)換換行符LF)
core.excludesFile : E:\git\gitignore(全局忽略文件)

參考:https://blog.csdn.net/u010297957/article/details/53222406
16.修改文件默認(rèn)打開(kāi)方式? ??
需要修改兩個(gè)地方
Perspective-》General 》Editors 》File Associations

17.忽略一些HTML文件中的報(bào)錯(cuò)

18.eclipse程序正確但是cannot be resolved to a type
大概是這樣的:機(jī)制所致。因?yàn)槟承┨厥庠颍琫clipse沒(méi)能自動(dòng)編譯源代碼到build/classes(或其他classes目錄),導(dǎo)致類型查找不到。
可能就是因?yàn)槭莵?lái)自另一個(gè)項(xiàng)目的原因?qū)е碌摹?/p>
以下是解決的方法:
Windows–>Preferences–>Java–>Compiler–>Building–>Output folder–>
?勾選 Rebuild class files modified by others
19.一直indexing jar types,0%
Preferences->Java->Editor->Content Assist->Advanced?
把Jar Type Search 去掉就好了