15 large popular Eclipse development skills shortcuts

introduction

Author: Java in my life
Source: CSDN
Original: https://blog.csdn.net/chenleixing/article/details/44600587
Copyright: This article is a blogger original article, reproduced, please attach Bowen link!

   Do java development, often with Eclipse or MyEclise integrated development environment, a number of practical Eclipse shortcuts and tips, you can save a lot of time to improve work efficiency in normal development, the following I will combine the use of their own development and to share about Eclipse used to the shortcuts and techniques.

? 1, alt + or alt + /: auto-complete code or prompt code

   This is my favorite shortcut key combination, especially when the input syso few characters, two fingers easily press the 2 key, the automatic on completion System.out.println (); it, and eclipse the default is to appear. "" method suggests that if broken, then the middle prompted want to see in front of have to re-enter the corresponding class or variable. "" can then see the prompt, but if these two bonds is using the same can play a role in the prompt, you can try, and if the input for, if the top local variables need to be traversed, then, will pop up select each traverse or for (int ;;) or for use while () and then automatically generate code.

2, ctrl + o: Fast outline view

   If you want to view a particular method or methods of the current class, but do not want to pull down the code, you do not want to use the Find function, then it using ctrl + o, in particular, direct or open a method to track a lot of class when this would be very useful, there are those who see the direct method and member variables, it can list all the methods and properties of the current class, you simply enter the name of the method you want to query, click enter can directly jump go to your desired location.

3, ctrl + shift + r: open the resource list

    This may be all shortcut key combinations in most provinces of the time, I also frequently used, in particular, is to find a file by name directly in the project or work space, this shortcut allows you to open your workspace any document, and you only need to press the file name or mask in the first few letters of the name, such as APPLIC .xml. The only drawback is that this shortcut can not be used in any view. *

4, ctrl + shift + f: formatting code

   The default 80 characters on the new line, this can be set. Can be set according to the code to reformat the code style, our team have a unified code format, 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. The use of export (Export) function to generate a configuration file. We put these configuration files on the wiki, then the team everyone into their Eclipse.

5, ctrl + e: fast conversion editor

   This shortcut will help you navigate between open editors, especially in the many open files state, ctrl + e will be more efficient, very helpful.

6, ctrl + page down or ctrl + page up: quick switch between tabs

   Tab can browse around, if you get more proficient, then each page will be switched very fast, I feel very good.

7, shift + enter and ctrl + shift + enter: on or create a blank line below the current

   Shift + enter to create a blank line below the current line, regardless of whether the cursor is at the end. Ctrl + shift + enter then insert a blank line before the current line. This two shortcut keys are also very helpful, you may not accustomed to the beginning, but then spend many times, you will feel very convenient, anyway, I like this.

8, Alt + down arrow keys: the uplink and downlink to exchange content or the content of the current row to move up or down

   This is also a time-saving magic. The combination of the contents of the current line up or down. In the try / catch part, this shortcut, especially so.

9, Control + Alt + up and down direction keys: copying one or more lines highlighted

   This is very useful shortcuts, can be very easy to copy the previous line or the next line to the current code, I often use.

10, ctrl + m: the current edit page window is maximized

   Large display screen can enhance work efficiency is we all know. Ctrl + m is the shortcut editor window is maximized, press again to return to normal window.

11, ctrl + /: Comment current line or automatic selection of rows

   Automatic comment out the current line or multiple lines of code, with comments // using ctrl + \ may be uncommented.

12, ctrl + shift + /: code block selected automatically commented

   Note that with this / / comment (if the code is programming language), is also very useful in the development, HTML, CSS, etc. This annotation can be used to produce the corresponding annotation tag, with ctrl + shift + \ cancel comment.

13, ctrl + d: Delete the current line

   Delete the current line, this is useful, I also often used, especially in debugging, remove the current error, combined with ctrl + z Edit Undo shortcut, use it freely.

14, ctrl + shift + x and ctrl + shift + y: conversion case letters

   The written language commonly used shortcut keys in SQL statements. I have often used, we recommend SQL statement keywords are capitalized, although the database is not case sensitive, but it is a good read yourself and others, especially very long SQL statement under the circumstances, but this looked very standardized.

15, ctrl + shift + o: automatically introduce and remove packets useless packets

   This shortcut is also very convenient when we use one of the other classes in a package, if it is not incorporated or the corresponding packet category, suggesting wavy line will appear red, In this case we can press the shortcut keys, red tips disappear back to normal, if there are multiple contain the same class, then you will be prompted to choose, if there is no use to package introduced, the usually copy the code to copy more to create, you can also use this key fast removed.

Attach Eclipse shortcuts Daquan:

Ctrl + 1 Quick Fix (the most classic shortcut keys, needless to say)

Ctrl + D: Deletes the current line

Ctrl + Alt + ↓ Copy the current line to the next line (Copy increase)

Ctrl + Alt + ↑ Copy the current line to the previous line (Copy increase)

Alt + ↓ position of the current line and the following line of interaction (particularly useful, can be omitted to cut, and then pasted)

Alt + ↑ the current line and the top line interaction position (ibid.)

Alt + ← a former editor of the page

Alt + → next edit page (of course, for the one above it)

Alt + Enter to display the currently selected resource (engineering, or file or files) properties

Shift + Enter current row into the next line blank line (in this case a mouse can be any position of the current row, not necessarily last)

Shift + Ctrl + Enter insert a blank line in the current line (principle above article)

Ctrl + Q Last edited to locate the place

Ctrl + L positioned in a row (for more than 100 persons have program gospel)

Ctrl + M to maximize the current Edit or View (press and vice versa)

Ctrl + / comments on the current line, press the Cancel comment

Ctrl + O to quickly display OutLine

Ctrl + T to quickly display the current class inheritance structure

Ctrl + W closes the current Editer

Ctrl + K Referring to quickly locate selected next Word

Ctrl + E to quickly display the drop-down list of current Editer (if the current page does not display shown in bold)

Ctrl + / (keypad) all the current class code folding

Ctrl + × (keypad) Expand All codes in the current class

Ctrl + Space Code Assistant to complete some code inserted (but generally there is a conflict and input method, hot-key input method may be modified, also Alt + / can be replaced by temporary)

Ctrl + Shift + E Display Manager View all currently open manager (option to turn off, to activate other operations)

After the increment look forward Ctrl + J (Press Ctrl + J, you enter each letter editor provides fast matching to locate a word, if not, then at stutes line display is not found, a check when word, especially practical, this function will have two years ago Idea)

Ctrl + Shift + J reverse incremental find (and on the same strip, just forward from the back check)

Ctrl + Shift + F4 to close all open Editer

Ctrl + Shift + X to taste all of the currently selected text lowercase

Ctrl + Shift + Y to the currently selected text all lowercase

Ctrl + Shift + F to format the current code

Ctrl + Shift + P matcher for targeting of (for example, {}) (when positioned behind the front from the cursor to the character matching inside, front to back, and vice versa)

The following shortcuts are common remodeling inside, I would like to own and commonly tidy (Note: Shortcuts are usually reconstructed Alt + Shift beginning of the)

Alt + Shift + R to rename (my own favorite with a, especially variables and class Rename, than the manual method can save a lot of labor force)

Alt + Shift + M extraction method (which is one of the most commonly used inside reconstruction method, especially useful for a lot of clay in the code)

Alt + Shift + C modified structural function (more practical, with N function calls this method once get modified)

Alt + Shift + L extracting local variables (direct some magic number and character string extracting into a variable, especially when multiple calls)

Alt + Shift + F Class of the field variable become local variables (more useful features)

Alt + Shift + I merge variables (probably say something wrong Inline)

Alt + Shift + V moves functions and variables (less commonly)

Alt + Shift + Z reconstruction of regret (Undo)

Reproduced please specify - Author: Java in my life (Chen Leixing) ORIGINAL http://blog.csdn.net/chenleixing/article/details/44600587

Author: Java in my life
Source: CSDN
Original: https://blog.csdn.net/chenleixing/article/details/44600587
Copyright: This article is a blogger original article, reproduced, please attach Bowen link!

Guess you like

Origin blog.csdn.net/qq_42405666/article/details/90071076