Eclipse has a lot of keyboard shortcuts and I know hardly any of them. But my students still think I’m an ace. These are the ones I do use on a regular basis, shared so that my students can be aces:
importstatements to classes that live in faraway packages with
Command-Shift-O. That’s the letter
O, not the number
Command-Shift-F. You don’t need to have the code highlighted for this to work. However, this will only work when there are no egregious syntax errors.
Command-A. Then hit
Command-/. To apply this to multiple lines, select them first.
Command-Rfor this purpose by visiting the Eclipse preferences, navigating to General / Keys, searching for and selecting the Run command, and typing the new shortcut in the Binding textbox.