eclipse practical and common skills (the most detailed in history, with file download)

GTQ has summarized the basic content in a word file, and you can download it yourself if you need it.

Link: https://pan.baidu.com/s/1Vb1uqNL6CbSleXq1U-RmDA

Extraction code:

vx40

After copying this content, open the Baidu Netdisk mobile app, which is more convenient.

1. Chinese and English switching

First of all, you have to make sure that you have installed the Chinese package. In fact, the Chinese package contains the languages ​​of most parts of the world, and it just calls the simplified Chinese.
Then add **-nl "regional language code"** to the target location of the eclipse shortcut on the desktop, and start it again to complete the language switch. Chinese: zh_cn; English: EN.
However, it is recommended to use the English version. The Chinese version is not suitable for development and is only suitable for beginners.
Insert picture description here

Set interface

All interface settings in eclipse are set in Window. In Window's Preferences (configuration), you can directly use the shortcut key Alt+W+P to open the Preferences window
Insert picture description here
. This will be used in the subsequent settings. window.

2. Change the theme

The default theme is Light, and white theme
Insert picture description here
can be set as Dark theme, black theme
Insert picture description here

Setting method:
1. Find Window in the top menu bar, click and find the shortcut key of Preferences (configuration) at the bottom: Alt+W+P
2. At this time, a window will pop up, find General on the left and click to open After that, there are a bunch of sub-menus, find the Appearance at the top.
3. At this time, click the Theme option on the right to change the original Windows to Dark, and then click Apply and Close to confirm the changes
Insert picture description here
. Choose the theme you like according to your preferences.

Three, set the font size

The setting topic has already explained the setting steps, the following setting steps will not be described one by one, because each setting step is basically the same, so there is no need to repeat the plural.
Directly above:
Insert picture description here
Insert picture description here
just set the font size you like.

Fourth, set the coding of the entire tool

Directly on the picture:
Insert picture description here

5. Configure the item created in the right-click menu. The default menu is not practical.

Insert picture description here
Insert picture description here
Insert picture description here

6. Set the code to automatically prompt (by default, the prompt will pop up only when the key is ".")

Above:
Insert picture description here

Seven, how to import an existing java project

Insert picture description here
Insert picture description here
Insert picture description here

8. Change the name of the project

Insert picture description here

9. Projects that are not used temporarily can be closed, and can be opened by double-clicking when in use.

Insert picture description here
For closed projects, you can not display
Insert picture description here
Insert picture description here

10. Modify the documentation comments of classes and methods, and add related information such as the author

Window->Preference -> Java -> Code Style -> Code Templates Select Comments on the right, and
Insert picture description here
modify the Types item as follows:
The content of Types is:

/**
 * @Description
 * @author G.TQ Email:8*****@qq.com
 * @version 
 * @date ${date}${time}
 *
 */

Methods amended to:

/**
 * @Description
 * @author G.TQ Email:8*****@qq.com
 * @date ${date}${time}
 * ${tags}
 *
 */

11. If there are problems such as shortcut key conflicts, modify the shortcut keys

Insert picture description here
You can configure the shortcut keys of Annotate Class File and Quick Fix as your favorite, and the function is to automatically complete the type of variables.

12. View Java source code in Eclipse

On the String class, press the ctrl key, click on the String with the mouse, and a hyperlink will appear. After clicking, select the import file and find the src.rar file in the java installation directory to view the java source code.

Thirteen, save the perspective

Insert picture description here
Insert picture description here

In the future, if there are problems with the perspective view, such as various "chaos" drag and drop, you only need to reset the perspective view. Reset the perspective view as follows:
Insert picture description here

14. Shortcut keys (just understand)

1. Alt + ↑ up arrow key: move the selected code up, you can move a line or a section of code directly up a few lines

2. Alt + ↓ down arrow key: move the selected code down, you can move a line or a section of code directly down a few lines

3. Alt+← left arrow key: the previous edited page

4. Alt + → Right arrow key: the next page to be edited
5. Alt + Shift + S + Generate Getters and Setters...: quickly generate variable get, set methods, generally used for custom entity classes

6, Alt + Shift + S + Generate Constructor using Fields...: a method to quickly generate variables, generally used for custom entity classes

7, Alt + Shift + S + Generate Constructors from Superclass...: Quickly generate the construction method of the parent class, generally used to inherit the class
8, Ctrl + Shift + O: automatically import all the correct packages
9, Ctrl + E: pop up the current work For all open code files in the space, you can quickly switch between these code files by entering the first letter to find them
10, Ctrl + 1: Quick fix, if there is a red line, position the cursor at the red line, and it will prompt solution
11. Ctrl + t: quickly list the hierarchy of currently selected variables or methods

12. Ctrl+Alt+↓ down arrow key: copy the current line to the next line (copy increase)
13. Ctrl+Alt+↑ up arrow key: copy the current line to the previous line (copy increase)

14, Alt+Enter: Display the attribute search of the currently selected resource (project or file)

15, Shift+Enter: Insert a blank line in the next line of the current line (the mouse can be at any position of the current line at this time, not necessarily the last)
16, Shift+Ctrl+Enter: Insert a blank line in the current line (the principle is the same as above Article)

17, Ctrl+Shift+X: Change the currently selected text to all lowercase
18, Ctrl+Shift+Y: Change the currently selected text to all uppercase

19. Ctrl+Shift+P: locate the corresponding matching symbol (such as {}) (the cursor should be inside the matching symbol), the effect is similar to double clicking with the mouse, but double clicking has a selection effect, this will only make the cursor jump to the corresponding Match position

20. Alt+Shift+M: Export a piece of code into a method reference, so that the structure will be clearer

21, Ctrl+D: delete a whole line

22, Ctrl+Shift+F: standard code format

to sum up

For the time being, I think that's all that I need to use. Later in the development, I will update it when I encounter the need to set it up! !
Goodbye~~~

Guess you like

Origin blog.csdn.net/zhangzhanbin/article/details/110824940