IntelliJ IDEA

Advanced Java Editor


Easy class exclusion

Easy class exclusion from completion & auto-import helps hide unwanted class, such as java.awt.List.

 

to the top

Automated code folding

To overcome the verbosity of certain Java language constructs, IntelliJ IDEA can automatically fold generic parameters, one-method anonymous classes (a.k.a. poor man's closures) and i18n-ized messages.

 

to the top

Enhanced code completion

Pressing Ctrl-Shift-Space twice allows you to find values of the expected types which are two steps away (can be retrieved through a chained method call). It can also automatically insert conversions from collections to arrays and back.

Enhanced code completion

 

to the top

Java Code Completion

screenshot

Basic code completion (Ctrl + Space) finalizes a class, method, variable name, and Java keywords, plus commonly used names for fields and variables depending on their type. It can be automatically invoked, popping up the available methods and fields list.
Read more about code completion.

The SmartType code completion (Ctrl + Shift + Space) filters the method and variable list to match the expected expression type. It works at the right-hand side of assignments, in variable initializers, return statements and anywhere else where IntelliJ IDEA can guess the expected type. Read more about smart completion.

The Class Name (Ctrl + Alt + Space) Java code completion finishes a Java class name anywhere in the project or libraries independently of imports in the current file.

All types of Java code completion support "CamelHumps", so you can enter only the capitalized letters in case of long and complex method or field names (e.g. "aAL" instead of addActionListner).

 

to the top

Popup parameter info

screenshot

When coding a new method call, a tooltip showing the target method signature pops up after you type the opening "(" character or invoke code completion features. The parameter highlighted in bold is the one on which the caret is currently positioned. You can control the popup interval or disable the popup completely in Completion settings.

For existing calls, press Ctrl + P anywhere inside a method call to pop up the target method's signature. Again, the parameter shown in bold is the one on which the caret is currently positioned. When the popup is shown, you can use the Tab key for quick navigation between parameters in the code.

 

to the top

Import Assistant and Optimizer

screenshot

Import Assistant helps to automatically insert import statements while typing code, and detects non-imported classes found in pasted blocks of code. When you use the name of a Java class from anywhere in a project library, but the class has not been imported into the current file, a hint with the suggestion to import the class pops up over the text. Pressing Alt + Enter inserts the import statement. Moreover, when you copy a block of text from one file and paste it into another, IntelliJ IDEA automatically detects all the classes that are used inside the copied block but have not been imported to the destination file. It then shows a list of all such classes and allows you to select classes you want to import into the new file.

Import optimizer (Ctrl + Alt + O) allows users to quickly manage imports in a file or set of files: remove unused imports, reorder, and clarify them. There is also a flexible set of options to match your preferences for setting the layout of import statements.

 

to the top

Copy path

screenshot

Having positioned the caret at a class, file or directory (in any of the project views) you only need to press a shortcut Ctrl + Shift + C to store the full path to the selected element in the clipboard for future use both inside and outside IntelliJ IDEA.

 

to the top

Copy reference

screenshot

You can copy a reference to any Java symbol into the clipboard, with a single keystroke. Position the caret at a symbol in the editor or one of the project views and press Ctrl + Alt + Shift + C. When you later paste the copied value, it will be inserted with proper reference resolution with regard to the current context.

 

to the top