eclipse of the most useful shortcuts 10

Here are some of the most useful in the process of using eclipse 10 shortcut keys, can improve development efficiency and quality through the development of flexible use of these shortcuts.

1. [ctrl + shift + r] Open Resource

This may be all the shortcuts in the most provincial of time. This shortcut lets you open any file on your workspace, and you only need to enter the first few letters of the file name, eclipse will list the files you want to look for you.

Also you can use wildcards with such applic * .xml or * BanServ * .java, start looking files fast and hard.

The only drawback is that shortcuts can not be used in any view.

2. [ctrl + o] rapid outline

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 feature, use this shortcut bar. 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 will be able to jump directly to your desired location.

3. [ctrl + e} quickly convert editor

This shortcut will help you navigate between open editors (providing input search function). Alternatively, you can use the [ctrl + pageDown] or [ctrl + pageUp] tab browsing around, but in many files opened, ctrl + e will be more efficient.

4. [ctrl + 2, L]: a local variable assigned

The development process, I often write your methods, such as Calendar.getInstance (), then ctrl + 2 shortcut to assign the result to the calculation method on a local variable. So I save the class's name, time, variable names, and import declaration. [Ctrl + 2, F] A similar effect, but the effect is the result of computation in the method of class assignment field.

[5] alt + shift + r rename

Rename the properties and methods in a few years ago was a very troublesome thing, require extensive use of search and replace, so that the code becomes fragmented. Today's Java IDE provides a source processing functions, Eclipse is the same. Now, variables, and rename the method becomes very simple, you will get used every time you appear better alternative names to do a rename. To use this feature, the mouse moved onto the property or method name, press the [alt + shift + r], enter a new name and click Enter. This completes. If you rename a class attribute, you can click on [alt + shift + r] twice, it will call the dialog processing source code, can automatically rename get and set methods.

6. [alt + shift + l], and [alt + shift + m] Extraction local variables and methods

Further comprising extracting function of source process variables and methods from large code. For example, from a string to create a constant, then select the text and press alt + shift + l can be. If the same string appears elsewhere in the same class, it will be replaced automatically. The method of extraction is also a very handy feature. Large method into smaller, greatly reduce the complexity of the method will be well defined, and enhance testability code.

7. 【shift+enter】及【ctrl+shift+enter】

[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.

[8.] direction key alt +

This is also a time-saving magic.

The up and down arrow keys to the contents of the current line up or down, in particular Haoshi try / catch part of the shortcut.

The left and right arrow keys to jump on the last edit a line up / down, improve the efficiency of editing lookup.

9. 【ctrl+m】

Large display screen can enhance work efficiency is we all know. [Ctrl + m] is the shortcut editor window is maximized.

10. [ctrl +.] And [ctrl + 1] and the next quickly modified error

[Ctrl +.] To move the cursor to the next error or warning at the current file. I generally associated with the shortcut keys [ctrl + 1] used together, that the proposed changes shortcuts. Eclipse of the new version of the proposed changes do very well, can help you solve many problems, such as missing parameter method, throw / catch exception, not the method of execution, and so on.

 

"If the match to avoid burning pain, its life will be bleak. There is a hot minute, a hair splitting."

Guess you like

Origin www.cnblogs.com/yanggb/p/11349971.html