Save disk Ctrl + S (yes)
Comment code Ctrl + /(//)OrCTRL + Shift + /(/**/)
UncommentCancel single line comment:CTRL +/Cancel multi-line comment:CTRL + Shift + \
Code-assisted Alt +/(Prompts related methods, etc)
Quick FixCTRL + 1(Batch Rename of keywords)
Code formatting Ctrl + Shift + F
Sort and import Ctrl + Shift + O
Switch windowCTRL + F6 <you can change it to Ctrl + tab for convenience>
CTRL + Shift + M import unreferenced package
CTRL + WClose a Single Window
F3Jump to class and variable Declaration
CTRL + Shift + GJump to function call
F11 run the last program
CTRL + F11 debug the last program
Alt + back to the next editing point
CTRL + Shift + TFind classes in the project
CTRL + TQuickly display the inheritance structure of the current class
Globally open resourcesCTRL + Shift + R
The most classic shortcut
CTRL + 1 quick fix (the most classic shortcut, you don't need to talk about it)
CTRL + d: Delete the current row
CTRL + ALT + ↓Copy the current row to the next row (copy added)
CTRL + ALT + ↓Copy the current row to the previous row (copy added)
Alt + ↓ interaction position between the current row and the following row (especially practical, you can save cutting and pasting)
Alt + ↑ interaction between the current row and the previous row (same as above)
Alt + ↓Previous edited page
Alt + →The next page to be edited (for the previous one, of course)
Alt + enter display the properties of the currently selected resource (project, or file)
Shift + enter insert empty rows in the next row of the current row (the mouse can be at any position of the current row, not necessarily the last row)
Shift + Ctrl + enter insert blank lines in the current line (same principle)
CTRL + q locate the Last edited location
CTRL + l locate in a line (for those with more than 100 programs, there will be good news)
CTRL + M maximize the current edit or view (then press it, and vice versa)
CTRL +/comment out the current row, and then press it to cancel the comment
CTRL + O quick outline display
CTRL + W disable the current editer
CTRL + k quickly locate to the next one by referencing the selected word
CTRL + E: Click it to quickly display the drop-down list of the current editer (if the current page is not displayed, it is displayed in bold)
CTRL +/(keypad) collapse all code in the current class
CTRL + × (keypad) show all the code in the current class
CTRL + SpaceCode AssistantInsert some code (but it is usually in conflict with the input method, you can modify the Input key, or temporarily useAlt +/)
CTRL + Shift + e display the managers that manage all Opened Views (you can choose to close or activate them)
CTRL + J forward incremental search (after pressing CTRL + J, each letter editor you enter provides a quick match to locate a word. If not, it is not found in stutes line. It is particularly useful when querying a word. This function was available two years ago)
CTRL + Shift + J reverse incremental search (the same as the previous one, but only from the back to the front)
CTRL + Shift + F4 close all open editer
CTRL + Shift + x convert all selected text to lowercase
CTRL + Shift + y change all selected text to lowercase
CTRL + Shift + F format the current Code
CTRL + Shift + P locate the matched character (for example, {}) (when positioning from the front, the cursor must be inside the matched character, followed by the front, and vice versa)
The following shortcut keys are commonly used in refactoring. I like them and want to sort them out frequently (note: the keys for refactoring generally start with ALT + shift)
Alt + Shift + RRename (one of my favorite ones, especially the rename of variables and classes, which saves a lot of labor compared with manual methods)
Alt + Shift + M extraction method (this is one of the most common methods in refactoring, especially useful for a lot of mud code)
Alt + Shift + C modify the function structure (more practical. N functions call this method and modify it once)
Alt + Shift + L extract local variables (you can directly extract some magic numbers and strings into one variable, especially when multiple calls are performed)
Alt + Shift + F convert the local variable in the class to the field variable (more practical)
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 restructured regret medicine (UNDO)
Alt + left arrow, right arrow to switch tags in the editing window
Alt + up and down arrows to automatically select the row where the mouse is located and move it up and down
Press Ctrl + F6 to bring up the menu, which lists the Editable editing Windows that can be switched, so that you can switch over without the mouse.
CTRL + F7 can be switched between views, such as editing views, output views, and engineering views.
CTRL + F8 can be switched between different observation views, that is, between the Java view, debugging view, and so on.
CTRL + M can be switched between maximizing the current window and restoring the current window
In the CTRL + e pop-up input window, you can enter the code window you want to edit. The function is the same as that of Ctrl + F6, except that the selection method and the input method are the same. Switch the window.
CTRL + T can directly display the class chart of the content where the cursor is located. You can directly enter the class chart and jump to the input content section.
Press Ctrl, and point to the variable name, method name, and class name to quickly jump to the source code.
CTRL + F11 FAST Program Execution
CTRL + Shift + F Automatic Code Layout
CTRL + Shift + O automatically add references. Note: if we do not import any category, when we enter resourceattirbute Ra = new resourceattribute () in the program, eclipse will prompt that there is no reference category, at this time, we only need to press Ctrl + Shift + O, it will automatically help us import this category. Very convenient
CTRL +/annotate the selected block: it is convenient to debug.
Alt +/That is, everyone should be assisted by the most common code.
CTRL + H search to open the Search dialog box
CTRL + Shift + space parameter prompt. If the cursor is in the method body, the method parameter prompt is displayed. The parameters at the current cursor position are displayed in bold.
Shortcut for scope Function
Globally search and replace Ctrl + F
Search for the previous Ctrl + Shift + K in the text editor
Search for the Next Ctrl + K in the text editor
Globally undo Ctrl + z
Global copy Ctrl + c
Select Alt + Shift + continue for global recovery.
Globally cut Ctrl + x
Global quick correction ctrl1 + 1
Global content assist Alt +/
Globally select Ctrl +
Delete globally
Global context information Alt +?
Alt + Shift +?
CTRL + Shift + Space
Java editor display tooltip description F2
Java editor selects the encapsulation element Alt + Shift + Transform
Java editor selects the previous element Alt + Shift + ↓
Select the next element Alt + Shift + →
Text Editor incremental search Ctrl + J
Text Editor incremental reverse lookup Ctrl + Shift + J
Globally paste Ctrl + V
Global redo Ctrl + Y
View
Shortcut for scope Function
Zoom in globally Ctrl + =
CTRL +-
Window
Shortcut for scope Function
Global activation editor F12
Global switch editor Ctrl + Shift + W
Global editor Ctrl + Shift + F6
Global View Ctrl + Shift + F7
Global Perspective Ctrl + Shift + F8
The next global editor Ctrl + F6
Next Global View Ctrl + F7
CTRL + F8
Text Editor display ruler context menu Ctrl + W
Global View menu Ctrl + F10
Global display of System Menu Alt +-
Navigation
Shortcut for scope Function
Open the structure Ctrl + F3 in the Java editor.
Global Open type ctrl + Shift + T
Global Open Type hierarchy F4
Global open declaration F3
Open external javadoc SHIFT + F2 globally
Globally open resource Ctrl + Shift + R
Global back calendarHistorical recordsAlt + ↓
Global forward history Alt + →
CTRL +,
CTRL +.
Java editor display outline Ctrl + O
Globally open the type ctrl + Shift + H in the hierarchy
Globally move to matching parentheses Ctrl + Shift + P
Go global to the previous editing location Ctrl + q
Go to the previous Member Ctrl + Shift + ← in the Java editor.
Go to the next member in the Java editor Ctrl + Shift + ←
Text Editor to Ctrl + L
Search
Shortcut for scope Function
Globally displayed in the file Ctrl + Shift + u
Global Search dialog box Ctrl + H
Declare Ctrl + G in the global Workspace
Reference Ctrl + Shift + G in the global Workspace
Text editing
Shortcut for scope Function
Text Editor rewrite switch insert
CTRL + ← on the text editor
CTRL + ←
File
Shortcut for scope Function
Save Ctrl + x globally
CTRL + S
Print Ctrl + P globally
Globally Disable Ctrl + F4
Globally save Ctrl + Shift + S
Globally Disable Ctrl + Shift + F4
Global attribute Alt + enter
Globally create Ctrl + n
Project
Shortcut for scope Function
Global build Ctrl + B
Source code
Shortcut for scope Function
Java editor format Ctrl + Shift + F
Java editor uncomment Ctrl +/
Java editor comment Ctrl +/
Add and import Ctrl + Shift + M to the Java Editor
Java editor organization import Ctrl + Shift + O
The Java editor uses try/catch blocks to enclose unset ones, which is too common. Therefore, we recommend that you set them here.
You can also use Ctrl + 1 for automatic correction.
Run
Shortcut for scope Function
F7 is returned in one global step.
Skip F6 in one global step
Global One-Step Jump to F5
Global One-Step Jump-in and select Ctrl + F5
Global debugging last started F11
Continue F8 globally
Shift + F5 in one step using filters globally
Globally Add/remove breakpoints Ctrl + Shift + B
Global display Ctrl + d
Global run last started Ctrl + F11
Run Ctrl + R globally
Execute Ctrl + u globally
Reconstruction
Shortcut for scope Function
Global undo reconstruction Alt + Shift + z
Global extraction method Alt + Shift + m
Global extraction of local variables Alt + Shift + L
Global inline Alt + Shift + I
Move Alt + Shift + V globally
Globally rename Alt + Shift + R
Global redo Alt + Shift + Y
Hotkey:
Template: Alt +/modification: window-> preference settings-> workbench-> buttons-> edit-> content assistance. My habits: Shift + space (blank ). Simple Description: When you edit the program code, the system. Out. println () is automatically displayed when you press the sysout + template startup key ();. Set the template format: WINDOW> preference Settings> JAVA> editor> template. Automatic Program code layout: Ctrl + Shift + F modify: window-> Settings-> workbench-> buttons-> program code-> Format. Personal habits: Alt + Z. Automatic typographical settings: WINDOW> preference Settings> JAVA> program code format creation program. Style page-> hide the tab (rather than the space key). deselect this option and enter 4 as the number of spaces. In this way, Space 4 is used for automatic orchestration. Quick execution of the program: Ctrl + F11 habits: Alt + x changes: window-> preference settings-> workbench-> buttons-> execute-> Start the previous job. Simple Description: During the first execution, it will ask you about the execution mode. After setting it, it will be executed quickly by pressing this hot key.
<Alt + z (finished layout), ATL + x (executed)> .. I think it's quite easy to go ^ ___ ^ The category required for automatic import: Ctrl + Shift + O Simple Description: Suppose we didn't import any category, when we put in the program:
Bufferedreader Buf = new bufferedreader (New inputstreamreader (system. In ));
At this time, eclipse will warn that there is no import category. At this time, we only need to press Ctrl + Shift + O, and it will automatically help us import the category. View the original code of the category: Ctrl + left mouse click Simple Description: You can see the original code of the category you are using. Annotate the selected text with Ctrl +/. Note: Debug is very convenient. Modify location: window-> Settings-> workbench-> buttons-> program code-> annotation visual switch: Ctrl + F8 personal habits: Alt + S. Modify: WINDOW> Settings> workbench> buttons> WINDOW> next view. Simple Description: It is convenient for us to quickly switch between editing, debugging, and other visual scenes.
TIPS: a set of eclipse can be switched at the same time, English, traditional, and simplified display:
1. First, install the Chinese culture package.
2. Add a parameter after the shortcut of the desktop, English->-nl "zh_us" Traditional->-nl "zh_tw" simplified->-nl "zh_cn ".
(Other languages and so on) I added the parameter-N1 "zh_us" to the eclipse shortcut on my desktop after I learned Chinese in 2.1.2 ".
The "C:/program files/Eclipse/eclipse.exe"-n "zh_us" interface changes back to the English language. Using eclipse, you do not have to re-orchestrate the program code During word Editing: copy the entire program code in the eclipse program editing area (CTRL + C) and directly paste (CTRL + V)
On word or Wordpad, you will find that the program code format in Word is exactly the same as that set in eclipse, including the font, contraction, and keyword color. I have tried JBuilder, gel, netbeans... When you copy and paste a file, the font and color of the file will not change only when the format is the same. Plug-in: plug-in installation: After downloading the package, decompress it and you will find features,
Plugins: copy or move everything in the two data folders to the features and plugins data folders of eclipse, and then restart eclipse.
Eclipse can build a GUI plug-in by dragging like jbuilderx:
1. jigloo SWT/swing GUI builder: plugin for eclipse (using Java 1.4 or 1.5) after installation, you can select the GUI type to be constructed from the file-> New-> Other-> GUI form.
2. Eclipse visual editor project: Select Download page from http://www.eclipse.org/vep/and click latest release 0.5.0 to download. In addition to ve-runtime-0.5.0.zip, the following two items are required:
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
After the VE-runtime-1.0M1 is installed successfully, you can start the uidesign with file-> New-> visual class. After the installation is successful, you can choose new> JAVA> AWT and swing to start designing the GUI type you want to build. The corresponding version of VE must be used together before it can be used normally. Otherwise, even if the installation is successful, problems still occur. Use eclipse to develop JSP program: plug-in name: lomboz (download page) http://forge.objectweb.org/project/showfiles.php? Group_id1_97please select the lombozdownload of zookeeper. lomboz.212.p1.zip indicates version 2.1.2,
Lomboz.3m7.zip indicates the M7 version .... And so on.
Lomboz installation and Setup Teaching: Eclipse development JSP-Teaching File
Java to EXE: Implementation Method: eclipse with jsmooth (free of charge ).
1. Create a jar containing manifest by eclipse. Production Teaching
2. Use jsmooth to package the prepared jar into exe.
Jsmooth download page: http://jsmooth.sourceforge.net/index.php
3. The created EXE file can be executed on windows with the JRE device.
Eclipse-Java editor best settings: Editor font settings: workbench-> font-> JAVA editor text font.
(Courier New-regular 10 is recommended) Editor settings: WINDOW> preference Settings> JAVA> editor appearance: display the line number, square brackets that emphasize symmetric display, emphasize displaying the current line, and display the print margin. Select it, Set Tab width to 4, and print the code field to 80. Program code assistance: Use presets. Syntax: You can set the display color of keywords, strings, and so on. Note: use the default settings. Input: select all fields. Floating Description: by default. Tutorial: select the default settings. The effect of automatic typographical layout is best suited to Java design conventions: Automatic typographical settings: window-> preferred settings-> JAVA-> program code production format. Line feed: all are not checked. Branch: the maximum length of a row is 80. Style: only insert a blank check box after forced transformation. Number of inner spaces: Set to 4.
1. Control-shift-T: Open type ). If you are not interested in doing this, forget to open the source tree.
2. Control-shift-R: Open resources (not just to find java files ). Tip: Use the yellow two-way arrow button in the navigator view to associate your editing window with the navigator. This will display the opened files in the hierarchy of the navigator to facilitate the organization of information. If this affects the speed, turn it off.
3. F3: open declaration ). Alternatively, use the Declaration tab (in Java view mode, choose windows> show View> Declaration ). When you select a method in the Code and press this button, it will display the entire method in the statement box.
4. Alt-left arrow: Move back from the navigation history. Just like the back button of the web browser, it is particularly useful after the F3 jump. (Used to return the original compilation location)
5. Alt-right arrow: forward in the navigation history.
6. Control-Q: Return to the Last edited place. This shortcut key is also used when you jump to the code. Especially when you drill too deep and forget what you did first.
7. Control-shift-G: Search for reference in workspace ). This is the premise of refactoring. For methods, this hot key works in the opposite way as F3. It allows you to locate all callers of a method in the method stack. One function related to this is to enable the "mark" function (occurrence marking ). Choose Windows> preferences> JAVA> editor> MARK occurrences and select the option. When you click an element, all the elements in the Code are highlighted. I personally only use Mark local variables ). Note: too many highlights will slow down eclipse.
8. Control-shift-F: Re-format 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, open eclipse, select windowpreferencesjavacode style, and set code formatter, code style, and organize imports. Use the export function to generate a configuration file. We put these configuration files on the Wiki, and then everyone in the team imported them to their own eclipse.
9. Control-O: Quick outline ). With this shortcut key, you can quickly jump to a method or attribute, just enter the first few letters of the name.
10. Control-/: Comments or uncomments a line. The same applies to multiple rows.
11. Control-alt-Down Arrow: copy one or more highlighted rows.
12. Alt-Down Arrow: move one or more rows down. Alt-up arrow moves up.
Other hotkeys are available in the menu. You can press control-shift-l (from version 3.1) to view the list of all shortcut keys. Press Control-shift-l twice to display the key dialog box (Keys preferences diences). You can set the key here. You are welcome to post your eclipse prompt in the Talkback section.