Quick Access (Control-3): This brings up a dialog box. Start typing, and it will present a selection list of windows whose title contains the text you just typed. Thus, if you type “expl”, it will present “Package Explorer”, “CVS Package Explorer”, “Project Explorer”, and so on. You can also type the names of the files that you have open, e.g. “foo” to get “Foo.java” as a selection option. (It does not take you to method names or classes, just window names.) Way cool. I think I’m never touching the mouse again. Ever.
Word Completion (Alt-/), aka “hippy completion”: When you are editingcode, you can type a few letters, then Alt-/, and Eclipse will fill in the rest of the word with a guess as to what you meant. For example, if I type “Fo”+Alt-/, it might present “FooFactory” first, then “FooTemplate”, then “ForeignFilmDatabase”, etc. When it reaches imagination failure, goes back to the first one. It is case-aware, so it would not present “for” or “format” or “foo”. It seems to be pretty clever about its guesses, too.
Aw, this notebook is better than mine!
The biggest time-saver I’ve stumbled upon in Eclipse is the Open ... to Open Type in Eclipse, while Open Resource in eclipse searches every file type. ... Awesome for opening Javascript files!
Moving around
- Ctrl+J — Incremental Search
- Ctrl+Shift+T — Search a type, with search on typing. You can use only the upcase letters (e.g. type “MIL” to find MouseInputListener)
- Ctrl+F6 — Switch between last used files
- F3 — Open declaration
- Ctrl+Alt+H — Open Call Hierarchy
Editing
- Ctrl+1 — Quick Fix: press while cursor is positioned at member variable, parameter, selection, warnings, errors, …
- Ctrl+Space — Context Assist: press after a ., or to use macros (for, while, sysout, …). Press in class-scope to automatically create method declarations.
- Ctrl+Shift+O — Organize Imports
- Ctrl+Shift+F — Reformat source
- Alt+Shift+T — Show Refactor Quick Menu
you can display a list of all the hotkeys in Eclipse using
Ctrl+Shift+L
.
alt-up and alt-down - grab the current line (or all selected lines) and move them up or down
ctrl-alt-up and ctrl-alt-down - duplicate the current line (or all selected lines) above or below
ctrl-2,
has some nice keystrokes available for the Source menu, like ctrl-2, L for create local variable.
Next occurrence : ctrl+k
back occurrence : ctrl+shift+k
|
|