头图
IDEA is the most used development tool for programmers. Many programmers want to make it a one-stop development tool, so they install various plug-ins. Complete various operations in IDEA through plug-ins without installing other software, which is really convenient! Today, I will share with you the IDEA plug-ins that I usually use, all of which are excellent!

SpringBoot actual e-commerce project mall (50k+star) address: https://github.com/macrozheng/mall

Key Promoter X

Key Promoter X is a plug-in that helps you quickly learn IDEA shortcut keys. When you click some functions with the mouse in IDEA, it will automatically prompt you to use the shortcut keys for that function. It makes it easier for you to get rid of the mouse function and only use the keyboard to develop, which is probably the most needed plugin for programmers who are just starting to use IDEA.

When we use the mouse to complete certain tasks, Key Promoter X will prompt the corresponding shortcut keys, so that we can master IDEA's shortcut keys faster.

Lombok

Lombok is currently the standard for developing Java applications. Not only does SpringBoot support it by default, but even IDEA has a built-in Lombok plug-in, which can be used without installation. Lombok is a Java code enhancement library. Through Lombok's annotations, you can no longer write getter, setter, equals and other methods, and Lombok will automatically generate it for you at compile time.

For example, when we add @Getter and @Setter annotations to a class;

 /**
 * 修改订单费用信息参数
 * Created by macro on 2018/10/29.
 */
@Getter
@Setter
public class OmsMoneyInfoParam {
    @ApiModelProperty("订单ID")
    private Long orderId;
    @ApiModelProperty("运费金额")
    private BigDecimal freightAmount;
    @ApiModelProperty("管理员后台调整订单所使用的折扣金额")
    private BigDecimal discountAmount;
    @ApiModelProperty("订单状态:0->待付款;1->待发货;2->已发货;3->已完成;4->已关闭;5->无效订单")
    private Integer status;
}

Lombok will automatically generate Getter and Setter methods for all properties for us, no need for us to write them by hand. For specific use, please refer to the use of Lombok .

MyBatisX

MybatisX is a rapid development plug-in based on IDEA, developed and maintained by the MyBatis-Plus team, and the prompts are very full-featured and powerful. It supports jumping between xml and Mapper interfaces, and comes with a graphical code generator, which can generate SQL implementation directly according to the method name in a way similar to JPA.

We can directly jump to the corresponding SQL implementation in xml by clicking the icon on the left side of the Mapper interface method. Clicking the icon on the left side in xml can also directly jump to the corresponding method in the Mapper interface.

When we create a method that conforms to the JPA specification, we can directly generate SQL implementation without handwriting. MyBatisX is very powerful. For details, please refer to the use of MybatisX plugin .

RestfulFastRequest

RestfulFastRequest claims to be the IDEA version of Postman. It is a powerful Restful API toolkit plugin that can quickly generate interface debugging use cases based on existing methods. It has a beautiful interface to complete requests, check server responses, store your API requests and export API requests, this plugin can help you debug your API faster and more efficiently within IDEA!

The following is a rendering of using RestfulFastRequest to debug the API interface. It is very convenient to use. For details, please refer to the use of RestfulFastRequest plugin .

PlantUML

PlantUML is an open source UML diagram drawing tool that supports generating graphics through text, which is very efficient to use. It can support the drawing of sequence diagrams, class diagrams, object diagrams, activity diagrams, mind maps and other graphics.

The following uses PlantUML to draw a flowchart, which can be previewed in real time and is very fast. For specific use, please refer to the use of the PlantUML plug-in .

SequenceDiagram

SequenceDiagram is a plug-in that can generate sequence diagrams based on code. It also supports direct navigation to corresponding codes on sequence diagrams and exporting as images or PlantUML files.

The following is a sequence diagram made with SequenceDiagram, which is still very good. For specific use, please refer to the use of the SequenceDiagram plugin .

GsonFormatPlus

A plugin that can automatically generate entity classes based on JSON strings, supports Lombok.

Select the class name, right-click to generate, and enter the JSON string to quickly generate the corresponding entity class.

Json Parser

A simple and compact JSON formatting plugin, are you still using online tools to format JSON? Try this IDEA plugin!

Open the right panel directly, enter a JSON string to quickly format, and support folding display.

String Manipulation

A plug-in for professional string processing, supports switching of various format code naming methods, escaping and escaping in various languages, character encryption, sorting, alignment, filtering, etc. of multiple characters. In short, the function is very powerful, you can try it when you need string manipulation.

Select the string to be processed, right-click to open the menu to start using it.

MapStruct support

MapStruct is an object attribute mapping tool based on Java annotations. When we use it, we only need to define the object attribute mapping rules in the interface, and it can automatically generate the mapping implementation class without using reflection and has excellent performance.

When we use its IDEA plug-in, it can automatically prompt the attributes contained in the mapping object, and can jump to the corresponding attribute when clicking on the attribute. For specific use, please refer to the use of MapStruct .

Alibaba Java Coding Guidelines

Alibaba's "Java Development Manual" supporting plug-in can detect in real time the places in the code that do not meet the specifications of the manual, and help you code efficiently and quality.

For example, the manual has this line:

The plugin automatically detects and alerts us when we violate the manual specification.

At the same time, it provides the function of detecting all code specifications and switching languages with one click.

If you want to modify the detection rules of a certain protocol, you can modify it by setting Editor->Inspections .

Alibaba Cloud Toolkit

CloudToolkit is an IDEA plug-in produced by Alibaba. Through it, we can realize automatic deployment more conveniently. Its built-in terminal tools and file upload function are very convenient even for server management! Not only is this IDEA plugin powerful, it's completely free!

After the server is configured, it can be packaged and uploaded to the server, and then automatically execute the specified script.

It has a built-in terminal tool, and the prompts are quite complete. If you want to manage Linux servers in IDEA, you may try it. For specific use, please refer to the use of CloudToolkit plugin .

arthas idea

The Arthas command generation plug-in developed based on IDEA supports the commonly used commands of Arthas, such as watch, trace, ognl static, ognl bean method, field, monitor, stack, tt and other commands.

Directly open the right-click menu and select the Arthas command to quickly generate commands. For details, please refer to the Arthas tutorial .

Docker

The Docker plug-in officially provided by IDEA is built-in and supports image and container management of remote Docker environments, as well as batch deployment using Docker Compose.

It can automatically package the image of the application, and the jar package will be directly uploaded to the remote server and packaged into an image. For details, please refer to the use of IDEA's official Docker plug-in .

Maven Helper

A good helper for resolving Maven dependency conflicts, you can quickly find dependency conflicts in projects and resolve them!

We can view all dependencies in the current project through the pom.xml 依赖分析 tab at the bottom of the file.

Through the 冲突 button, we can filter out all conflicting dependencies. The current project guava has conflicting dependencies, and the current version is 18.0 .

Select the conflicting dependency and click the Exclude button to directly exclude the dependency.

At the same time, pom.xml will also add the <exclusion> tag to this dependency, isn't it very convenient!

Grep Console

A plug-in that helps you analyze console logs. It can highlight logs of different levels with different colors, and can also be used to search log content by keywords.

When the project prints the log, it can be found that the logs of different log levels will be displayed in different colors.

If you need to modify the color scheme, you can open the configuration menu of the plugin by Tools .

Then modify the color scheme via the configuration menu.

The log analysis window can be called up by right-clicking on the console and using the Grep button.

Then you can search directly by keyword.

Markdown

A Markdown plug-in officially produced by IDEA, which supports editing Markdown files and previewing them, which is very convenient for friends who are accustomed to using IDEA.

The most convenient part of using it to edit Markdown files is that you can directly use the various shortcut keys provided by IDEA without having to adapt to a new set of shortcut keys.

Translation

A translation plug-in that supports Google, Youdao, Ali, and Baidu translations. It is very helpful for us to translate comments when we look at the source code!

Directly select the content to be translated, right-click to find the translation button;

Direct use 翻译文档 can translate the entire document;

You can also directly translate the specified content through the translate button in the upper right corner.

Statistic

A code statistics tool that can be used to count the number and size of lines of code in the current project.

We can turn on this function through the View->Tool Windows->Statistic button in the top menu.

At this point, you can see the statistics of our project code. For example, in my open source project mall java the code size is 2818kB , and the number of lines is 85645 .

Vue.js

Vue.js supports plug-ins. Friends who have written front-end must have used it. You can create .vue files according to the template, and you can also intelligently prompt Vue related codes.

After enabling the plugin, you can create a new .vue file according to the template.

When we write the code starting with v- in the tag, it will prompt the relevant instructions in Vue.

Summarize

The above are 20 IDEA plug-ins that I commonly use, covering most of the application scenarios, and they are basically enough for normal development. However, although the IDEA plug-in can enhance its functions and provide us with a one-stop development experience, don't install too much, too much is easy to get stuck!


macrozheng
1.1k 声望1.3k 粉丝