Eclipse Shortcut Key Description

Source: Internet
Author: User
Tags sorts
Eclipse Shortcut Key Description




The first part of the common shortcut key description

The use of Eclipse. Eclipse has many shortcuts and useful features, and the use of shortcuts can improve the speed of development to some extent. The description is as follows:
Frequently used shortcuts (not in Eclipse menu order)

A:ctrl+k down to find the selected string
B:ctrl+shift+k look up the selected string
C:ctrl+shift+↑↓ look up a function and a variable
D: Double click "{" or "}" to find the corresponding "}" and "{"
The mouse position must be in the right position of "{" or "}"
e:ctrl+shift+ P (IBID.) to find the corresponding "}" and "{"
F:ctrl+shift+m the mouse over the wrong variable or class to import the unknown import
The right key menu also has the source->add import the same function
G:F2 View the full function help information, and you can copy and paste the text
F3 find the definition of the variable,
F4 Find the concrete implementation class of the interface method.

H:ctrl +/Note selected code snippet, plus "//" (Useful for large segment code temporary annotations)
I:ctrl +/to remove the annotation is to remove the "//" before the selected code

J:alt +/help
k:alt+→ switch to the next view or operation that goes forward.
L:alt +← Switch to the next view or operation of the back
M: Press CTRL and point to the definition of the variable you are looking for. You can look for variables and F3 the same function.
N:ctrl +→← moves the cursor in the complete Word unit.
O:ctrl + Shift +→← Select the text backward with the full word.
P:ctrl + Q Locate the last edited place, this regardless of which page you are currently opening. Find the last edited page and locate it.

Part Two menu and some shortcut key descriptions

The following menu details the less frequently used shortcuts and some of the less-common but important features

Edit menu (Editing action Processing)

Ctrl+j the key, that is, go down to the quick Find state, directly click the string you want to find. Eclipse will directly locate the consecutive characters you enter as you press the key. When you find it, press ↑↓ to find the next or previous character you want to find. Press the left or RIGHT arrow keys or ESC You can launch a quick Find status.
Ctrl + SHIFT + J key, then go to the up fast lookup state, other ibid
Ctrl + 1 quick fixes. The variable at error, the key prompts you how to fix the error. and provides several options for you to choose from, such as creating a variable to create an error, and creating a class.
CTRL + SHIFT +/which is CTRL +? This feature only works when calling a function, place the cursor in the function's parameter input, press the previous shortcut key, the function's parameter definition appears above the mouse, easy to see the parameter type.
Alt+shift+↑↓→← is a shortcut for quick selection of text. The mouse is the character that can be used to select variable characters directly with the shortcut key, and the entire complete statement, paragraph ... Wait
Up ARROW: The scope of the expanded selection of the structure
DOWN ARROW: Structured narrowing the range of choices
Left ARROW: expanding upwards
Right ARROW: Scaling down



Sources menu (source code processing)
Ctrl + Shift + O sorts the packages in import and automatically sorts by name. Rule of
Surround with Try/catch Select a valid code, click this menu, you can produce a try block code, the same function can also click the Code edit box to the left of the error indicator column in the error point. Then select Try/catch from the pop-up menu
Externalize Strings This feature provides fast processing for internationalized applications. Puts all (allowed) strings into a resource file and defines a class that reads a resource file. and modified the string-reading method of Java code.
Refactor (source code processing)

Change methods Signature Changing method signatures place the mouse on the method you want to change Select this menu, click. Changing the parameters of the method in the pop-up dialog box determines that the system automatically adjusts all calls to this method according to the new parameters of the method, and the parameters are modified.
Pull down to put methods in the parent class into subclasses.
Pull up puts the methods in the subclass into the parent class. It's very convenient.
Extract Interface Export A Java file that allows public methods (allow selection) to automatically generate interfaces from a class
Inline (Alt + SHIFT + I) is actually equivalent to a macro substitution. This variable will be used, and the method, where all the constants are replaced by the direct use of the content, can be previewed first.
Extract Local Variable
Extract Constant
Extract method
Variable, create a new variable, and replace all the specified variables. Other similar extract functions
The Convert local Variable to Field defines a locally defined variable as the class variable immediately above it. and can be set. It's very convenient. Be sure to try yo. First define a local variable and assign a value, the mouse can be placed above, click on the menu options. There is also a menu in the right key. I tried. Very good. It is especially useful when we define error messages.
Encapsulate Field encapsulates data as a function format, and the mouse is placed on a variable. Click this menu to always generate a read method and modify the way the variable is referenced

The Navigate menu (which is clearly described in the menu, described below)
Show in > Package Explorer Package Locate the package where the current class resides and open the package
Navigator locates the path where the current class resides and opens the
Ctrl+alt+h Open Call hierarchy.
Place the mouse over the method. Click on this menu. All locations where this method is called are found. Tie it down.
. (The right menu also has this feature)
Ctrl + O Show Outline opens the Outline window. Instead of the window on the right, it is used to quickly locate functions. Note that when using embedded outline, the methods inside are arranged in the actual order, while pop-up windows are arranged in the order of the method and variable names.
Ctrl +. Locate the next problematic place.
Ctrl +, locate the problem area
Ctrl + L Quickly locate a line that requires a line number.
CTR + Q Positioning the last edited place
Search Menu

Ctrl + H find powerful. Cross-file queries.
Ctrl + SHIFT + U is a common feature. (Find only in this current file)
Select the characters you want to search for. Press the key combination. The following list lists all the rows that appear with this string. Do not search a single one. Use the white logo to display the right identity locator bar.

The third section improves the performance configuration of Eclipse. And some common configuration instructions
1, because Eclipse uses the default configuration for memory usage. If your machine memory allows, the virtual machine is free of memory.
Window->preferences->java->installed jres-> right->JDK. ->edit->default JVM arguments:-> changed to –xms200m–xmx200m
2, close the unused works.
3, if you hate the automatic pop-up of Help code, it also affects efficiency. You can change to manual control instead.
Window->preferences->java->editor->code Assist-> Enable auto activation do not check
Part IV Template description for automatically creating code
Window->preferences->java->editor->templates under
After automatic code generation, the editor is in the template state. The template state differs from the normal editing state.
Template state to edit automatically generated variables, the relevant Code section will follow the correct changes. For example, for (int i=0;i<=100;i++) {} To change the name of the variable i.
The back I will also follow the change. Press ESC to exit the template state.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.