This is my second article about getting started

Idea utility plugin to help you more efficient Coding

1, RainBow Brackets

As the name suggests, rainbow brackets. We may need to write a lot of parentheses during development, but when we distinguish between them, the naked eye will suffer, and this plugin will help our eyes to ease the pain.

Setting->Plugin search RainBow Brackets, install and restart IDEA. See the Lombok plug-in installation method in the previous article, Useful Plug-ins and Tips for Idea.

The effect after installation is as follows:

2, Free Mybatis plugin

When we use Mybatis, the.java file of Dao package and.xml file form a mapping relationship to realize the operation of database. However, when the number of files increases with the development of business, it is quite tedious to find the corresponding.xml file through the.java file.

This plugin is to help us quickly locate the corresponding file. After installation, a green arrow icon will be generated on the left side of the.java file, as shown below:

When we click on this icon, we can quickly jump directly to the corresponding.xml file, so we don’t have to find the file manually.

3. Alibaba Java Coding Guidelines

Code check plug-in provided by Alibaba, by which we can develop good code specifications, let us no longer be mercilessly teased by peers.

Enable the real-time monitoring function

Start a live scan to help us find problems. Right-click -> Enable real-time monitoring

Method of use

Right click -> Code specification Scan

  • Code that does not conform to the specification

Suspicious Code Found “Suspicious Code found” in the bottom right corner. Congratulations, you are a qualified developer.

  • Code that does not conform to the specification
package com.wangscaler.payment1;

/ * * *@author WangScaler
 * @date2021/7/8 now * /

public class test {
    public static void main(String[] args) {
        int a = 0;
        if (a == 0) {
            System.out.println(true); }}}Copy the code

Is there anything wrong with such a short code? Let’s guess….

In the Java naming convention, the class naming convention requires:

1. The name of the class must begin with an uppercase letter and all other letters in the word must be lowercase.

2. If the class name consists of more than one word, the first letter of each word should be uppercase, for example, Test.

3. If the class name contains a word abbreviation, capitalize each letter of the word, as in XMLTest. Another naming trick is that since classes are designed to represent objects, use nouns when naming classes. For example: the Book;

In general, we should abide by the hump naming. Therefore, the error message after the scan is as follows:

When we change “test” to “test” as prompted, there should be no problem.

digression

You all have what practical plug-in to share, we study together, improve efficiency together.