IDEA has now become the most mainstream Java IDE. The advantages are not listed here, but the rich plug-ins are definitely a highlight. Here are 10 of my favorite IDEA add-ons in development. They are both efficient tools and powerful tools that will definitely meet your needs.

Part ONE: Efficiency tools

1. Lombok

Lombok, as many Java developers have heard, can instantly halve the amount of code you need, specifically the amount of entity class code. After installing the plug-in, add the following dependencies through the POM.xml file so that Maven can automatically generate the required code when it is packaged.

<dependency>
    <groupId>org.projectlombok</groupId>
    <artifactId>lombok</artifactId>
    <version>1.18.12</version>
    <scope>provided</scope>
</dependency>
Copy the code

You don’t need the version number for Springboot because Lombok’s dependencies are defined in the spring-boot-dependencies. Pom file.

The Lombok dependency is already defined in the spring-boot-dependencies. Pom file

Lombok can then be used happily. In real projects, we create a lot of various entity classes and write a lot of meaningless template code, which can be generated using the IDEA shortcut, but it’s not as refreshing as using Lombok and adding a few comments. The following two pieces of code are equivalent, and the code using Lombok is obviously much cleaner.

Use Lombok:

@Setter       	     // Add the set method
@Getter		     // Add the get method
@ToString	     // Add the toString method
@NoArgsConstructor   // Add a no-argument constructor
public class Blog {
    private Integer id;
    private String name;
    private Date createTime;
}
Copy the code

Without Lombok:

public class Blog {
    private Integer id;
    private String name;
    private Date createTime;

    public Blog(a) {}
    public Integer getId(a) {
        return id;
    }
    public void setId(Integer id) {
        this.id = id;
    }
    public String getName(a) {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public Date getCreateTime(a) {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    @Override
    public String toString(a) {
        return "Blog{" +
                "id=" + id +
                ", name='" + name + '\' ' +
                ", createTime=" + createTime +
                '} '; }}Copy the code

Other uses of Lombok are not explained here, but are available online.

2. GsonFormat

After installing the plugin, use the code generation shortcut keys, Windows (Alt + INSERT), Mac (Command + N) to select GsonFormat, and paste the following Json data to automatically generate the corresponding entity class code:

[{"title": "Design Patterns"."edition": 1."authors": [
            "Erich Gamma"."Richard Helm"."Ralph Johnson"."John Vlissides"]}]Copy the code

GsonFormat code generation process

3. VisualVM Launcher

Java VisualVM is a graphical JVM analysis tool that comes with the JDK and is a necessary tool for JVM analysis and tuning. On a device with a JDK environment installed, Java VisualVM can be opened by typing the JVisualVM command at the command line. If you have VisualVM Launcher installed on your IDEA, several buttons will be added in the upper right corner. Click directly to open Java VisualVM, very convenient.

Use VisualVM Launcher to launch Java VisualVM renderings

4. Alibaba Java Coding Guidelines

In the domestic Java field, Alibaba’s influence can be said to be second to none, and it has naturally become the maker of many rules or regulations. Although many wild programmers do not like rules and regulations, code standardization is always more beneficial than harmful. With this plugin, your code quality is sure to improve, otherwise the various code warnings will surely annoy you to death. But some of the tips are really nice, like the one about manually creating a thread pool:

Ali code specification for manual thread pool creation tips

5. CodeGlance

The plugin is simple and useful, allowing IDEA to implement code thumbnails like VSCode and Sublime Text, making it easy to browse and find code.

CodeGlance rendering

Part two: Force artifact

6. Active-power-mode

What if it’s too boring? With this plugin, the screen will vibrate for you, fireworks will explode for you, and a “Hello World!” will be written. All feel like divine help, fell in love with masturbation code.

The Active power – mode rendering

7. Background Image Plus

This plugin can Set Background Image for IDEA. It supports static Image and random Image transformation. After installing the plugin, you can Set Background Image by View –> Set Background Image. Warm tips, do not set that kind of scale is too big beauty picture, otherwise while writing code, side nosebleed, really can not be.

Background Image Plus rendering

8. Nyan Progress Bar

As the name suggests, this plugin makes the progress bar so much easier to wait for.

Nyan Progress Bar rendering

9. Rainbow Brackets

The purpose of this plugin is to make the brackets look like a rainbow, which not only makes the code more beautiful, but also improves the readability of the code.

Rainbow Brackets effect picture

10. Material Theme UI

I used this plugin on WebStorm before, it is also available on IDEA. Material Theme UI provides a very rich Theme color matching, all very good to look at, the IDEA of the original black and white double evil color matching aesthetic fatigue friends can try.

Material Theme UI rendering

Finally, a warm reminder: install too many plug-ins may affect the performance of the computer, please use them accordingly. There are thousands of excellent plug-ins. You can introduce your favorite IDEA plug-ins in the comments section. The ~