1. Automatic completion -- eclipse has an automatic completionCodeFunction. The shortcut key is Ctrl + space. When you click, a dialog box will pop up with some suggestions related to the front and back articles. As long as there is a possibility, eclipse will do it for you.
2. Quickly format your code-if the code is modified a lot, it will become ugly. Without proper indentation, it is very difficult to determine what changes have taken place in the code. You can press Ctrl + Shift + F to format the code. You can even set your own format by entering the project> preferences> JAVA code style> formatter menu and selecting the "enable project specific settings" option, edit your own format and save it with the new name.
3. remove unnecessary codes-if a project is poorly maintained and often modified, many unnecessary imports and conversions will be introduced, there are other common and easy-to-detect encoding errors. You can use a code cleanup technique to quickly remove these errors. Right-click your project folder and select Source> clean up. Like code formatting tools, you can also customize your own code cleanup.
4. Turn to Declaration-do you want to know where the methods, variables, or classes are declared? This is simple. Press ctrl and click reference.
5. Search for all reference files-if you want to find all references for a method, variable, or class, right-click the desired reference and select the desired search range.
6. Quickly select a group of characters-do you need to delete the entire string or anything in a method parameter declaration? Select the characters at both ends of the string (for example, select the "symbol or (Symbol) of the previous sentence respectively, so that all the characters in the middle are selected. This applies even to classes and methods. You can select a whole row by clicking three times.
7. rename all objects-if you need to rename a method, variable, or class, you can rename any object by selecting the reference and pressing Alt + Shift +? The reference dialog box appears. You can rename the object. Press the Enter key to rename all objects.
8. change Method signature-if you need to change any part of the method signature, a method name, parameter, or return type, you can quickly change all parameters in the method by referring to the method. Press Alt + Shift + C to bring up a dialog box for you to choose from.
9. automatically generate getters and setters -- dummies write getters and setters on their own. After writing all the class members, right-click anywhere in the encoding window and choose creen> source> Generate getters and setters. Select the variable for which you want to generate getters and setters.
10. The javadoc document is easy to generate. In eclipse, document generation is simple. Just type "/**" and press enter on a declaration. Eclipse automatically creates pre-and post-document comments (such as a method parameter or the author of a class ). After that, you only need to write out what the method actually should do.
11. Run the unit test -- select the unit test, press Alt + Shift + X, and then press T. You can run the unit test in the debugger by pressing Alt + Shift + D and then t.
12. comment out the code-if you need to quickly comment out the code block, select the corresponding line and press Ctrl +/, you can remove the code comment in the same way.