Introduction Do Java development, often use Eclipse or MyEclise integrated development environment, some practical Eclipse shortcut keys and use skills, can save a lot of time to improve work efficiency in ordinary development, I’m going to share with you some of the shortcuts and tricks that I use in Eclipse, using them in my own development. CTRL + Shift + O: Automatically import packages and delete useless packages

This shortcut is also very convenient, when we use a class in the other packages, if not the introduction of the corresponding package or class, can appear red wavy lines hint, at this point we can press the keyboard shortcuts, red tip disappear automatically return to normal, if there are multiple contains the same this class, so you will be prompted to let you choose, if there is useless to the package and introduction, Usually code copy to copy to create more, can also use this key to quickly remove. 2, CTRL + Shift + X and CTRL + Shift + Y: English letter conversion

This shortcut is often used in the preparation of SQL statements, I am also often used, I suggest that the key words in SQL statements are capitalized, although the database case is case-insensitive, but it is conducive to others and their reading, especially in the case of SQL statements is very long, and it looks very standard. 3, CTRL + D: delete the current line delete the current line, this is very useful, I also often use, especially in debugging, delete the current error, combined with CTRL + Z edit undo shortcut keys, use freely. 4, CTRL + Shift +/ : Automatically comment out the selected code block

This note is annotated with /* */ (if programming language code), development is also very useful, HTML, CSS can also use this annotation, generate the corresponding comment tag, CTRL + Shift +\ can be unannotated. 5. CTRL +/ : Automatically annotates the current line or selected lines

Automatically comment out the current line or lines of code with // comment, uncomment with CTRL +\. CTRL + M: Maximize the current edit page window

It is well known that large screens increase productivity. Ctrl+ M is a shortcut to maximize the editor window, and pressing it again restores the normal window. 7. Control+Alt+ Arrow up and down keys: Copy one or more highlighted lines

This is also a very useful shortcut for copying current code to the previous or next line, and I use it a lot. 8, Alt+ arrow key up and down: up and down exchange content or the current line of content to move up or down

This is also a time saver. This combination moves the contents of the current row up or down. This shortcut works especially well in the try/catch section. Shift + Enter + CTRL + Shift + Enter: Creates a blank space above or below the current line

Shift+ Enter creates a blank line under the current line, regardless of whether the cursor is at the end of the line. Ctrl+ Shift + Enter inserts a blank line before the current line. These two shortcuts are also very helpful, and you may not be used to them at first, but after you use them a few times, you’ll find it very convenient, as I did. CTRL + Page Down or CTRL + Page Up: Fast switch between tabs

You can browse the tabs before and after, and if you use them skillfully, you can switch pages very quickly and feel very good. CTRL + E: Quick Conversion editor

This set of shortcuts will help you navigate between open editors, especially if many files are open, CTRL + E is more efficient and very helpful. CTRL + Shift + F: Format code

The default is 80 characters, this can be set. We can also reformat the code according to the code style. Our team has a common code format and we put it on our wiki. To do this, we open Eclipse, select Window Style, and then set the Code Formatter, Code Style, and Organize Imports. Use the Export function to generate the configuration file. We put these configuration files on the wiki, and everyone on the team imported them into their Own Eclipse. 13. CTRL + Shift + R: Open the resource list

This may be the most save time of all shortcut key combinations, also I often use, especially according to the name directly in the project or work space for a file, this set of shortcuts allows you to open the file on your workspace, and you only need to press the filename or mask, in the first few letters, such as applic *. XML. The catch is that this set of shortcuts doesn’t work in all views. CTRL + O: Quick Outline view

If you want to view the current methods of a class or a particular method, but don’t want to pull up, pull the code also don’t want to use the search function, use CTRL + o, especially trace open or directly to a class method is very much, this is very useful, directly show how those methods and member variables, it can list all methods and properties of the current class, Simply type the name of the method you want to query and press Enter to jump directly to the location you want. 15, Alt +? Or Alt +/ : auto-complete code or prompt code

This is my favorite shortcut key combination, especially when typing syso several characters, 2 fingers easily press the two keys, automatically complete system.out.println (); “, and Eclipse defaults to “. For method prompt, if the middle prompt is broken and you want to see it again, you have to re-type “in front of the corresponding class or variable. You can see it again, but if you use both keys together, you can try it out, and if you type in for, if there’s a local variable that you want to iterate over, it’ll say for each or for (int;;). Again, while() and then automatically generate the code. Here are some tips: Lock the 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 the Ant View: IN my Java or Debug mode, I like to display the Ant view so I can quickly run Ant tasks. You can find this view through Window Ant. Put the Ant View in the corner of the screen and add the build.xml file using the “Adda Other a Show View a Buildfiles” button. In version 3.1, the Ant debug scripting language is even supported. Automatically traverse a collection: for + Control-space: If you don’t already know, then you should remember that Control-space is auto-complete. In Eclipse, you can also auto-complete structures. Within an array or collection, try typing “for” and pressing the Control-space key. Eclipse asks you which collection you want to iterate over and then automatically completes the loop code. Use hierarchical layout: I’m confused by the default (flat) layout in the Package Explorer View, which displays the full name of the Package in the navigation tree. I prefer the package and filesystem view of my source code, called Hierarchical Layout in Eclipse. To switch to this mode, click the button down in the Package Browse view, select Layout, and then Hierarchial. Display multiple files at once: You can view multiple files at once. You can open an inactive edit window by dragging it to the bottom or side scroll bar of the active window. That’s the best way I can describe the trick. Open two Eclipses at the same time: To merge changes from one CVS branch to another, I like to do this by opening two different Working directories (Workspace) of Eclipse at the same time. This way I can see all the changes by comparing the latest version on CVS (right-click the project and select Compare Lastest from HEAD) and merge each change into another CVS branch. The easiest way to start multiple Eclipses is with Eclipseawith Launcher. Implementors: Installs a plug-in that can jump to an implementation of an interface. If you are a fan of Dependency Injection or are working on a well-written interface, you need one to speed up code navigation. You can find this plugin at SourceForge. Generate getter and setter methods automatically: In the corresponding POJO, right-click in the blank, select [Source], then [Generate Getters and Setters], and select which properties you want to Generate the method for. Click OK, especially if there are many member variables. To this Java programmer development or really interested. Can find me some Java learning video Java learning exchange group: 450936584, this is free, I hope students to find me do not have a granted attitude, after all, is my efforts, I hope you really have a want to learn Java heart, I will do my best to help you become an excellent programmer. Eclipse shortcuts:

Ctrl+1 Quick fix (the most classic shortcut, need not say more) Ctrl+D: Delete the current line Ctrl+Alt+↓ Copy the current line to the next line (copy added) Ctrl+Alt+↑ Copy the current line to the previous line (copy added) Alt+↓ Copy the current line to the next line (cut and paste) Alt+↑ The current line to the previous line (same as above) Alt+← Previous edit page Alt+→ next edit page (for that, of course) Alt+Enter Displays the properties of the currently selected resource (project,or file or file) Shift+Enter Insert a blank line under the current row line (at this time the mouse can be in any position, the current row is not necessarily the last) Shift + Ctrl + Enter in the current row insert a blank line principle (ditto) Ctrl + Q location where the final edit Ctrl + L to locate in a row (for more than 100 people have the Gospel) Ctrl+M maximizes the current Edit or View (press again or vice) Ctrl+/ Comment the current line, press again to uncomment the current line Ctrl+O Quickly display OutLine Ctrl+T Quickly display the current class inheritance structure Ctrl+W Close the current Editer Ctrl+K Use the selected Word to quickly navigate to the next Ctrl+E to quickly display the current Editer drop-down list (bold if not displayed on the current page) Ctrl+/(keypad) Collapse all code in the current class Ctrl+×(keypad) Expand all code in the current class Ctrl+Space Ctrl+Shift+E displays a manager that manages all views currently open (close, activate, etc.) Ctrl+J Forward incremental search (after pressing Ctrl+J, each letter editor you type will provide a quick match to locate a word, if not, it will not be found in the stutes line, especially useful when looking up a word, Idea has this feature two years ago) Ctrl+Shift+J Ctrl+Shift+F4 Close all open Editer Ctrl+Shift+X Change all selected text to lower case Ctrl+Shift+Y Change all selected text to lower case Ctrl+Shift+F Format the current code with Ctrl+Shift+P to position the right card (e.g. {}) (move from front to back, cursor inside the card, back to front, and vice versa) Alt+Shift+R Rename a variable or class by using the following shortcut keys: Alt+Shift+R Rename a variable or class by using the following shortcut keys: Alt+Shift+M extract method (this is one of the most common methods in refactoring, especially for a lot of mud code) Alt+Shift+C change the structure of the function (useful, N functions call this method, change it once) Alt+Shift+L extract local variables () Use Alt+Shift+F to change a local variable in Class to a field variable. Use Alt+Shift+I to merge variables Inline. Alt+Shift+V Moving functions and variables (less common) Alt+Shift+Z refactoring (Undo