What are the Idea plug-ins that improve Java development efficiency?

Table of contents

I. Introduction

1. It is important to choose the right development tool

2. Brief overview of this article

2. Recommended development tools

1. Introduction to MyEclipse

2. Introduction to Eclipse

3. Idea introduction

3. Plug-in recommendation

1. Idea download address

2. Lombok plugin

3. MybatisX plugin

4. GenerateAllSetter plugin

5. CodeGlance Pro plugin

6. Alibaba Java Coding Guidelines plugin

Four. Conclusion


I. Introduction

1. It is important to choose the right development tool

As we all know, building a Java development environment is relatively complicated.

Setting up environments is especially easy to make mistakes when you're a beginner. If you can choose a suitable development tool, it will reduce the chance of errors, making it more convenient to build the environment and less prone to errors.

When you have a year or two of development experience, you won't make some beginner mistakes at this time. You will find that some development tools are particularly memory-hungry, making the computer freeze, and writing a line of code freezes three times. In this case, it will make you feel bad. If you can choose a suitable development tool, it will make the developer happy.

When you are a master developer, you have your own development habits and your own development methods. But today's development tools are becoming more and more technological and intelligent. If you can choose a suitable development tool, it will make the development more efficient. Therefore, it is very important for developers to choose the appropriate development tools, which is why this article recommends Idea and its plug-ins.

2. Brief overview of this article

This article will first compare the advantages and disadvantages of MyEclipse, Eclipse and Idea, the three development tools. After the comparison, you will choose Idea even if you don't recommend it. Of course, I still recommend you to use Idea as a Java program development tool. Although using Idea will make your development more efficient and make your development more intelligent. However, using some useful development plug-ins in Idea will bring your development efficiency and development methods to another level.

Therefore, this article will introduce six more useful plug-ins to make you even more powerful. If you know some other useful plug-ins, you may wish to leave a message in the comment area and discuss it together.

2. Recommended development tools

There are many tools for developing Java programs, the more famous ones are MyEclipse, Eclipse and Idea. Most developers should have heard of and used these three development tools. Next, let's compare and analyze the advantages and disadvantages of these three tools. Among these three tools, I recommend you to use Idea. If you haven't used Idea before, I hope you can try it after reading this article, maybe you will find a new world.

1. Introduction to MyEclipse

MyEclipse is a full-featured development tool ideal for students and beginners. It simplifies the process of setting up the environment and deploying. I used it when I was in college, but I didn't use it when I came out to work.

Advantages: It integrates a lot of plug-ins on the basis of Eclipse, which has very comprehensive functions and is easy to use.

Disadvantages: Because it comes with a lot of plug-ins, the startup is very slow, the development project consumes resources, and there is a fee for commercial use.

2. Introduction to Eclipse

Eclipse is an open source, Java-based development tool. Its design idea is: everything is a plug-in. By installing different plug-ins, different functions are supported. I used Eclipse when I first started working, and I have used it for about three years.

Advantages: open source, free, very easy to use.

Disadvantages: The appearance interface is not supported well enough, and the version update is too fast, and the plug-in update speed cannot keep up. It is relatively resource-intensive. When developing large-scale projects, sometimes there will be freezes and no response.

3. Idea introduction

Idea is recognized by the industry as the best tool for developing Java programs. Divided into the flagship version Ultimate and the community version Community, the ultimate version charges, and the community version is free. After I didn't use Eclipse, I used Idea Community Edition, and then downloaded some Idea plug-ins, the development efficiency will be higher.

Advantages: intelligent code editing, automatic code prompt, simple and easy-to-use interface, rich navigation modes, etc.

Disadvantages: more resource-intensive, not rich enough compared to Eclipse plug-ins

3. Plug-in recommendation

1. Idea download address

The Idea I am using is the 2020.3 community edition, and I will demonstrate the plugin based on this version later. If you want to download Idea, you can go to the official website to download it, the address is: Idea download address .

253e033cb081486dadbb6066468058bf.png

2. Lombok plugin

Lombok can automatically generate constructors, getter/setter, equals, hashcode, and toString methods for attributes at compile time through annotations. Using this plugin, you can save some code. Versions 2020.3 and above have built-in Lombok plug-ins. If your Idea does not have a built-in plug-in, you can go to the plug-in market to download it. As shown in the figure below, enter Lombok and click Install to download it.

8ef532c4317449a3aa4791cd178ebf43.png

13e1737ce2da4d1fa6e671d5706605d6.png

3. MybatisX plugin

When using Mybatis, often switch between mapper and its corresponding xml. The usual way is to copy the method name in the mapper first, and then search for the corresponding id in the xml globally. After the MybatisX plug-in, you only need to click the small icon to switch freely between mapper and xml.

b56b1b8e7cc649bd8614d13f204d67df.png

20e72113d5414119b76399bdc0cd23ba.png

4. GenerateAllSetter plugin

When using the Model object, it is inevitable to set the assignment or get the value. If there are few attributes, manual set and get are also more convenient. When there are too many attributes, it is inconvenient. When you have the GenerateAllSetter plugin, you can generate get or set methods with one click. Right-click the variable, click Show Context Actions, and then click to generate all set methods with default values. The steps of the method of operation are shown in the figure below:

0b1cbb96d5dd4724826acd4cb2d68ce6.png

1b8e06ca41bf420b9d6a6550a72a5f63.png

4bd337949fb045efb14b8298e7c5d008.png

5. CodeGlance Pro plugin

You will definitely encounter a situation where there is a lot of code in the class, such as a class written by yourself with many lines, or looking at the source code of the framework. At this time, when you look down from the top, you slide down bit by bit through the wheel of the mouse. If you have installed the CodeGlance Pro plug-in, it will generate a thumbnail on the right side of the code, and you can easily view the code just by clicking on the thumbnail.

4c87a8f60e7b41a49bc37856c6c0d423.png

ce02e218c6fd4ea9906746ef4cdcc9d5.png

6. Alibaba Java Coding Guidelines plugin

This is a plugin based on the Alibaba specification. Although we will write code in a very standard way, sometimes we will unconsciously write some non-standard code for convenience. If you have installed the Alibaba Java Coding Guidelines plug-in, you can scan the project according to Alibaba's specifications. Right-click on the project, a coding standard scan will appear, and clicking it will scan our code. After the scan is complete, a scan result will be given, and the code can be modified according to the scan result. The operation steps are shown in the figure below:

05341d2ce5d14b0686fea5d5c231ff84.png

9d60918564484f7d90b9c26bdeeeb671.png

7b3ec2476c3f498e96eeebd098fb1562.png

Four. Conclusion

Here, I again recommend using Idea and its plug-ins to develop Java programs. If you haven't used it yet, try it out and you won't suffer.

Finally, we discuss the relationship between intrinsic technology and extrinsic tools. Using the analogy of internal force and weapons in martial arts novels, compare the technology you have learned to internal force, and compare the development tools to weapons. It is very important for a martial arts master to have weapons that can cut iron like mud, but it is even more important to have unfathomable internal strength.

Although useful tools can make our development more efficient and make our development more intelligent. But we must also focus on our own technical learning, and we should not rely too much on tools to waste technology. Only good technology and easy-to-use development tools can make us even more powerful.

Guess you like

Origin blog.csdn.net/keyboard_/article/details/127680687