eclipse中,把java函數代碼折疊/展開 介紹

eclipse中,把java函數代碼折疊/展開 介紹

eclipse中,把java函數代碼折疊/展開 介紹

 

首先
在eclipse 中開啟設置代碼折疊功能

1. windows->perferences->General->Editors->Structured Text Editors
可以看到Enable folding選項,打上勾就可以使用代碼折疊功能,但還要在具體的語言中設置。

 

2、windows->perferences->Java->Editors->Folding

可以看到Enable folding選項,打上勾就可以使用代碼折疊功能。
其次
使用快捷鍵
下面你就可以用如下快捷鍵在你的java class 中 折疊或者展開你的代碼了.
代碼折疊的快捷鍵,默認是:
Ctrl+Shift+Numpad_Divede(小鍵盤的/號)
Ctrl+Shift+Numpad_Multiply(小鍵盤的*號)
筆記本沒小鍵盤,於是改成:
Ctrl+Shift+-
Ctrl+Shift+=

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *