Wednesday, 26 November 2008

Java and Eclipse Shortcuts

Eclipse

Cntrl-Shift-T find Type

Cntrl-L Goto line
Cntrl-B Build

F3 jump to definition

Alt-Enter - File properties (file path, size, file encoding)

Set up different workspaces for "test projects" versus "real projects".

Configuring Eclipse to reference Existing Code

1. Set up a new workspace (different from the source location)
2. use the existing location for the code
3. create projects for specific parts of the code you want to change

Select "autoconfigure JRE and project layout based on source".

Switching Tabs in Eclipse

Control-Tab in Windows applications is replaced by ALT-LEFT and ALT-RIGHT, and Control-F6. Since control-tab is used so frequently it is easy to forget this Eclipse peculiarity.

To override this shortcut, do Windows->Preferences->General->Keys. Then replace "Change Next Editor" from Control-F6 to Control-tab. Sanity at last.

Cntrl-E is another useful way to bring up "Editor List" that allows explicit window switching.

Java

javap -c Disassemble a class file

No comments: