Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to collapse all code blocks in Eclipse?

Tags:

eclipse

ide

Eclipse has that "+/-" on the left to expand and collapse blocks of code.

I've got tens of thousands of lines to go through and would really like to just collapse everything, and selectively expand blocks to look at them.

like image 293
ambertch Avatar asked Nov 13 '09 01:11

ambertch


People also ask

How do I collapse all codes in Eclipse?

If you are using PyDev in Eclipse, its Ctrl 0 and Ctrl 9 for collapse all and uncollapse all respectively. Ctrl - and Ctrl = to collapse individual methods when your cursor is on the line of the method declaration.

How do you expand in Eclipse?

Update for Eclipse Mars on Windows 10 (using inside "Search View"): Numpad * - expands all in the selected folder, Numpad + - expands ONE level below the selected folder, Numpad - - collapses previous expanded folder (or if ALL was expanded then next underlying level along WITH the expanded folder down below) in the ...


1 Answers

There is a hotkey, mapped by default to Ctrl+Shift+NUM_KEYPAD_DIVIDE.

You can change it to something else via Window -> Preferences, search for "Keys", then for "Collapse All".

To open all code blocks the shortcut is Ctrl+Shift+NUM_KEYPAD_MULTIPLY.

In the Eclipse extension PyDev, close all code blocks is Ctrl + 9

To open all blocks, is Ctrl + 0

like image 57
ChssPly76 Avatar answered Oct 28 '22 01:10

ChssPly76