- Maximize a(n editor) window by double-clicking its tab. Same to restore it.
- 'Lost' a window and want it back ? Choose the 'Window' menu and 'Show view'.
- Here you can also add a Properties window, which often comes in handy, f.e. with files, to see their actual location, last time changed, etc.
- If you haven't got the import for a class yet, you can easily add it by clicking in the class name and pressing ctrl-shift-m.
- To rename a variable or method a.o. throughout your code, click in the name and press alt-shift-r.
- To add a main method, type main, ctrl-space.
- Want a default constructor ? Type the class name and ctrl-space.
- Make your own shorthand, like 'sop' for System.out.println() : Window, Preferences, Java, Editor, Templates. Lookup 'sysout', see how it's done and make your own abbreviation accordingly.
Now you can use it by typing the abbreviation in the source code, followed by ctrl-space.
- To quickly undo actions : ctrl-z.
- If you want to rename the source because you typed (or pasted) code with another class name, you can click the error marker in the left margin on the line with the classname and then double-click 'Rename compilation unit etc.'
- Close projects that are not in use : right-click the project name, 'Close Project'.
- Hide closed projects by clicking the Package Explorer's 'triangle' button, choose 'Filters', check 'Closed projects'.
- Format code by selecting code and pressing ctrl-shift-f. ctrl-a to select all code.
- Set formatting rules to your liking by choosing :
Window, Preferences, Java, Code Style, Formatter, Edit.
- By switching on the 'Toggle Mark Occurrences' button you can click, say, a
variable name in your source and that name will be highlighted throughout your
source. The right margin will show clickable icons indicating the positions in the
- Right next to the button mentioned there's the 'Show source of selected element
only', handy when you have a lengthy source and want to limit the view to just one
- By rightclicking a variable name you can choose 'Occurrences in file,Identifier'
and produce a double-clickable list of where and how the variable is used.
- You can drag the 'Outline' window by its tab to the bottom-left, below 'Package
explorer', thus giving your editor window more room. Pay close attention to when to
release the dragging mouse button, markers indicate where the window will end up.
- To see the actual folder/directory-structure, the .class files, in short, see the disk as it is, you can choose 'Window, Show View, Navigator' or 'Window, Open Perspective, Other, Resource'. Now you can easily switch between both views using the window tabs in case of the Navigator or the Perspective buttons at the top-right. This nicely combines with the Properties Window mentioned before.
If you've added 'implements SomeInterface' to a class, you can click the error marker in the left-margin on the line with the classname and doubleclik 'Add unimplemented methods' to get the interface's methods in your source.
- Try ctrl-space at different positions, f.i. following 'new ' .