標籤:eclipse java android
1、格式化:Ctrl+shift+F
a) 設定格式化風格:
i. 開啟Windows->preferences-》java-》code style-》formatter,按需求編輯格式或建立格式
ii.
2、成員排序:source -》sort Members
3、整理匯入:source-》organize import
4、代碼重構:
a) 開啟refactor->Rename
b) 移動 refactor->move
c) 匿名類改為外部類:Convert Anonymous Class to Nested
d)
查看代碼
5、查看顯示結構:Ctrl+T
6、查看代碼回退:Alt+←
7、查看代碼前進:Alt+→
8、查看方法調用:選中這個方法名,按Ctrl+Alt+H
9、快速定位類:Ctrl+shift+T
10、快速定位選中詞:Ctrl+K
11、快速定位匹配符:Ctrl+shift+P
12、增量尋找:
a) 正向:Ctrl+J
b) 反向:Ctrl+shift+J
13、快速跳轉行號:Ctrl+L
14、快速比較:設定Windows-》preferences-》editors-》text editors-》quit diff,選中“show differences in overview ruler”
15、開啟書籤:Windows-》show view ->other->尋找Bookmarks
16、開啟:Windows-》show view ->tasks
17、條件斷點:
a) 設定斷點,右擊選中“breakpoint properties”,
b) 設定“Hit count”或“Conditional”,“Hit count”表示經過這個斷點幾次後,斷點生效,“Conditional”表示這個條件成立時,斷點生效。
的Hit count表示經過斷點5次後斷點生效,conditional表示只有i等於5時,斷點才生效。
18、異常斷點:
eclipse提示3——最佳化調試代碼