Intelligent Content-Aware alt+/, this shortcut can easily match the class information we use,/on the keyboard and? is the same button.
CTRL +. And Ctrl+1: Next error and quick change
CTRL +. Moves the cursor to the next report fault or warning in the current file. This set of shortcut keys I generally use with ctrl+1, that is, modify the proposed shortcut keys. The new version of Eclipse suggestions are good to help you solve a lot of problems, such as missing parameters in the method, Throw/catch exception, non-executed methods and so on.
More than two of the more commonly used
More shortcut key combinations can be viewed at Eclipse Press Ctrl+shift+l.
Let's use the frequency to see some of my favorite hotkey combinations. (Note: The following are tested on Eclipse3.02 and one version)
1. control-shift-t: Opens type (open type). If you don't intentionally skiving, forget to open it through the source tree. Using Eclipse to easily open an implementation class for an interface, press CTRL+T to list the implementation class of the interface
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, choose 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 editing place. 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: Codeàjavaàpreferencesà reformat the code according to the code style. Our team has a unified code format and we put it on our wiki. To do this, we open Eclipse, select the window Style, and then set the 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.
Other Eclipse Tips
I've summed up a few related tips:
Lock Command Line window : In the Command line view (Window->show view->other->basic->console), try using the SCROLL LOCK button to lock the console output without scrolling.
using Ant view : In my Java or debug mode, I like to show the ant view so I can run the ant task quickly. This view can be found through window ant. Place the ant view in the corner of the screen and add the Build.xml file with the add compiled file (addàotheràshow viewàbuildfiles) button. In version 3.1, even the Ant debug scripting language is supported.
automatically traverse a collection : For + control-space: If you do not yet know, then you should remember that Control-space is the AutoComplete feature. In Eclipse, you can also automate the structure. In an array or collection range, try entering "for" and then pressing the Control-space key. Eclipse will ask you which collection you want to traverse and automatically complete the loop code.
using hierarchical layouts : The default layout (flat) In Package Explorer View makes me confused, and it shows the full name of the package in the Navigation tree (navigation). I prefer the package and file system view of my source code, which is called the hierarchical layout (hierarchical layouts) in eclipse. To switch to this mode, click the Down button in the package browse view, select Layout, and then select Rating (hierarchial).
Show multiple files at once : You can browse multiple files at once. You can open an edit window that is not in the active state by dragging it to the bottom of the active window or to the scroll bar on the side. This is the best way I can describe the trick.
Open two eclipse simultaneously: To merge the changes from one CVS branch to another, I like to do this by opening two working directories (Workspace) to different eclipse. This way I can see all the changes by comparing the latest version on CVS (right-click the project and then select Compare lastest from HEAD) and then merge each change into another CVS branch. The simplest way to start multiple eclipse is to take advantage of Eclipseàwith Launcher.
implementors plugin : Installs a plug-in that can jump to an implementation of an interface. If you're a dependency injection fan, or you're working on an excellent interface, you'll need a plugin like this to speed up code navigation. You can find this plugin in SourceForge.
Ctrl+alt+h
If you want to know how a class's methods are called by those other classes, check the name of the method and press "Ctrl+alt+h".
Eclipse will show which methods are called by this method, resulting in a call tree. 1. Ctrl + Left button
This is often used by most people to see the definition of variables, methods, classes
2. Ctrl+o
View a schema for a class that lists its methods and member variables. Tip: If you press Ctrl+o again, you can list the methods and variables that the class inherits.
Mnemonic: "O"---> "Outline"---> "outline"
3. Ctrl+t
Look at the inheritance tree of a class, which is top-down, and then press once more ctrl+t, which is replaced by a bottom-up display structure.
Tip: Select a method name and press Ctrl+t to see the parent, subclass, and interface of the method with the same name.
Mnemonic: "T"-------> "tree"-----> "Hierarchy tree"
4.alt+ left and RIGHT ARROW keys
We often encounter when looking at the code CTRL + left, layer tracking, and then lost in the code, then only need to press "ALT + LEFT ARROW key
"You can go back to where you last read, and by the same token, press ALT + RIGHT ARROW to go to the reading position you just returned, like the browser's
Forward and Back buttons are the same.
Import Package:ctrl+shift+o Edit Scope features shortcut Global Find and replace ctrl+f text editor Find previous ctrl+shift+k text editor find Next CTRL+K&N Bsp Global undo ctrl+z Global Replication ctrl+c Global Recovery Previous selection alt+shift+↓ Global clipping ctrl+x Global quick fix ctrl1+1 global content assist alt+/& nbsp Global all checked ctrl+a Global Delete delete Global context information ALT +? alt+shift+? ctrl+shift+space Java Editor display tooltip description f2 Java Editor Select encapsulate element alt+shift+↑ Java Editor Select Previous Element alt+shift+← Java Editor Select 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 features shortcuts Global Zoom ctrl+= Global Reduction ctrl+- window Scope features shortcut Global activation Editor f12 Global Toggle Editor ctrl+shift+w Global on one editor ctrl+shift+f6 global View ctrl+shift+f7 Global previous perspective Ctrl+s hift+f8 Global Next Editor ctrl+f6 Global next View ctrl+f7 Global Next Perspective ctrl+f8 Text Editor display ruler context menu ctrl+w Global Display View menu Single ctrl+f10 Global display system menu alt+- navigation Scope features shortcuts Java editor open structure CTRL+F3&NBSp Global Open Type ctrl+shift+t global open type hierarchy f4 global open Declaration f3 Global Open External Javadoc shift+f2 Global Open Resource ctrl+shift+r Global fallback History alt+← Global forward History alt+→ global previous ctrl+, global next ctrl+. Java Editor Show outline ctrl+o Global Open class in hierarchy Type ctrl+shift+h global go to matching parentheses ctrl+shift+p global go to previous edit position ctrl+q Java Editor go to previous member ctrl+shift+↑ Java editor go to Next member ctrl+shift+↓ text editor go to line ctrl+l Search scope function shortcut Global appears in file ctrl+shift+u Global Open Search dialog CTRL+H&N Bsp Declarations in the global workspace ctrl+g references in the global workspace ctrl+shift+g text editing scope features shortcut text Editor overwrite toggle insert Text Editor Roll-up ctrl+↑ Text Editor Scroll down ctrl+↓ file scope features shortcut Global save ctrl+x ctrl+s Global print ctrl+p global shutdown CTRL+F4&N Bsp Global Save All ctrl+shift+s global close ctrl+shift+f4 Global Properties alt+enter Global New ctrl+n Project scope features shortcuts Global all build ctrl+b source Scope features shortcuts Java editor formatting ctrl+shift+f Java editor Uncomment ctrl+/ Java Editor Comments ctrl+/ JAVThe A editor adds a single import ctrl+shift+m Java editor to organize multiple import ctrl+shift+o java editors using Try/catch blocks to surround the settings, too common, so listed here, Recommend setting yourself. can also use ctrl+1 automatic correction. Debug/Run scope function shortcut Global single-Step back f7 Global single-Step f6 global single-stepping f5 global single-step-forward selection ctrl+f5 global Debug last start F 11 Global Continue f8 Global use filter step shift+f5 Global Add/Remove Breakpoints ctrl+shift+b Global display ctrl+d global run last start CTRL+F11&NB Sp Global run to row ctrl+r Global execution ctrl+u refactoring scope functions shortcut Global undo Refactoring alt+shift+z Global Extraction method alt+shift+m global pumping Take local variable alt+shift+l global inline alt+shift+i Global move alt+shift+v Global rename alt+shift+r global redo Alt+shift+y
(1) The size of the ctrl+m switch window (2) Ctrl+q jumps to the last edit (3) F2 when the mouse is placed at a marker and the ToolTip is pressed, the ToolTip will also be displayed when the mouse is removed.
Description. F3 jumps to the place of declaration or definition. F5 One-step debugging into the inside of the function. F6 single-Step debugging does not enter the function inside, if installed PowerWord 2006 to the "Take the word switch" shortcut keys to change to other. The F7 is returned from inside the function to the call point. F8 continues to the next breakpoint. (4) ctrl+pg~ for the XML file is the Toggle Code and Diagram window (5) ctrl+alt+i See the information about variables in the Java file (6) Ctrl+pgup for the Code window is open "show List" drop-down box, in this drop-down box shows the most recently opened file (7) ctrl+/is this//~ comment in the Code window. ctrl+shift+/is this/*~*/comment in the Code window, which is!--~--〉 in the JSP file window. (8) Alt+shift+o (or click the Toggle Mark Occurrences button in the toolbar) when you click on a tag to make the other
This mark of the place is highlighted in yellow, and a white square appears on the right border of the window, and clicking on this block jumps to this marker. (9) Right-click on the left border of the window, where the breakpoint is added, select Show line numbers to add lines. (ctrl+i) Formats the active element in format active Elements. Ctrl+shift+f formatted file format document. (one) Ctrl+s save the current file. Ctrl+shift+s Save all unsaved files. CTRL+SHIFT+M (placing the cursor on the class name of the package to be imported) acts as an add import statement. The Ctrl+shift+o effect is that the missing import statement is added and the extra import statement is deleted. Ctrl+space prompts you to type content Assist, at which point the input Method Chinese (Simplified) ime-
Ime/nonlme Toggle shortcut keys (for switching between English and other text) are changed to other. The Ctrl+shift+space prompt message is the context information. (14) Double-click the left border of the window to add a breakpoint. (ctrl+d) deletes the current row.
Eclipse shortcut key Daquan ctrl+1 quick fix (the most classic shortcut, you don't have to say) Ctrl+d: Delete the current row ctrl+alt+↓ copy the current row to the next row (copy increase) ctrl+alt+↑ Copy the current row to the previous row (replication incremented)
Alt+↓ the current line and the next line of interaction (especially useful, you can save the first cut, then paste) alt+↑ the current line and the previous row interaction position (IBID.) alt+← the previous edited page alt+→ the next edited 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 a blank line in the current row (principle above)
Ctrl+q positioning to the last edit place Ctrl+l positioned in a row (for people with programs over 100 have the Gospel) Ctrl+m maximize the current edit or view (and then vice versa) ctrl+/comment on the current line, then uncomment ctrl+o quick display Outl Ine Ctrl+t quickly displays the inheritance structure of the current class Ctrl+w close the current editer ctrl+k reference selected word quickly navigates to the next Ctrl+e quick Display drop-down list of current editer (if the current page does not appear in bold)
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 some code insertion (but general and input method 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 no
, the display in Stutes line is not found, check a word, especially practical, 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 the text that is currently selected is all stale lowercase
Ctrl+shift+y turns the currently selected text to lowercase
Ctrl+shift+f formatting of the current code
Ctrl+shift+p is positioned to the match (for example {}) (after locating from the front, the cursor is in the match, back to the front, and 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 open
Head of it)
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 merging variables (which might be a bit inappropriate inline) alt+shift+v move functions and variables (not commonly used) Alt+shift+z refactoring of Regret pills (Undo)
Several shortcut keys for ADT eclipse