Eclipse tips

I'm used to developing Java programs in eclipse. The company's recent projects are all developed by idea. Meanwhile, Android studio is also developed by idea prototype. I'm learning Android development, so it seems a trend to break away from eclipse and turn to idea., The use of development tools is a habit problem. If you are used to the development efficiency is high. If you are not used to the use of tools, you have to go to Baidu. The ultimate goal of cultivating new habits is to forget the old habits. Of course, everything is not absolute, but it is possible to forget the use skills and shortcut keys after not using eclipse for a long time. Therefore, in order to prevent the old habits from being completely forgotten, here is a summary of the skills I often use in the development process of eclipse or MyEclipse.

I. shortcut keys

1. Prompt: alt+/

2. Format: Ctrl + Shift + F

3. Enter a pair of symbols, such as "", (), which will be completed automatically. After entering, the following message will pop up: tab

4. Find out who called a method: select the method name, Ctrl + Shift + G

5. View the inheritance relationship of a class: select the class and Ctrl + t

6. Find a class or file by file name: Ctrl + Shift + R

7. Alt + up / down to move the current line up or down

8. Ctrl + Alt + up / down to copy the current line up or down

9. Comments: Ctrl + / line comments, shift + Ctrl + / block comments

10. Enter in the upper part of the method or class name: / * * and press enter to automatically generate document comments

11. Ctrl + D to delete the current line

12. Select the method name and click F2 to prompt the method information

13. Prompt error, etc

II. Setting

1. Add set and get methods with shortcut keys, and rewrite or implement a method of the interface: Shift + Alt + s

2. Version control: right click the project name or file name

Click the file name and right-click - > team - > show history:

When an error occurs in version control update, you can modify the current local version file on the left through compare with. After modification, you can ensure that your own code exists and that other codes are the same as those on the server. For those that need to be completely overwritten, use get contents.

  3、maven

Maven settings

Maven uses:

Update dependency can update jar package dependencies

Maven add dependency:

Enter the name of the jar package and it will be automatically retrieved for you

Jar package in reindexmaven Library

4. Set font

5. Set the code of the whole tool

6. Configure project output file address, add local jar package, etc

  configure build path

7. Automatic compilation

  8、junit-test

I think this is better than idea. You can directly select the method name to be tested and right-click run as

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>