IntelliJ IDEA software setup checklist

IntelliJ IDEA software settings list

Article directory

  • IntelliJ IDEA software setup checklist
    • Global default settings
    • Develop basic configuration
      • Unified settings for JDK & Java versions
      • Unified setting of compiler and compiled version
      • Unicode character set
        • Check Transparent native-to-ascii conversion? See details
        • What is UTF-8 BOM? [Project compilation error: java illegal character \\?_illegal character\\?-CSDN blog](https://blog.csdn.net/xinpz/article/details/109713959)
      • Unify Maven settings
      • Methods are collapsed by default
      • method separator
      • Cancel the default folding of a row of functions
      • **Automatically import packages**
      • Avoid import *
      • Prompt is not case sensitive | Cancel case sensitivity
      • Automatically generate serialVersionUID
      • Automatically generate @Override
      • Set vertical bars in the code editing area
      • Mouse wheel controls code font size
      • **Remove blank lines between comments and methods (optional)**
      • Annotate rendered view mode (optional)
      • **Automatically remove trailing spaces when saving files (optional)**
      • Automatic compilation**(optional)**
      • The previous project will not be opened by default after startup **(optional)**
      • Eclipse shortcut keys (optional)
    • Software problem solving
      • Development lag
        • Configure VM OptionsChange startup configuration parameters
        • Increase compilation memory (required)
        • Uninstall unnecessary plug-ins (optional)
        • Turn off compile checks
        • Change operating system shortcuts
        • Close alibaba code review
        • Increase memory
    • Reference sources

Project source: Internet
Current status: valid
Applicable systems: all platforms
Open source status: Open source
Applicable Agreements: Not provided

This project is mainly used for: Setting up the refined development tool IntelliJ IDEA
Please note! Some settings may be inconsistent and have a certain relationship with the development tool version

Global default settings

  1. image.png

Develop basic configuration

Reference from: Commonly used configurations for IDEA novices (extremely detailed) – Nuggets

Unified setting of JDK & Java versions

image.png
image.png
image.png

Unitally set the compiler and compiled version

Default settings when creating innovative projects, select Settings for New Projects
File | Settings | Build, Execution, Deployment | Compiler | **Java Compiler**
image.png

Uniform encoding character set

File | Settings | Editor | File Encodings
image.png

Check Transparent native-to-ascii conversion? See details

Personal understanding of Transparent native-to-ascii conversion_native to ascii-CSDN blog

What is UTF-8 BOM? Project compilation error: java illegal character \\?_illegal character\\?-CSDN blog
UTF-8 BOM is also called UTF-8 signature. BOM, byte order mark.
 
The BOM of UTF-8 is to support UTF-16 and UTF-32. The BOM signature means to tell the editor what encoding the current file uses to facilitate the editor's identification.
 
However, although the BOM is not displayed in the editor, it will produce output, as if there is an extra blank line.

Unified Maven settings

File | Settings | Build, Execution, Deployment | Build Tools | Maven
image.png

Methods are folded by default

File | Settings | Editor | General | Code Folding | General | ? **Method bodies**
Others need to be checked
image.png

Method separator

File | Settings | Editor | General | Appearance| ?**Show method separators**

Cancel the default folding of functions in a row

File | Settings | Editor | General | Code Folding | **One line method**

Automatically import packages

File | Settings | Editor | General | Auto Import
image.png

Avoid import *

File | Settings | Editor | Code Style | Java | (right menu bar) imports
under the column Packages to Use Import with '*'

  • Class Count to use import with * **999**
  • Names count to use static import with * **999**

Prompt is not case sensitive | Cancel case sensitivity

File | Settings | Editor | General | Code Completion | **Match Case**

Automatically generate serialVersionUID

  • Enter File | Settings | Editor | Inspections | **Java | Serialization issues**
  • After selecting Serializable class without 'serialVersionUID',
    In your class: Alt + Enter will prompt you to automatically create serialVersionUID.

Automatically generate @Override

  • Enter File | Settings | Editor | Inspections | **Java | Serialization issues**
  • Select Missing @Override annotation and select Error on the right side of Severity.
  • When you need to add an @Override method to the Class, press Alt + Enter and you will be prompted to automatically generate @Override

Set vertical bars in the code editing area

File | Settings | Editor | General | Appearance
image.png

Mouse wheel controls code font size

File | Settings | Editor | General | Mouse Control

  • ? Change font size with Ctrl + Wheel

Remove blank lines between comments and methods (optional)

File | Settings | Editor | Inlay Hints | Java | Code vision | Show hints for

Annotation rendered view mode (optional)

To read more clearly

File | Settings | Editor | General | Appearance | ? **Render documentation comments**

Automatically remove trailing spaces when saving files (optional)

File | Settings | Editor | General | Column On Save

  • Remove trailing spaces on Modified lines

Automatic compilation**(optional)**

File | Settings | Build, Execution, Deployment | Compiler

  • Build project automatically | Automatic compilation, there will be a hot update effect after turning it on
  • Compile independent modules in parallel | Independent module parallel compilation

The previous project will not be opened by default after startup**(optional)**

File | Settings | Appearance & amp; Behavior | System Settings | Project

  • ?Reopen projects onstartup

Eclipse shortcut keys (optional)

Why is the full name of idea (IntelliJ IDEA) so strange?
Answer: Actually, it’s not surprising. This software company was based on Eclipse when it was founded.
Question: So what happened?
Answer: The name comes from a conversation why u use Eclipse? i have no idea
intelligent idea

File | Settings | Keymap | **Eclipse**
My personal suggestion is that if you are used to ideas, it is good to use the ones that come with them

Software problem solving

Development stuck

Configure VM Options to change startup configuration parameters
  • Select Help in the top navigation bar and click Edit Custom VM Options
  • We modify it appropriately (according to the configuration of the personal computer) and save the file::
-Xmx1024m // The maximum memory limit is: 1024MB (1GB) | java heap maximum value, the maximum memory used
-Xms256m // The initial memory allocation size is: 256MB | Initial Heap size, the minimum memory used, this value should be set larger when the CPU performance is high
-XX:ReservedCodeCacheSize=128m //Code buffer size: 128MB
-XX: + UseG1GC
-server: must be used as the first parameter, for better performance when using multiple CPUs
-XX:PermSize: Set the permanent storage area of the memory
-XX:MaxPermSize: Set the maximum memory permanent storage area
-XX:MaxNewSize:
 + XX:AggressiveHeap makes Xms meaningless.
-Xss: Stack size of each thread
-verbose:gc real garbage collection information
-Xloggc:gc.log specifies the garbage collection log file
-Xmn: the heap size of the young generation, generally set to 3 or 1/4 of Xmx
-XX: + UseParNewGC: shorten minor collection time
-XX: + UseConcMarkSweepGC: shorten the major collection time
-Xmx4096m
-Xms4096m
-XX:ReservedCodeCacheSize=256m
-XX: + UseG1GC
  • Make the configuration effective: Select File ---> Invalidate Caches (clean up invalid caches)
  • Keep the default options, select OK to clear cache and restart IDEA (End).

Author: ThinkStu
Source: http://blog.csdn.net/qq_35760825/article/

Increase compilation memory (required)

File | Settings | Build, Execution, Deployment | Compiler

  • Share build process heap size (Mbytes) 2048
Uninstall unnecessary plug-ins (optional)

Open settings-plugins
Everything that has nothing to do with Java development can be uninstalled.

Turn off compilation checking

Appropriately turn off the inspection of Inspections of the idea or completely turn off the inspection of Inspections during development, and then turn on the inspection after the development is completed. You can close them all. There is a head logo in the lower right corner of the idea. You can click it to adjust the idea inspection level~

Change operating system shortcuts

First of all, after installing the IDEA software, the automatically generated desktop startup methods are all 32-bit. If you have a 64-bit system and we use this shortcut to run large projects, it will usually be very laggy. Find the installation directory of idea, enter the bin file, find the program named idea64, generate a shortcut, and use this shortcut to start

Close alibaba code review

You can turn it off during development, Alibaba check plug-in Alibaba Java Coding guide

Increase memory

If your development machine does not have enough memory 8<=RAN, you should still think about how to increase the machine’s CPU usage and RAM usage.

Reference sources

  • IDEA is very slow, please tell me how to optimize it - V2EX
  • Solve the problem of IDEA development lag - Attack of the Little Cai Bird - Blog Park


CC BY-NC-SA Attribution-NonCommercial-ShareAlike