Rapid configuration

Automatic class annotation

1) Open Preferences

2) Enter “File and Code Templates” in the search box to open “File and Code Templates”.

3) In the Files column on the right, find the Class and edit the comment. Please refer to the following notes:

#if (${PACKAGE_NAME} && ${PACKAGE_NAME} ! = "")package ${PACKAGE_NAME}; #end /** * ${Description} * * @author ${USER} on ${DATE} */ public class ${NAME} { }Copy the code

Automatically prompts to ignore case

1) Open Preferences

2) Enter “Code Completion” in the search box to open “Code Completion”

3) Remove the Match Case check box

Automatically optimize package Auto import

1) Open Preferences

2) Enter “Auto Import” in the search box to open “Auto Import”

3) Select Add Unambiguous imports on the fly and Optimize imports on the fly

Recommend a plug-in

lombok

Lombok automatically generates constructors, getters/setters, equals, hashcode, toString, and other methods for properties at compile time via annotations. With Lombok, you don’t need to manually write getters/setters, making your code simpler.

@Data
public class SuggestRequestType {

    private String keyword;

    private boolean trace;

    private Integer count;
}
Copy the code

Alibaba Java Coding Guidelines

Alibaba has developed a set of automatic IDE detection plug-ins (IDEA, Eclipse) based on the manual content of Alibaba Java Development Protocol. It is the Alibaba Java Coding Guidelines plug-in.

After the plug-in is installed, right-click the project and click on the code specification scan to generate Blocker, Critical, and Major error levels. The plug-in supports real-time detection. Can be set in Tools-> Ali coding specification.

Maven Helper

Supports one-click view of Maven dependencies, view conflicting dependencies, and one-click exclude dependencies. After the plug-in is installed, we open the POM.xml file with an additional Dependency Analyzer option at the bottom, as shown

GenerateAllSetter

After new an object, hover over the new object and press option+ Enter (MAC) to select all set methods for the object.

Statistic

Statistic is used to count the number of lines of project code. After the installation, you can click the Statistic TAB in the taskbar to collect code statistics. The system collects statistics on parameters such as the number of large lines and memory size occupied by file cores of different types.

Overview Parameter Description (such as Java)

Count: number of Java files

Size SUM: total disk Size occupied by all Java files

Size MIN: indicates the minimum disk Size occupied by Java files

Size MAX: Indicates the maximum disk Size of Java files

Size AVG: indicates the average disk Size occupied by Java files

Lines: Total number of Lines in a Java file

Lines MIN: Minimum number of Lines in a Java file

Lines MAX: Maximum number of Lines in a Java file

Lines AVG: The average number of Lines in a Java file