Latest web development tutorials

Eclipse Shortcuts

About Shortcuts

Many operations are provided in the Eclipse shortcut functions, we can very well be able to control various functions through Eclipse Keyboard:

  • Use the shortcut keys associated with the menu or menu item
  • Use keyboard shortcut associated dialog window or view or editor
  • Use the shortcut keys associated with toolbar function button
shortcuts_menu

Eclipse shortcut list to open the Ctrl + Shift + L shortcut key.

shortcuts_keys

Settings Shortcuts

Shortcuts Eclipse system is sometimes more difficult to remember, or simply did not provide shortcut keys, you need to manually set up shortcuts.

We can click window-> preferences-> general-> keys (or direct search keys), enter the shortcut key management interface:

shortcut1

Here you can find all the features of the shortcut keys, you need to modify or add, click the need to modify or add commands, set the shortcut keys in the binding: shortcut2

After you set up shortcuts, you need to set at what time you can use this shortcut, eclipse offers a variety of scenarios to choose from, usually selected In Windows (ie eclipse active window) can be.

shortcut3

Done, click on the OK button to complete the setting.


Eclipse commonly used shortcuts

hot key description
edit
Ctrl + 1 Quick Fix (the most classic shortcuts, needless to say, we can solve a lot of problems, such as import category, try catch surround etc.)
Ctrl + Shift + F Formatting the current code
Ctrl + Shift + M Add class import import
Ctrl + Shift + O import Import Organization category (both Ctrl + Shift + M effect, and can help you to remove import useless, very useful)
Ctrl + Y Redo (Ctrl + Z Undo and vice versa)
Alt + / Content Assist (how many times can help you save keystrokes, too common)
Ctrl + D Delete current line or multiple lines
Alt + ↓ The current line and the following line interaction location (particularly useful, omitted the first cut, then paste)
Alt + ↑ The current line and the top line of interactive location (ibid.)
Ctrl + Alt + ↓ Copy the current line to the next line (Copy increase)
Ctrl + Alt + ↑ Copy the current line to the (increase in copy) on line
Shift + Enter In the next line of the current line insert a blank line (in this case the mouse can be either the current line position is not necessarily final)
Ctrl + / Note the current row, then cancel comment
select
Alt + Shift + ↑ Select enclosing element
Alt + Shift + ← Select an element
Alt + Shift + → Select the next element
Shift + ← From the beginning of the cursor to select the character to the left
Shift + → Start right from the cursor to select the character
Ctrl + Shift + ← Select a word left of the cursor
Ctrl + Shift + → Select the cursor and the edge of the word
mobile
Ctrl + ← Move the cursor to the left at the beginning of the word, the equivalent of vim b
Ctrl + → Move the cursor to the right end of the word, the equivalent of vim e
search for
Ctrl + K Referring to the selected Word quickly navigate to the next (if not selected word, the search for the last used search word)
Ctrl + Shift + K Referring to the selected Word quickly locate a
Ctrl + J Forward incremental find (press Ctrl + J after you enter each letter editor provides fast matching to locate a word, if not, the status bar displays not found, a search word, Special utility to exit this mode, press the escape build)
Ctrl + Shift + J Reverse incremental find (and on the same strip, just forward from the investigation)
Ctrl + Shift + U Lists all lines that contain the string
Ctrl + H Open the search dialog
Ctrl + G Workspace declaration
Ctrl + Shift + G Quote workspace
navigation
Ctrl + Shift + T Search class (including third jar package engineering and associated)
Ctrl + Shift + R Search project file
Ctrl + E Fast Show drop-down list of current Editer (if the current page does not display representation in bold)
F4 Open Type Hierarchy
F3 Jump to declare at
Alt + ← A former editor of the page
Alt + → Next edit page (of course, for the one above it)
Ctrl + PageUp / PageDown In the editor, switch open file
debugging
F5 Step into
F6 Step Over
F7 Step Return
F8 carry on
Ctrl + Shift + D The value of the variable display
Ctrl + Shift + B Line set or remove a breakpoint in the current
Ctrl + R Run to Line (super useful, you can save a lot of breakpoints)
Reconstruction (Reconstruction general shortcut is Alt + Shift in the beginning)
Alt + Shift + R Rename the name of the method, property, or variable name (my own favorite with a, especially variable and classes Rename, than the manual method can save a lot of labor force)
Alt + Shift + M The method of extracting a piece of code within the function (which is the reconstruction of one of the most commonly used method inside, especially useful for a lot of clay in the code)
Alt + Shift + C Modify the function structure (more practical, with N function calls this method, modify the one-stop)
Alt + Shift + L Extraction local variables (can put some magic numbers and strings drawn into a variable, especially when multiple calls)
Alt + Shift + F The Class field in the local variable into a variable (more useful features)
Alt + Shift + I The combined variable (may say something wrong Inline)
Alt + Shift + V Mobile functions and variables (not very common)
Alt + Shift + Z Reconstruction of regret (Undo)
other
Alt + Enter Displays the current resource property attribute selection, under the windows to view the file is the shortcut key is usually used to view a file in the windows of the actual path
Ctrl + ↑ On the rolling line text editor
Ctrl + ↓ Under the rolling line text editor
Ctrl + M Maximize current Edit or View (then vice versa)
Ctrl + O Fast display OutLine (Outline window does not open students, the shortcut keys are essential)
Ctrl + T Quickly display the current class inheritance structure
Ctrl + W Close the current Editer (under windows close the open dialog box is this, as well as qq, Want, browser, etc. are)
Ctrl + L Line text editor, go to
F2 Show tooltips description