Eclipse - Tips & Tricks
This
article is for those who use Eclipse.  Keyboards shortcuts are very
important for comfortable and quick editing.  Here are the list of
most important shortcuts in Eclipse :
For
a full list of shortcuts, you can also check by pressing
Ctrl+Shift+L.
- Ctrl +3 Focus into the Quick Access search box which allows you to execute any Eclipse command.
 - Ctrl+SHIFT+T Search dialog for Java Type, Start typing the name and the list gets smaller. Try typing the capital letters of the class only (e.g. type "NPE" to find "NullPointerException")
 - Ctrl+SHIFT+R Search dialog for resources, e.g. Xml files, text files, or files of any other type.
 - Ctrl+E Open Editor Drop down, Presents a popup window listing currently opened files.
 - Ctrl+O Quick Outline, Show all methods of the current class, Press Ctrl+O a second time to include inherited methods.
 - Ctrl+SHIFT+space Context Information
 - Ctrl+Shift+O Organize Imports, Adjusts the imports statements in the current Java source file
 - F3 Open Declaration ,Navigate to the declaration of the selected variable . This works much like a browser hyperlink.
 - Ctrl + hover to methods,variables Ask for Open Declaration, Implementation, Super Implementation or return types.
 - Alt+Left/Right Backward/Forward History, Works like a browser's back/forward button.
 - Ctrl + L Go to a specific line number.
 - F4 Open Type Hierarachy
 - Ctrl+Alt+H Open Call Hierarchy. Show where a method is called from.
 - Alt + SHIFT + R Use this to rename type, method, or field. All existing references will be refactored as well.
 - Alt+Shift+M Extract method, Use this to extract a new method from existing code. The parameter list and return type will be automatically created.
 - Ctrl+Shift+P Go to the matching bracket.
 - SHIFT+ENTER /Ctrl+SHIFT+ENTER Insert a line below or above the current line.
 - Ctrl + /, Ctrl+7, Ctrl +\ Add or Remove block comment.
 - Ctrl +F6 Switch among the editor.
 - Ctrl + F7 Switch among open views.
 - Ctrl + F8 Switch among perspectives.
 - Alt +/ It does the word completion based on the set of words already present in the current file.
 - Ctrl + I It correct the indention for block of Java code or an entire class.
 - Ctrl + . or Ctrl + , It will navigate to next or previous error.
 - Ctrl+F11, F11, Run or Debug the Application.
 - F5,F6, F7, F8 Step into function, Next Step (line by line) , Step out , Skip to next breakpoint.
 - Ctrl +1 Give quick fix code.
 - Ctrl + D Delete the current line.
 - Ctrl + SHIFT + G Search for current cursor positioned word reference in workspace.
 - Ctrl +Page Up/Page Down Switch to next editor / switch to previous editor
 - Alt + - Open Editor Window Option menu.
 - Ctrl +F10, then n It will show or hide the line numbers
 - Ctrl + q It will jump to last location edited
 - Ctrl + SHIFT + f It will format all code in Editor using code formatter.
 - Alt + SHIFT + J or /** and then press Enter Add javadoc Element Comment ( adds '/** ... */')
 - Alt + SHIFT + V Move selected element to other class or file (With complete method or class selected)
 - Ctrl + DEL Delete next element
 - Ctrl + BACKSPACE Delete previous element.Note : I have not added basic shortcut like Ctrl+S to save the file.Feel free to comment If you find something is incorrect or update me more :)
 
Very helpful stuff :)
ReplyDeleteVery handy
ReplyDelete