views:

143

answers:

2

I have been using Eclipse for a long time, the feature that is less known but very useful is the Scrapbook Page, that allows you to execute sections of the Java code without having them to be complete classes. For example, if I need to execute this simple for-loop I can do this by creating a scrap page (File->New->Other->Scrapbook Page) and then typing the following and they pressing the "Execute the Selected Text" or Ctrl-U will execute the code directly

for (int i=0; i < 10; ++i)
{
    System.out.println("Here is the scrapbook page line: " + i);
}

Please post other less known but useful features that are available with eclipse. I know that there are entries in SO that mention the useful shortcuts available in eclipse, however this one is about forgotten or less known features

+4  A: 
VonC
This function is soo cool!
Mario Ortegón
A: 

I like the fact, that you don't necessarily need to create a new class by using New->Class, when having the class source somewhere in the clipboard. You can simply select the destination package and paste the clipboard content.

pimpf0r