7 plugins for IDEA to improve development efficiency

Posted May 25, 20208 min read

7 plugins for IDEA to improve development efficiency

1 . Multi-line editing

Let's experience the new entity object copied from the xml file field
![model.gif]( https://i0.wp.com/segmentfault.comhttp://cdn.nlark.com/yuque/0/2020/gif/631242/1590194629508-870b695b-9f20-450b-ab2b-9f43fa08a556 .gif # align = left & display = inline & height = 808 & margin =%5BobjectObject%5D & name = model.gif & originHeight = 808 & originWidth = 1061 & size = 634194 & status = done & style = none & width = 1061 "model.gif")
In general, we spend a lot of time to create a new ResultMap after multi-table connection, so let's try this multi-line editing

There is an underscore in the table field, which is not allowed in the entity, it is even more annoying, waiting for a trick to teach you

![model2.gif]( https://i0.wp.com/segmentfault.comhttp://cdn.nlark.com/yuque/0/2020/gif/631242/1590195365159-ec4abcbb-d248-4885-9b06-9fa014e715e4 .gif # align = left & display = inline & height = 808 & margin =%5BobjectObject%5D & name = model2.gif & originHeight = 808 & originWidth = 1061 & size = 1287380 & status = done & style = none & width = 1061 "model2.gif")
Prerequisites, install an idea plug-in, used for hump and underline conversion:CamelCase
![image.png]( https://i0.wp.com/segmentfault.comhttp://cdn.nlark.com/yuque/0/2020/png/631242/1590195716327-82c66765-58b2-4bbe-b2f4-35f33dd5d999 .png # align = left & display = inline & height = 716 & margin =%5BobjectObject%5D & name = image.png & originHeight = 716 & originWidth = 998 & size = 100745 & status = done & style = none & width = 998 "image.png")
Steps:
For multi-line selection, hold down ALT(windows)/option(Mac) and pull the mouse
Select the field object

  • Win Ctrl + shift + Left Arrow

  • Mac option + shift + left arrow

    Copy, and then create a new entity object, right-click and select Paste without Formatting, that is, paste without formatting
    Then underline to hump object, the plug-in has a shortcut key

  • Win Shift + Alt + U

  • Mac (shift) + (option) + U

    Select multiple lines and enter directly to edit multiple lines. Use the code formatting after editing

  1. Grep Console

Efficacy

Customize the idea log printing color and other functions

solved problem

  • Logs printed by historical old projects have no color, no color is configured
  • The color log for multi-project configuration is also different
  • Logs from other places are pasted and can also be colored

Just go to Plugins in idea settings to download, and set the log color below
![image.png]( https://i0.wp.com/segmentfault.comhttp://cdn.nlark.com/yuque/0/2020/png/631242/1590196708322-ee6d5bf9-0d4e-4f3c-b978-7d3010d9e12f .png # align = left & display = inline & height = 683 & margin =%5BobjectObject%5D & name = image.png & originHeight = 683 & originWidth = 1167 & size = 131374 & status = done & style = none & width = 1167 "image.png")
The effect chart is as follows
![image.png]( https://i0.wp.com/segmentfault.comhttp://cdn.nlark.com/yuque/0/2020/png/631242/1590196788455-c7cc0ec3-df4e-4a57-a4d9-702090dbba65 .png # align = left & display = inline & height = 605 & margin =%5BobjectObject%5D & name = image.png & originHeight = 605 & originWidth = 1593 & size = 170150 & status = done & style = none & width = 1593 "image.png")

3 . JRebel hot deployment

![image.png]( https://i0.wp.com/segmentfault.comhttp://cdn.nlark.com/yuque/0/2020/png/631242/1590196870093-41185bbf-fd49-4371-8daf-42e26c06f51c .png # align = left & display = inline & height = 716 & margin =%5BobjectObject%5D & name = image.png & originHeight = 716 & originWidth = 998 & size = 118703 & status = done & style = none & width = 998 "image.png")

What problem is solved

  • The project takes a long time to start. If you modify a field, you need to restart it.
  • The devtools that come with boot require every project to come
  • Modify the SQL in xml, change it, you need to restart

Function and description

  • Modify the class other than configuration and xml or jsp, etc. without restarting
  • If you use Mybatis Plus, please install the second plug-in above

Configuration

idea menu
Help-> JRebel-> Activation
![image.png]( https://i0.wp.com/segmentfault.comhttp://cdn.nlark.com/yuque/0/2020/png/631242/1590197291261-b73ec036-bb43-48e1-b08f-11b6126af6eb .png # align = left & display = inline & height = 556 & margin =%5BobjectObject%5D & name = image.png & originHeight = 556 & originWidth = 514 & size = 32660 & status = done & style = none & width = 514 "image.png")

If you have money, please support the genuine version. You can also find the JRebel activation tutorial under Google without money. Depending on your skills, I will not talk about it here.

  1. Turn on automatic compilation
  • Win Ctrl + shift + alt + /
  • Mac ctrl + shift + option + /

Then click on the first 1.Registry ..., check complier.automake ...
![image.png]( https://i0.wp.com/segmentfault.comhttp://cdn.nlark.com/yuque/0/2020/png/631242/1590197543297-f566531e-30c6-427a-9890-2c583a25cc40 .png # align = left & display = inline & height = 670 & margin =%5BobjectObject%5D & name = image.png & originHeight = 670 & originWidth = 858 & size = 72003 & status = done & style = none & width = 858 "image.png")
2. Find JRebel-> Panel in IDE sidebar, select
![image.png]( https://i0.wp.com/segmentfault.comhttp://cdn.nlark.com/yuque/0/2020/png/631242/1590197732476-2ccef6db-24da-4649-86fd-3cbae3f26d3b .png # align = left & display = inline & height = 374 & margin =%5BobjectObject%5D & name = image.png & originHeight = 374 & originWidth = 463 & size = 23024 & status = done & style = none & width = 463 "image.png")
3. Edit the startup configuration file and check the following
![image.png]( https://i0.wp.com/segmentfault.comhttp://cdn.nlark.com/yuque/0/2020/png/631242/1590197818779-39e282c7-3fa7-47a1-93a3-c51b63d7762f .png # align = left & display = inline & height = 690 & margin =%5BobjectObject%5D & name = image.png & originHeight = 690 & originWidth = 1092 & size = 75653 & status = done & style = none & width = 1092 "image.png")
4. Click to start with JRebel

  • The one on the left is a direct run
  • The one on the right is started with DeBUG. Hot deployment is effective only when started in DeBUG mode

![image.png]( https://i0.wp.com/segmentfault.comhttp://cdn.nlark.com/yuque/0/2020/png/631242/1590197874333-887c67dd-09ee-4967-96cf-991dc8481e14 .png # align = left & display = inline & height = 151 & margin =%5BobjectObject%5D & name = image.png & originHeight = 151 & originWidth = 793 & size = 20576 & status = done & style = none & width = 793 "image.png")

  1. Translation plugin

What problem is solved

Text translation, such as api comments in Java, you ca n t understand it, select it to translate
Object naming translation and replacement tool, no longer worry about object naming

![image.png]( https://i0.wp.com/segmentfault.comhttp://cdn.nlark.com/yuque/0/2020/png/631242/1590197959821-68690915-e937-472a-b745-22dcbc94fda4 .png # align = left & display = inline & height = 716 & margin =%5BobjectObject%5D & name = image.png & originHeight = 716 & originWidth = 998 & size = 92222 & status = done & style = none & width = 998 "image.png")

Some people name variables when coding, and the naming method is strange. It can be said that there are no ancients before, and no later. Zhou Shuren

![]( https://i0.wp.com/segmentfault.comhttp://cdn.nlark.com/yuque/0/2020/jpeg/631242/1590198237097-4217fd77-d0b6-4bb3-ae11-c4718bc55037.jpeg# align = left & display = inline & height = 800 & margin =%5BobjectObject%5D & originHeight = 800 & originWidth = 800 & size = 0 & status = done & style = none & width = 800)

Description

  • Multiple translation engines

    • Google Translate
    • Youdao translation
    • Baidu translator
  • Mutual translation in multiple languages

  • Text to speech

  • Automatic word selection

  • Automatic word segmentation

Use![Image.png]( https://i0.wp.com/segmentfault.comhttp://cdn.nlark.com/yuque/0/2020/png/631242/1590199111267-55c1c4ce-f5d6-4c01 -8e5c-65a9fd5b824d.png # align = left & display = inline & height = 247 & margin =%5BobjectObject%5D & name = image.png & originHeight = 247 & originWidth = 673 & size = 29008 & status = done & style = none & width = 673 "image.png")

Select the text to be translated or replaced
![image.png]( https://i0.wp.com/segmentfault.comhttp://cdn.nlark.com/yuque/0/2020/png/631242/1590199111267-55c1c4ce-f5d6-4c01-8e5c-65a9fd5b824d .png # align = left & display = inline & height = 247 & margin =%5BobjectObject%5D & name = image.png & originHeight = 247 & originWidth = 673 & size = 29008 & status = done & style = none & width = 673 "image.png")

Example

  1. Translate foreign languages

![]( https://i0.wp.com/segmentfault.comhttp://cdn.nlark.com/yuque/0/2020/gif/631242/1590198559310-ffd2a04d-3c32-48e5-8a16-29997325536e.gif# align = left & display = inline & height = 1334 & margin =%5BobjectObject%5D & originHeight = 1334 & originWidth = 1000 & size = 0 & status = done & style = none & width = 1000)

  1. Replace the naming
    ![model3.gif]( https://i0.wp.com/segmentfault.comhttp://cdn.nlark.com/yuque/0/2020/gif/631242/1590198743971-3dee6661-fd75-4e72-ad5f-bb3ad4546a7a .gif # align = left & display = inline & height = 808 & margin =%5BobjectObject%5D & name = model3.gif & originHeight = 808 & originWidth = 1061 & size = 107542 & status = done & style = none & width = 1061 "model3.gif")

5 . RestfulToolkit

Efficacy

  • Search by interface
  • Provide interface to test

Actual measurement

  1. Search by interface
  • Win Ctrl + /
  • Mac command + /

![image.png]( https://i0.wp.com/segmentfault.comhttp://cdn.nlark.com/yuque/0/2020/png/631242/1590199463505-d3e9a1cf-5359-40a8-b75c-82dcfd869fa6 .png # align = left & display = inline & height = 358 & margin =%5BobjectObject%5D & name = image.png & originHeight = 358 & originWidth = 646 & size = 47482 & status = done & style = none & width = 646 "image.png")

  1. Find RestServices in the sidebar

Provides all the interfaces in the Controller, as well as the default test data
![image.png]( https://i0.wp.com/segmentfault.comhttp://cdn.nlark.com/yuque/0/2020/png/631242/1590199517482-06c9b613-1cac-4c8b-b3da-13eaa274519f .png # align = left & display = inline & height = 860 & margin =%5BobjectObject%5D & name = image.png & originHeight = 860 & originWidth = 637 & size = 65021 & status = done & style = none & width = 637 "image.png")

6 . Lombok

solved problem

Mengxin:Brother, I wrote so many get/set methods in the entity class, it looks very confused
Brother:Isn't that automatically generated?
Mengxin:Although it can be automatically generated, but if I want to modify the data type of a variable, do I still have to modify the get/set method?
Brother:Haha, let me tell you a plugin today, lombok can solve your problem

  • @Data can replace getter/setter methods
  • _ @ NoArgsConstructor generates no parameter structure _
  • _ @ AllArgsConstructor generates full parameter structure _

Install Lombok

  1. Install the lombok plugin in Intellij IDEA, File-> Setting-> Plugins

![]( https://i0.wp.com/segmentfault.comhttp://cdn.nlark.com/yuque/0/2020/png/631242/1589262294525-bc35de93-8484-4d07-b22a-5310ab6a0c71.png ? x-oss-process = image%2Fresize%2Cw_997 # align = left & display = inline & height = 722 & margin =%5BobjectObject%5D & originHeight = 722 & originWidth = 997 & status = done & style = none & width = 997)

  1. Annotation of project opening

![]( https://i0.wp.com/segmentfault.comhttp://cdn.nlark.com/yuque/0/2020/jpeg/631242/1589196421851-380ff5ad-51d1-49d9-bac1-cb04138e644d.jpeg ? x-oss-process = image%2Fresize%2Cw_1038 # align = left & display = inline & height = 714 & margin =%5BobjectObject%5D & originHeight = 714 & originWidth = 1038 & status = done & style = none & width = 1038)

7 . IDEA official finished plug-in(only for versions after 2020)

![172074-20200412095239290-1805808640.png]( https://i0.wp.com/segmentfault.comhttp://cdn.nlark.com/yuque/0/2020/png/631242/1590200231959-4f81115f-2d96-43ad -b979-ee5be61c5613.png # align = left & display = inline & height = 870 & margin =%5BobjectObject%5D & name = 172074-20200412095239290-1805808640.png & originHeight = 870 & originWidth = 1111 & size = 43999 & status = done & style = none & width = 1111 "172074805200464095239")

![]( https://i0.wp.com/segmentfault.comhttp://cdn.nlark.com/yuque/0/2020/jpeg/631242/1590074983225-0b5ef796-4ea1-4077-a872-79e63422ac87.jpeg# align = left & display = inline & height = 319 & margin =%5BobjectObject%5D & originHeight = 319 & originWidth = 727 & status = done & style = none & width = 727)