Eclipse shortcut keys

Source: Internet
Author: User

How do you comment in the XML file?
CTRL + SHIFT + C in XML
Formatting in XML
CTRL + A in Ctrl + I


Elipse off breadcrumb There's a small icon in the navigation toolbar (my sister's wasting my time)

And Nivigator shows the class bytecode file under the Bin folder (there's a file filter option on the right side of nivagator for horizontal or vertical layout)


Delete cursor to end of line or beginning of Shift+home shift+end in Eclipse


Ctrl+j merges multiple rows into one row, backspace the last comma,
Find Class Ctrl + Shilt + T

Ctrl+q positioning to the last edited place

Shift+t adding Try/catch

Shift+home +end Select the entire row,

Alt+shift+j
The mouse clicks the blank place, uses the Alt+shift+j shortcut key to produce the author's name.
Mouse click on the method name, use the Alt+shift+j shortcut key to generate the comment of the method. Slightly modified, easy to write comments.
Comments like this can be easily generated by Eclipse's API documentation, which is helpful for others to understand your project.

The console console of Eclipse is turned off automatically
Originated from http://www.kankanews.com/ICkengine/archives/45112.shtml
Console preferences, Run/debug, Windows
In the right panel, remove the "show when program Writest" and "show when programs writes to standard error" Two multi-box, respectively, meaning, when the application is in the normal output to jump out of C Onsole and when the program has errors thrown out of the console.


Shortcut keys that you define
CTRL +R Executing code
BreadCrumb (ALT+SHIFT+B) is better than quick outline (ctrl+o)
Shift+space Code Hints
Alt+shift+s generating a Get Set method
CTRL +1 Build Try/catch


Save Ctrl+s (definitely know) s
Comment Code ctrl+/
Uncomment ctrl+\ (Eclipse3 already merged into ctrl+/)
Code-assisted alt+/
Quick Fix ctrl+1
Code Formatting Ctrl+shift+f
Organize import Ctrl+shift+o
Switch window ctrl+f6< can be changed to ctrl+tab convenient >
Ctrl+shift+m Importing unreferenced packages
Ctrl+w Closing a single Window
F3 jump to the declaration of a class, variable
F11 running the last program
Ctrl + F11 Debugging the last program
Alt + back to next edit point
Ctrl+shift+t finding classes in a project


The most classic shortcut keys

Ctrl+1 Quick Fix (the most classic shortcuts, you don't have to say more)

Ctrl+d: Delete When moving forward

Ctrl+alt+↓ Copy the current row to the next row (replication incremented)

Ctrl+alt+↑ Copy the current line to the previous row (replication incremented)

Alt+↓ the current line and the next line of interaction (especially useful, can be omitted first cut, then pasted)

Alt+↑ the current line and the upper row interaction position (IBID.)

alt+← the previous edited page

alt+→ next Edit page (of course, for the above article)

Alt+enter displays the properties of the currently selected resource (project, or file or file)

Shift+enter inserts a blank row on the next line of the current row (at which point the mouse can be at any position in the current row, not necessarily the last)

Shift+ctrl+enter Insert blank line in current line (principle above)

Ctrl+l positioning in a row (for people with programs over 100 have the gospel)

Ctrl+m maximize the current edit or view (and vice versa)

ctrl+/comment on the current line, and then uncomment it

Ctrl+o Quick Display OutLine

Ctrl+t quickly displays the inheritance structure of the current class

Ctrl+w Closing the current editer

Ctrl+k the selected word quickly navigates to the next

Ctrl+e quick display of the current Editer drop-down list (in bold if the current page does not appear)

ctrl+/(numpad) collapses all code in the current class

Ctrl+x (keypad) expands all code in the current class

Ctrl+space Code Helper to complete the insertion of some code (but the general and IME conflict, you can modify the input method hotkey, you can also take up alt+/to replace)

Ctrl+shift+e Display manager that manages all of the currently open view (you can choose to close, activate, and so on)

Ctrl+j forward Incremental lookup (after pressing CTRL+J, each letter editor you enter provides a quick match to navigate to a word, if not, it is not found in the Stutes line, check a word, especially useful, this function idea two years ago)

CTRL+SHIFT+J Reverse incremental lookup (same as above, except forward)

Ctrl+shift+f4 Close all open editer

Ctrl+shift+x turns the currently selected text to lowercase

Ctrl+shift+y turns the currently selected text to lowercase

Ctrl+shift+f formatting of the current code

Ctrl+shift+p position to the match (for example {}) (after locating from the front, the cursor is in the match, back to front, or vice versa)

The following shortcut keys are commonly used in refactoring, I like and commonly used to tidy up (note: General refactoring of the shortcut keys are alt+shift beginning of the)

Alt+shift+r rename (is my own favorite, especially the variables and classes of rename, than the manual method can save a lot of labor)

Alt+shift+m Extraction Method (This is one of the most common methods of refactoring, especially useful for a whole bunch of mud codes)

Alt+shift+c Modify the function structure (more practical, there are n functions called this method, modified once done)

Alt+shift+l extract Local variables (you can directly extract some magical numbers and strings into a variable, especially when multiple calls are made)

Alt+shift+f change the local variable in class to a field variable (more useful function)

Alt+shift+i Merge variables (this may be a bit inappropriate inline)

ALT+SHIFT+V moving functions and variables (not commonly used)

Alt+shift+z reconstruction of Regret medicine (Undo)

ALT + LEFT ARROW, RIGHT arrow to toggle tab in edit window
ALT + up and down arrows to automatically select the row of your mouse and move it up and down
Ctrl+f6 can pop up the menu, which lists the editing windows that can be toggled so that you can switch without the mouse
CTRL+F7 can switch between views, such as Edit view, output view, drawing view
Ctrl+f8 can be toggled in different viewing views, that is, switching between Java view, debug view, etc.
Ctrl+m can toggle between maximizing the current window and restoring the current window
Ctrl+e Popup Input window, you can enter the code window you want to edit, and ctrl+f6 the same function, but one is the choice of the way, one is the way of input, switch window
Ctrl+t can directly display the class diagram of the contents of the cursor, can be entered directly, and jump to the input content section
Hold down the CTRL key, then point to the variable name, the method name, and the class name to jump quickly in the source code
Ctrl + F11 Quick Execute program
CTRL+SHIFT+F Program code automatic typesetting
Ctrl+shift+o automatically joins the reference. Description: Suppose we did not import any category when we scored in the program: Resourceattirbute RA =new resourceattribute (); Eclipse will prompt that there is no reference to the category, when we just press Ctrl+shift+o, it will automatically help us import this category. Very convenient
ctrl+/notes the selected block: It is convenient to debug.
Alt +/Is the most common code you should use to help
Ctrl+h Search, open the Search dialog box
The Ctrl+shift+space parameter hints that if you are in the method body at this point, the parameter hint of the method appears, and the parameters of the current cursor position are shown in bold

scope function Shortcut keys
Global Find and replace Ctrl+f
Text Editor Find previous Ctrl+shift+k
Text Editor Find Next Ctrl+k
Global Undo Ctrl + Z
Global Replication Ctrl + C
Global Restore Previous selection alt+shift+↓
Global clipping Ctrl+x
Global Quick Fix ctrl1+1
Global Content Assist alt+/
Global all check Ctrl + A
Delete delete globally
Global context information ALT +?
Alt+shift+?
Ctrl+shift+space
Java Editor display tooltip description F2
Java Editor Select encapsulated element alt+shift+↑
The Java editor selects the previous element alt+shift+←
The Java editor selects the next element alt+shift+→
Text Editor incremental find Ctrl+j
Text Editor incremental reverse lookup ctrl+shift+j
Global Paste Ctrl + V
Global Redo Ctrl+y


View
scope function Shortcut keys
Global magnification ctrl+=
Global Shrink ctrl+-


Window
scope function Shortcut keys
Global activation Editor F12
Global Switch Editor Ctrl+shift+w
Global on an editor Ctrl+shift+f6
Globally on a view CTRL+SHIFT+F7
Global on a Perspective view Ctrl+shift+f8
Global Next editor Ctrl+f6
Global Next View Ctrl+f7
Global Next Perspective Ctrl+f8
The text editor displays the ruler context menu Ctrl+w
Global Display View menu CTRL+F10
Global Display System Menu alt+-


Navigation
scope function Shortcut keys
Java Editor Open Structure ctrl+f3
Global Open Type Ctrl+shift+t
Global Open type Hierarchy F4
Global Open claims F3
Global Open External Javadoc shift+f2
Global Open Resource Ctrl+shift+r
Global fallback history alt+←
Global forward History alt+→
Global on a CTRL +,
Global Next Ctrl +.
The Java Editor displays outline Ctrl+o
Global open type Ctrl+shift+h in the hierarchy
Global go to matching parentheses ctrl+shift+p
Global go to previous edit location Ctrl+q
The Java editor goes to the previous member Ctrl+shift+↑
The Java editor goes to the next member Ctrl+shift+↓
Text editor go to line ctrl+l


Search
scope function Shortcut keys
Global presence in file Ctrl+shift+u
Global Open Search dialog box ctrl+h
Claims in the global workspace Ctrl+g
References in the global workspace Ctrl+shift+g


Text editing
scope function Shortcut keys
Text Editor overwrite toggle Insert
Text Editor Roll Line ctrl+↑
The text editor scrolls the line ctrl+↓


File
scope function Shortcut keys
Global Save Ctrl+x
Ctrl+s
Global Print Ctrl+p
Global Shutdown CTRL+F4
Global Save All Ctrl+shift+s
Global all off CTRL+SHIFT+F4
Global Properties Alt+enter
Global New CTRL + N


Project
scope function Shortcut keys
Global All Build Ctrl+b


Source
scope function Shortcut keys
Java Editor Formatting ctrl+shift+f
Java Editor Uncomment ctrl+\
Java Editor Comment ctrl+/
Java Editor Add import ctrl+shift+m
Java Editor Organization import Ctrl+shift+o
The Java Editor uses try/catch blocks to surround the settings, which are too common, so it is recommended to set them up here.
You can also use ctrl+1 to automatically fix it.


Run
scope function Shortcut keys
Global single-Step return F7
Global single-Step skip F6
Global single-step jump into F5
Global single-Step jump selection Ctrl+f5
Global Debug Last started F11
Global Continue F8
Global use filters to step SHIFT+F5
Global Add/Remove breakpoints Ctrl+shift+b
Global Display Ctrl+d
Global Run last boot ctrl+f11
Global Run to row ctrl+r
Global Execution Ctrl+u


Refactoring
scope function Shortcut keys
Global Undo Refactoring Alt+shift+z
Global Extraction Method Alt+shift+m
Global decimation local variable alt+shift+l
Global inline Alt+shift+i
Global Mobile Alt+shift+v
Global Rename Alt+shift+r
Global Redo Alt+shift+y

Hotkey Chapter:

Template:alt +/modification: Windows--preferences----edit----assistant Personal habits: shift+space (blank). Simple description: When editing the program code, hit Sysout +template startup key, it will automatically appear: System.out.println ();. Format Template: window, preferences settings->java-> Editor, templates. Program code Automatic Layout: ctrl+shift+f Modification: Window, preferences-------Program code------format. Personal habits: alt+z. Automatic Typesetting settings: window-like preferences set->java-> program code format production program. Style page, Insert tab (instead of SPACEBAR) is indented, this option is unchecked, the number of spaces below is 4, so the auto-orchestration will be indented with a space of 4. Quick Execute Program: Ctrl + F11 personal habits: alt+x Modification: Windows--preferences------------------------start the previous job. Simple description: When the first execution, it will ask you to execute the mode, set up, and then just press the hotkey, it will be executed quickly.
<alt+z (finished typesetting), atl+x (execution); I think it's handy. ^___^ automatically import the required categories: Ctrl+shift+o Simple description: Suppose we do not import any category when we enter in the program:

BufferedReader buf =new BufferedReader (New InputStreamReader (system.in));

At this point, Eclipse warns that there is no import category, and as soon as we press Ctrl+shift+o, it will automatically help us import the category. To view the original code using the Category: Ctrl + left mouse button Click Simple description: You can see the original code of the category you use. Annotate the selected text: ctrl+/Simple explanation: debugging is very convenient. Modify: Window, preferences, Workbench, key, and so on, program code, Batch gaze switch: Ctrl+f8 personal habits: alt+s. Modification: Window---preferences------Windows----Next view Easy to explain: we can quickly switch between editing, debugging, and other visual scenes.

Secret: A set of eclipse can be switched at the same time, English, traditional, simplified display:

1. First install the Chinese culture pack.

2. After the shortcut to the desktop, add the parameters, English--nl "zh_us" traditional------NL "ZH_TW"-NL "ZH_CN".
(Other languages and so on) like my 2.1.2 culture, I add the parameter-n1 "Zh_us" to the Eclipse shortcut on my desktop.
"C:\Program Files\eclipse\eclipse.exe"-n "Zh_us" interface will be changed back to the English language chatter. With Eclipse, you don't have to rearrange your program code when you edit a document in Word: Copy the program code from the Eclipse program editor (CTRL + C) and paste it directly (Ctrl + V) to
Word or WordPad, you will find that the program code format in Word is exactly the same as Eclipse set, including font, indentation, and keyword color. I've tried JBuilder, GEL, NetBeans ... When using a copy paste, only the indentation format, font, color, etc. will not change. Plug-in: Plug-in installation: The plug-in download back, after its decompression, you will find features,
Plugins the 2 data clips, copy or move everything inside the Eclipse's features, plugins folder, and restart Eclipse.

Let Eclipse build the GUI's plug-in like Jbuilderx, using a drag-and-pull approach:

1.Jigloo swt/swing GUI builder:http://cloudgarden.com/jigloo/index.html Download this version: Jigloo plugin for Eclipse (using Java 1.4 O R 1.5) After installation, you can select the type of GUI to be constructed by the other->gui form, file--new.

2.Eclipse Visual Editor project:http://www.eclipse.org/vep/Click Download Page below, then click Latest Release 0.5.0 to enter the download. In addition to Ve-runtime-0.5.0.zip to download, the following 2 also want to:
EMF Build 1.1.1: (Build page) (Download Zip)
GEF Build 2.1.2: (Build page) (Download Zip)

3.0 M8 version, please download:
EMF Build I200403250631
GEF Build I20040330
Once the VE-RUNTIME-1.0M1 installation is successful, the UI design can be started by file->new->visual class. Once the installation is successful, you can start with the new->java->awt and swing to choose the type of GUI you want to construct. ve must be compatible with the corresponding version, in order to use the normal, or even if the installation is successful, the use will still have problems. Use Eclipse to develop JSP program: Plug name: Lomboz (download page) http://forge.objectweb.org/project/showfiles.php?group_id= 97 Please select the appropriate version of the Lomboz download, Lomboz.212.p1.zip represents the 2.1.2 version,
Lomboz.3m7.zip represents the M7 version .... etc.
Lomboz Installation and Setup teaching: Eclipse Development jsp-Teaching documents

Java to EXE: implementation: Eclipse paired with Jsmooth (free).
1. First make a jar containing manifest from eclipse. Production teaching
2. Use Jsmooth to package the good jar into EXE.
Jsmooth download page: http://jsmooth.sourceforge.net/index.php
3. The finished EXE file can be executed on Windows with the device JRE.

Eclipse-java Editor Best settings: Editor font settings: Work table, font->java editor text font.
(Recommended settings Courier New-regular 10) editor Related settings: Window-like settings->java-> Editor appearance: Display line numbers, emphasizing symmetrical display of the square brackets, highlighting the current row, display print margins, check it, tab width set 4, The Print Spacing field is set to 80. Program code assistance: Mining presets can be. Syntax: You can set the display color of keywords, strings, and so on. Note: The preset can be adopted. Input: All fields are checked. Floating Description: The preset can be adopted. Guided tour: The preset can be adopted. The effect of automatic typesetting, the most consistent with the Java design practice settings: Automatic Typesetting settings: window-like settings->java-> program code production format. Line break: All not checked. Branch: Maximum line length: 80. Style: Insert blank check only after forced transition. Number of spaces in indent: set to 4.

1. Control-shift-t: Opens type (open type). If you don't intentionally skiving, forget to open it through the source tree.

2. Control-shift-r: Open resources (not just for Java files). Tip: Use the yellow two-headed arrow button in the Navigator view to associate your editing window with the navigator. This allows you to open files that correspond to the hierarchy of the Navigator, which makes it easier to organize information. If this affects speed, turn it off.

3. F3: Open the Declaration (opening declaration). Alternatively, use Declaration Tab (in Java view mode, select Windows–> Show view–> Declaration). When you select a method in the code and press the button, it will show the entire method in the Declaration box.

4. Alt-left arrow: Back in navigation history (Navigation). Just like a Web browser's Back button, it is especially useful after jumping with F3. (Used to return to the original compiled place)

5. Alt-right Arrow: Navigate the history forward.

6. Control-q: Go back to the last place to edit. This shortcut is also used when you jump in the code. Especially when you're too deep, and forget what you were doing in the first place.

7. Control-shift-g: Search for references in Workspace (reference). This is the premise of refactoring. For the method, the function of this hotkey is exactly the opposite of F3. It enables you to find all the callers of a method in the stack of methods. One function associated with this is to turn on the "tagging" feature (occurrence marking). Select windows->preferences->java-> editor-> Mark occurrences and tick the option. At this point, when you click on an element, all of the elements in the code where the element exists will be highlighted. I personally only use "Mark local variables" (Mark locally Variables). Note: Too much highlighting slows eclipse.

8. Control-shift-f: Reformat the code according to the Code style settings. Our team has a unified code format and we put it on our wiki. To do this, we open Eclipse and choose window? Preferences? Java? Code style, then set code Formatter,code style and organize Imports. Use the export feature to generate a configuration file. We put these profiles on the wiki, and everyone in the team is imported into their eclipse.

9. Control-o: Fast Overview (Quick outline). With this shortcut, you can quickly jump to a method or property and just enter the first few letters of the name.

control-/: Comments on a line or uncomment. This is also true for multiple lines.

Control-alt-down Arrow: Copies the highlighted row or rows.

Alt-down Arrow: Moves one or more lines down. Alt-up Arrow will move up.

The other hotkeys are available in the menu. You can see a list of all the shortcut keys by pressing CONTROL-SHIFT-L (starting with version 3.1). Press Control-shift-l two times to display the Hotkey dialog (keys Preferences dialog), where you can set the hotkey yourself. I welcome your eclipse tips in the talkback section.

Eclipse shortcut keys

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.