1. 程式人生 > >eclipse自定義代碼塊折疊

eclipse自定義代碼塊折疊

defined 選擇 pre 技術分享 .com cnblogs star 5% 安裝

下載插件 com.cb.eclipse.folding_1.0.6.jar

  下載地址:http://files.cnblogs.com/haiq/代碼折疊插件_com.cb.eclipse.folding_1.0.6.rar

2、將插件放在Eclipse安裝目錄eclipse\plugins下面

3、重啟eclipse

4、啟動eclipse,點擊 Windows-Preferences-Java-Editor-Folding,在“Select folding to use:”處選擇“Coffee Bytes Java Folding”,點擊OK,再次重啟eclipse

技術分享

技術分享

5、再次啟動eclipse,回到以上位置,勾選“User Defined Regions”,點擊OK,重啟eclipse

技術分享

6、進入代碼模塊,自定義選中代碼,在開頭和結尾處控制需要折疊的代碼塊,如下所示:

//[start] userxxx
        your code; 
 //[end]

7、折疊後的效果

技術分享

eclipse自定義代碼塊折疊