Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse plugin to roll up if and for?

I'm at university, and we were taught to use notepad to programme java to start with. I moved onto notepad++ and quickly onto eclipse. In notepad++, i could roll up (plus minus sign) if statements or for loop as well as methods and classes. I wondered if there is a plugin for eclipse that allows me to do the same?

Also, are there any essential plugins i should be using with eclipse? I'm rather new to programming.

Thanks in advance

Ben

like image 893
Relequestual Avatar asked Apr 18 '09 19:04

Relequestual


People also ask

Are Eclipse plugins free?

Steps 2 Eclipse Plug-inDownload for Free. Available in English and French.

What are Eclipse plugins?

The Eclipse platform which provides the foundation for the Eclipse IDE is composed of plug-ins and is designed to be extensible using additional plug-ins. Several hundreds of plug-ins are available. Each plug-in adds more functionality to Eclipse.


2 Answers

In Eclipse you can use Shift+Alt+ to mark the surrounding block to the current block
(and Shift+Alt+ to narrow down again).

Then will place you at the beginning of the block, and at the end.

(Untested, from memory, but VERY handy).

like image 196
Thorbjørn Ravn Andersen Avatar answered Sep 17 '22 21:09

Thorbjørn Ravn Andersen


The eclipse Coffee-Bytes Code Folding Plug-in (which is mentioned by htw) is no longer available.

Starting with release 3.0, Eclipse allows folding in its text editor, and that include code folding for classes, comments, imports, but not for if or loop structures.

alt text
(source: ibm.com)

A simple double click at the beginning or end of a block ({) is enough to highlight the all block.

like image 36
VonC Avatar answered Sep 17 '22 21:09

VonC