posted by 네코냥이 2014. 7. 17. 16:32

I used this way to get code folding in Netbeans:

// <editor-fold defaultstate="collapsed" desc=" description">
....
// </editor-fold>

and Visual Studio:

#region description
...
#endregion

but I can't find the same usage in eclipse. How can i use code folding in Eclispe?

share|edit|flag
  
 
@Ajeet: This question was 2 years ago past. But, pls read my question and question in link you had provided carefully. They are different questions. –  PhatHV Mar 28 at 5:23
add comment

Eclipse supports code folding.

Go to workbench preferences -> General -> Editors -> Structured Text Editors, and check the "Enable folding" box.

Then go to workbench preferences -> Java -> Editor -> Folding, and adjust your folding preferences.

share|edit|flag
1
 
But, I still can't use code folding for a block of code (codes not in comment out block and parentheses block). –  PhatHV Nov 23 '12 at 1:25
6
 
As far as I know, such fine-level folding isn't available with Eclipse, at least not with Eclipse Juno (which is the version that I am using). A quick search in Eclipse's BugZilla database shows many feature requests related to folding with the Java editor, some of them date years back. –  Isaac Nov 23 '12 at 1:34
  
 
Thanks Isaac. Your answer helped me so much. –  PhatHV Nov 23 '12 at 2:42
add comment


'JAVA' 카테고리의 다른 글

이클립스 - Blacket 정렬 옵션  (0) 2015.04.02
[이클립스] 코드(폰트크기) 줌인 확대 축소  (2) 2014.07.02
[이클립스] 단축키 설정  (0) 2014.07.02