Difference between revisions of "IntelliJ IDE"

(Plugins list)
 
(19 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
[[Category:Development]]
 
[[Category:Development]]
 +
 +
This page explains how to setup the IntelliJ IDE ''ultimate'' edition.
 +
 +
All the settings that follows will be apply globally.
  
  
Line 45: Line 49:
  
 
[[File:Intellij tune idea v2.png|1024px|IntelliJ tune IDEA]]
 
[[File:Intellij tune idea v2.png|1024px|IntelliJ tune IDEA]]
 +
 +
 +
Global points:
 +
* ''Build tools''        : enable ALL
 +
* ''Cloud''              : only if required
 +
* ''Swing''              : DISABLE
 +
* ''Android''            : only if required
 +
* ''Plugin development'' : DISABLE
 +
  
  
Line 59: Line 72:
 
* AspectJ
 
* AspectJ
  
 
===Build Tools===
 
 
All of them!
 
  
  
 
===Web development===
 
===Web development===
  
[[File:IntelliJ web development.png|800px|IntelliJ Web Frameworks]]
+
[[File:Intellij web development.png|800px|IntelliJ Web Frameworks]]
  
  
Line 75: Line 84:
  
  
Version control
+
===Version control===
- GitHub
+
 
- Subversion
+
[[File:Intellij version controls.png|800px|IntelliJ version controls]]
- Git
+
 
 +
 
 +
At least enable:
 +
* GitHub
 +
* Subversion
 +
* Git
  
  
 
===Test tools===
 
===Test tools===
  
[[File:IntelliJ test tools.png|800px|IntelliJ test tools]]
+
[[File:Intellij test tools.png|800px|IntelliJ test tools]]
  
  
Line 102: Line 116:
 
* JSR45 (=== JSPs)
 
* JSR45 (=== JSPs)
  
Cloud
 
... enable if you use it
 
  
Swing
+
==Featured plugins==
... disable
+
 
 +
[[File:Intellij featured plugins.png|800px|IntelliJ Featured Plugins]]
 +
 
 +
 
 +
If you want to do some web development, then you should really install ''nodeJs'' and ''Live Edit Tool''!
 +
 
 +
 
 +
 
 +
=Configuration=
 +
 
 +
You can access the configuration from the launcher screen: ''Configuration → Settings''.
 +
 
 +
 
 +
==Settings==
 +
 
 +
 
 +
===IDE settings===
 +
 
 +
Settings → Editor → '''General'''
 +
* Change font size (Zoom) with Ctrl+mouse wheel
 +
 
 +
[[File:Intellij editor general settings.png|none|IntelliJ general settings]]
 +
 
 +
 
 +
 
 +
Settings → Editor → '''Appearance'''
 +
* Show line numbers
 +
* Show breadcumbs for XML files
 +
 
 +
[[File:Intellij editor appareance settings.png|none|IntelliJ Appearance settings]]
 +
 
 +
 
 +
 
 +
Settings → Editor → '''Editor tabs'''
 +
* Mark modified tabs with aterisk
 +
 
 +
[[File:Intellij editor editor tabs settings.png|none|IntelliJ editor tabs settings]]
 +
 
 +
 
 +
 
 +
===Imports===
 +
 
 +
Settings → Editor → '''Auto import'''
 +
 
 +
* Enable: Optimize import on the fly
 +
* Enable: Add unambiguous imports on the fly
 +
 
 +
 
 +
[[File:Optimize import intellij.png|none|IntelliJ import settings]]
 +
 
 +
 
 +
 
 +
===Maven settings===
 +
 
 +
Settings → Build, Execution, Deployment → Maven
 +
* Force check of snapshots
 +
* Set Maven home directory
 +
* Set Maven settings file
 +
 
 +
[[File:Intellij maven settings.png|1024px|IntelliJ maven settings]]
 +
 +
 
 +
Settings → Build, Execution, Deployment → Maven → Importing
 +
* Import Maven projects automatically
 +
* Create module groups for multi-module Maven projects
 +
* Download ''sources'' and ''documentation'' (optional)
 +
 
 +
[[File:Intellij maven import settings.png|1024px|IntelliJ maven import settings]]
 +
 
 +
 
 +
 
 +
===Gradle settings===
 +
 
 +
Settings → Build, Execution, Deployment → Gradle
 +
* Set the ''service directory path''
 +
 
 +
[[File:Intellij gradle settings.png|900px|IntelliJ gradle settings]]
 +
 
 +
 
 +
 
 +
 
 +
 
 +
===Application servers===
 +
 
 +
Adjust your Application Servers path and settings.
 +
 
 +
 
 +
===Tomcat===
 +
 
 +
0. Download Tomcat from the official website: http://tomcat.apache.org/
 +
 
 +
 
 +
1. Enable tomcat plugin
 +
 
 +
* Settings → Plugins
 +
* Search for tomcat
 +
* Enable the plugin
 +
 
 +
[[File:IntelliJ tomcat setup 00.png|1024px|IntelliJ tomcat setup 00]]
 +
 
 +
 
 +
2. Register server
 +
 
 +
* Settings → Build, Execution, Deployment → Application servers
 +
* Click on the '+'
 +
* Add a new Tomcat Server
 +
 
 +
[[File:IntelliJ tomcat setup 01.png|1024px|IntelliJ tomcat setup 01]]
 +
 
 +
 
 +
* Fill up the form
 +
* The new server should appears
 +
 
 +
 
 +
[[File:IntelliJ tomcat setup 02.png|1024px|IntelliJ tomcat setup 02]]
 +
 
 +
 
 +
 
 +
===Languages & frameworks===
 +
 
 +
Set your '''JavaFX''' scene builder home.
 +
 
 +
As a reminder, you can download scene builder from Oracle: http://www.oracle.com/technetwork/java/javase/downloads/javafxscenebuilder-info-2157684.html
 +
 
 +
 
 +
 
 +
 
 +
=3rd party Plugins=
 +
 
 +
==Plugins list==
 +
 
 +
You should manually install the following plugins:
 +
* Code quality (inspection)
 +
** '''CodeMetrics''' : to know the cyclomatic complexity of each method. A must have
 +
** '''SonarLint''' + '''SonarQube Community plugin''' : to see the alerts inside IntelliJ
 +
** Code smell detector : to have alerts about bad / suspicious practices
 +
** Checkstyle-IDEA : to have the Checkstyle rules
 +
** Findbugs-IDEA : to have the FindBugs rules
 +
** PMDPlugin : to have the PMD rules
 +
* Utilities
 +
** Maven helper : to view the maven dependencies graph
 +
** PlanUML: for UML diagrams (sequences, states, use-cases, etc.)
 +
* Being efficient
 +
** Rainbow brackets
 +
** Lombok
 +
** Key promoter X
 +
** Save actions
 +
** Alibaba Java Coding Guidelines
 +
 
 +
 
 +
See Alibaba coding guidelines: https://plugins.jetbrains.com/plugin/10046-alibaba-java-coding-guidelines/
 +
 
 +
==Configuration==
 +
 
 +
Some plugins must be enabled.  
  
Android
+
* Go to '''File''' > Settings > '''Other settings'''
... enable if you use it
+
** Checkstyle
 +
*** Set scan scope to "Only java sources (including tests)"
 +
*** Enable the "Google checks"
 +
** FindBugs-IDEA
 +
*** Add plugins: "fb-contrib plugin" + "Find Security Bugs"
 +
** SonarLint General Settings
 +
*** Register sonarQube server. (i) to generate a Token go to "SonarQube" > login > My account > security
 +
** SonarLint Project settings
 +
*** Select the new server
 +
*** Select the SonarQube project
 +
** SonarQube
 +
*** Add Sonar server
  
Other tools (all)
 
  
Plugin development
+
=Fonts=
... disable
 
  
 +
https://github.com/dejavu-fonts/dejavu-fonts/releases
  
  
IntelliJ_java_frameworks.png
+
https://stackoverflow.com/questions/51390317/get-intellij-dejavu-sans-mono-font-on-windows-10
IntelliJ_web_development.png
 
intellij_version_controls.png
 
intellij_test_tools.png
 
intellij_application_servers.png
 
intellij_tune_your_idea.png
 
intellij_featured_plugins.png
 

Latest revision as of 20:34, 23 October 2019


This page explains how to setup the IntelliJ IDE ultimate edition.

All the settings that follows will be apply globally.


Requirements

IntelliJ requires a Java JDK to work, see Java JDK setup.



Installation

Get binaries

Download IDEA IntelliJ from the official website: https://www.jetbrains.com/idea/

Take the IntelliJ Ultimate Edition version.


Linux

  • Download the IdeaU-xxx.tar.gz' package
  • Copy the package into your dev directory
  • Launch the application
tar -xzvf IdeaU-xxx.tar.gz
cd Idea-IU-xxx/bin
./idea.sh &


First launch configuration

During first launch you'll be ask a bunch of questions. The first are easy, then you'll to configure your environment. Here are my settings:


Tune your IDEA

IntelliJ tune IDEA


Global points:

  • Build tools  : enable ALL
  • Cloud  : only if required
  • Swing  : DISABLE
  • Android  : only if required
  • Plugin development : DISABLE


Java Frameworks

IntelliJ Java Frameworks


  • J2EE
  • Hibernate
  • Grails
  • GWT
  • Spring
  • AspectJ


Web development

IntelliJ Web Frameworks


All but:

  • HAML
  • Flash/Flex


Version control

IntelliJ version controls


At least enable:

  • GitHub
  • Subversion
  • Git


Test tools

IntelliJ test tools


  • jUnit
  • TestNG-j
  • Coverage


Application servers

IntelliJ Application Servers


  • Application servers view
  • jBoss
  • Tomcat and TomEE
  • Glassfish
  • JSR45 (=== JSPs)


Featured plugins

IntelliJ Featured Plugins


If you want to do some web development, then you should really install nodeJs and Live Edit Tool!


Configuration

You can access the configuration from the launcher screen: Configuration → Settings.


Settings

IDE settings

Settings → Editor → General

  • Change font size (Zoom) with Ctrl+mouse wheel
IntelliJ general settings


Settings → Editor → Appearance

  • Show line numbers
  • Show breadcumbs for XML files
IntelliJ Appearance settings


Settings → Editor → Editor tabs

  • Mark modified tabs with aterisk
IntelliJ editor tabs settings


Imports

Settings → Editor → Auto import

  • Enable: Optimize import on the fly
  • Enable: Add unambiguous imports on the fly


IntelliJ import settings


Maven settings

Settings → Build, Execution, Deployment → Maven

  • Force check of snapshots
  • Set Maven home directory
  • Set Maven settings file

IntelliJ maven settings


Settings → Build, Execution, Deployment → Maven → Importing

  • Import Maven projects automatically
  • Create module groups for multi-module Maven projects
  • Download sources and documentation (optional)

IntelliJ maven import settings


Gradle settings

Settings → Build, Execution, Deployment → Gradle

  • Set the service directory path

IntelliJ gradle settings



Application servers

Adjust your Application Servers path and settings.


Tomcat

0. Download Tomcat from the official website: http://tomcat.apache.org/


1. Enable tomcat plugin

  • Settings → Plugins
  • Search for tomcat
  • Enable the plugin

IntelliJ tomcat setup 00


2. Register server

  • Settings → Build, Execution, Deployment → Application servers
  • Click on the '+'
  • Add a new Tomcat Server

IntelliJ tomcat setup 01


  • Fill up the form
  • The new server should appears


IntelliJ tomcat setup 02


Languages & frameworks

Set your JavaFX scene builder home.

As a reminder, you can download scene builder from Oracle: http://www.oracle.com/technetwork/java/javase/downloads/javafxscenebuilder-info-2157684.html



3rd party Plugins

Plugins list

You should manually install the following plugins:

  • Code quality (inspection)
    • CodeMetrics : to know the cyclomatic complexity of each method. A must have
    • SonarLint + SonarQube Community plugin : to see the alerts inside IntelliJ
    • Code smell detector : to have alerts about bad / suspicious practices
    • Checkstyle-IDEA : to have the Checkstyle rules
    • Findbugs-IDEA : to have the FindBugs rules
    • PMDPlugin : to have the PMD rules
  • Utilities
    • Maven helper : to view the maven dependencies graph
    • PlanUML: for UML diagrams (sequences, states, use-cases, etc.)
  • Being efficient
    • Rainbow brackets
    • Lombok
    • Key promoter X
    • Save actions
    • Alibaba Java Coding Guidelines


See Alibaba coding guidelines: https://plugins.jetbrains.com/plugin/10046-alibaba-java-coding-guidelines/

Configuration

Some plugins must be enabled.

  • Go to File > Settings > Other settings
    • Checkstyle
      • Set scan scope to "Only java sources (including tests)"
      • Enable the "Google checks"
    • FindBugs-IDEA
      • Add plugins: "fb-contrib plugin" + "Find Security Bugs"
    • SonarLint General Settings
      • Register sonarQube server. (i) to generate a Token go to "SonarQube" > login > My account > security
    • SonarLint Project settings
      • Select the new server
      • Select the SonarQube project
    • SonarQube
      • Add Sonar server


Fonts

https://github.com/dejavu-fonts/dejavu-fonts/releases


https://stackoverflow.com/questions/51390317/get-intellij-dejavu-sans-mono-font-on-windows-10