文章目錄
- 1、Editor代碼格式配置
- 2、xml代碼格式配置
- 3、說明
- 4、Eclipse Text 格式設定
- 5、Eclipse 代碼提示彈不出
1、Editor代碼格式配置
點擊Eclipse功能表列Window—Preferences,開啟Preferences設定視窗:選擇左側Java選項—Code Style—Formatter,開啟右側Formatter Tab;
方法一:對已存在Active profile設定檔進行重編輯管理,click Edit/Remove。
方法二:New profile or Import external profile existed,Then edit the profile. We can also export our active profile.
Ps:一般類、方法聲明以及枚舉等,{ }都另起一行,在Braces/New Lines兩個Tab進行打勾選擇即可;
2、xml代碼格式配置
與Editor操作類似,點擊Eclipse功能表列Window—Preferences,開啟Preferences設定視窗:選擇左側XML選項—XML Files—Editor,開啟右側Editor Tab;
在Formatter area中,進行選擇配置。Line Width為代碼一行的寬度,具體選擇item片所示。
Ps:第一項Spilt multiple設定分行顯示,Indent using tabs設定定位字元為Tab格,Indent using spaces 4設定定位字元使用4個空格;
3、說明
不同的項目,規約不同,所以我們可以隨時根據需要,按照以上步驟進行配置My Profile。在實際工作中,會遇到和解決很多經典的問題、技術要點,這是我在csdn發表的第一篇文章
,希望廣大技術朋友多多支援,後續會堅持寫更多的技術文章。
4、Eclipse Text 格式設定
點擊Eclipse功能表列Window—Preferences,開啟Preferences設定視窗:選擇左側General選項—Editors—Text Editors,開啟右側Text Editors Tab;
Text Editors.
5、Eclipse 代碼提示彈不出
原因:快速鍵設定問題,系統預設下content assist(Ctrl+Space)和word completion(Alt + /).
解決方案 :點擊Eclipse功能表列Window—Preferences,開啟Preferences設定視窗:選擇左側General選項—Keys。對word completion(Alt + /)進行unband
command;content assist(Ctrl+Space)修改為Alt + /。
CodePromoteHelper