Monday, 21 March 2016

Eclipse IDE Shortcuts


Ctrl+Shift+L : Gives a quick reference of Eclipse Hotkeys (at least in Galileo JEE)

Editing
Ctrl+Z : Undo (Eclipse can undo a lot (such as undelete files) and has a very long undo buffer for its text editors)
Ctrl+D : Deletes the selected line(s).
Alt+Up / Down arrow : Move current line/selection up or down
Alt+Shift+Up arrow : Previous method.
Alt+Shift+Down arrow : Next method.
Ctrl+ . : To go directly to the next warning or error in your current source file
Ctrl+H : Search & Replace
Ctrl+L : Go to line number
Ctrl+Shift+X : To upper case
Ctrl+Shift+ Y : To lower case

Ctrl+Shift+O : Organise imports (removes unused imports, adds missing imports, sorts imports)
Ctrl+Shift+M : Add Import, if showing error of um-imported package.

Ctrl+/ or Ctrl+7 : Comment-Uncomment selected lines
Ctrl+Shift+/ :  Apply multiple line comments on selected text
Alt+Shift+J : Add Javadoc comments
Ctrl+Shift+F : format code

Alt+Shift+R : Rename selected name
Ctrl+1 : Suggestions and quick fixes.
Alt+Shift+S, then R : Generate getters and setters.
Ctrl+I : Automatic indentation.
Alt+Shift+C : Change method signature
Alt+Shift+L : Extract to local variable
Alt+Shift+M : Extract to method
Alt+Shift+R : Rename

Ctrl+space : Autocomplete. Completes everything.
Class Name+Ctrl+ space : Adds default constructor
Type "syso"+Ctrl+Space : Creates System.out.println();

Ctrl+o : Typing once will only give you the current class's outline. Hitting it a second type will give you all the inherited stuff.
Ctrl+T : Type hierarchy (once will give you supertypes, twice should give you interfaces as well)
F4 : Shows the hierarchy.
Ctrl+F3 : Show class methods and variables, Hit this hot key twice to see inherited members and methods


Navigation
Ctrl+Shift+T : Find Java classes in your projects (Also finds Java classes that do not have their own files such as classes in jar files)
Ctrl+Shift+R : Find all resources in your projects (Jump to a file)
Alt+Left : Step backwards through editing history
Alt+Right : Step forwards through editing history

Ctrl+E : Open Editor and you can select any open file
Ctrl+F4 : Close one source window.
Ctrl+PgUp / PgDn : Changes focus to previous/next editor respectively.
Ctrl+Shift+F4 : Close all opened editors
Ctrl+Shift+F4 : Close all source windows

Ctrl+F6 : Switch editors (switch between opened files)
Ctrl+F7 : Switch Views
Ctrl+F8 : Switch perspectives
CTRL+M : Maximize Page

Ctrl+q : Go to last edited place.
Ctrl+ Click on class names : Jump to that class
F3 : Open definition - jumps to the definition of the class, method, variable, even if it is in remote places (such as classes in the JDK itself)

Ctrl+3 : Quick Access (provides access to almost any view, perspective, menu item, simply by typing it.)
Alt+Shift+Q : Shows all views to switch.
Alt+Shift+W : Shows currently opened views to switch.
Ctrl+Shift+E : Switch to each open editor.
Ctrl+E : Shows an editor selection mini window.


Execution
Ctrl+F11 : Run again
F11 : Run again in debug mode
Alt+Shift+D : Invokes debug as box
Alt+Shift+X : Invokes Run as

No comments:

Post a Comment

Note: only a member of this blog may post a comment.