Java

Java 12

IntelliJ IDEA 2018.3 comes with initial support for Java 12! Preview the Raw String Literals (JEP
326
) in the IDE now and take advantage of loads of useful inspections and quick-fixes. For example, convert multiline string literals to raw string literals
and vice versa, detect redundant leading or trailing backticks (`), and more. Learn more

Read the legal notice here

Please note that Java 12 is not released yet. You must accept the terms of the legal notice of the beta Java specification to enable support for Java 12.
The implementation of an early-draft specification developed under the Java Community Process (JCP) is made available for testing and evaluation purposes
only and is not compatible with any specification of the JCP.

Detecting more duplicates

IntelliJ IDEA can now quickly spot duplicates even in more complicated cases, such as if the variable names are different. The IDE will display duplicates
in the diff viewer, so you can compare them side by side to one another.

Java Stream API improvements

The IDE detects situations where unnecessary sorted calls are made before the subsequent min call. A quick-fix to remove the redundant sorted call is
provided as well.

Data flow enhancements

We’ve created a new data-flow-based inspection called Condition is covered by further condition. It detects situations where the first
condition is unnecessary as it’s covered by the second one. The IDE provides a quick-fix to remove such redundant conditions.

Redundant usages of a suppressed inspection

IntelliJ IDEA now detects redundant usages of the @SuppressWarning annotation, or // noinspection line comment, or /** noinspection */ JavaDoc comment.
When a suppressed inspection no longer addresses any warnings in the associated method body, class, or statement, the IDE will not only give you a
warning, but it will also provide a quick-fix to remove such unnecessary annotations and comments.

Editor

Multiline TODO comments

IntelliJ IDEA 2018.3 now supports multiline TODO comments, now the first and all subsequent TODO comment lines are highlighted in the
editor
and listed in the TODO Tool Window. Simply add an indent starting from the second line of your multiline TODO comment, and the IDE will
differentiate it from an ordinary comment.

Disabling code formatting for specific files and folders

We’ve made it possible to lock off certain files from formatting, imports optimization, and code rearrangement – actually from any operations where
formatting is involved, explicitly or implicitly. Simply create a scope and add to it any files that must not be formatted!

New indentation status bar

IntelliJ IDEA displays the size of the indent in the current file in a new indentation status bar. If the file’s indentation doesn’t match
the current settings of your project, an asterisk will be added to the indent view.
You now have a choice of actions that control the current indentation in the status bar popup.

Improvements in EditorConfig support

The IDE now provides syntax highlighting and code completion for EditorConfig files. You can also use the new indentation status bar popup
to easily navigate to the EditorConfig file being used.

Version Control

GitHub Pull Requests

IntelliJ IDEA comes with initial support for GitHub Pull Requests. Preview all the pull requests in your GitHub repository from the brand new GitHub
Pull Requests tool window. Use the diff to preview the changes, or create a local branch from a Pull Request via the context menu then merge
it as a regular branch.

“History up to Here” can show the full history

Previously, the History up to Here action only displayed the file's history up to the selected commit, but now it can show what happened
to the file afterward, by switching to Show All Branches on the toolbar. This could be especially useful if the file was later deleted,
as it is no easy task to find out about such occurrences.

Advanced navigation in VCS Log

You can now use the Forward and Back navigation actions while you are in the VCS Log after you navigate from the commit hashes to the
commit in the VCS Log tab, or after you use the Go to hash/branch/tag action. Use the left and right arrow keys to
navigate to the child or parent commit.

Ignore whitespaces

Now the IDE can ignore whitespace changes while merging. In the Merge Revisions for dialog, there is a new Ignore
drop-down menu with options to hide or trim whitespace changes on merge.

Copy a file from one Git branch to another

IntelliJ IDEA 2018.3 allows you to easily copy a file from one Git branch to another via the handy new Get from Branch action which is
available from the Files tab of the Compare branches dialog.

Branch name in commit dialog

The IDE displays the branch name you are committing the files to, right inside the Commit dialog. We have implemented this for Git,
Mercurial, and SVN.

Preview differences in the File History tab

Diff Preview is now available in the File History tab of the Version Control tool window.

Git submodules support

Search and Replace

New Search Everywhere

IntelliJ IDEA 2018.3 introduces a new better way to navigate over the project and the IDE. Please give a warm welcome to reworked Search
Everywhere!
Actually, it’s much more than just Search Everywhere now as it incorporates all of the other navigation dialogs: Search
Everywhere,
Find Action, Go to class, Go to file, and Go to symbol. Note that all these navigation
dialogs are still accessible through their own keyboard shortcuts, as before.

Search for multiline fragments in Find in Path

Now it’s possible to perform search / replace for a multiline fragment in Find in Path / Replace in Path
dialogs. You no longer need to use regular expressions to perform a multiline search.

New Structural Search & Replace dialogs

IntelliJ IDEA 2018.3 delivers an updated and streamlined Structural Search & Replace dialog. Now autocompletion works in the predefined
templates in the search field. You can view the search history in the drop-down menu under the search icon. Scope configuration is now easier and more
flexible, too. The complicated Edit Variables form has been replaced with a filters panel, which you will find in the updated dialog.

Plugins Preferences Page

We've updated the Plugins page in Preferences (Settings) to make it easier to manage, install,
uninstall, and update plugins. Now you can not only search for plugins by name but also by tags. It gets even better, as you now can also sort the results
by downloads, name, rating, featured, or updates.

Run Anything

Run Anything

IntelliJ IDEA 2018.3 comes with a new centralized way to run a command in the IDE via the new Run Anything action (Double Ctrl). Use the
new action to launch a run configuration, including Maven and Gradle, run a Gradle task, or run terminal commands.

Debug Anything

Simply press the Shift key to switch the Run Anything dialog to the Debug Anything mode.

Kotlin

Kotlin 1.3 support

Just recently Kotlin had a major release for the language, tooling, and libraries. IntelliJ IDEA can help you migrate your Kotlin project to Kotlin 1.3 and
perform all the required changes in obsolete code to make it compliant with the latest state of the libraries.

Enhancements in multiplatform project support

In Kotlin 1.3, the model of multiplatform projects has been
completely reworked in order to improve expressiveness and flexibility, and to make sharing common code easier. IntelliJ IDEA provides a set of project
examples that cover the most common use cases.

New Kotlin Inspections & Quick-fixes

Since the release of IntelliJ IDEA 2018.2, the Kotlin plugin has got over 30 new inspections, quick-fixes, and intentions that help you write a code much
more effectively.

Spring Initializr improvements

Now when you create a project using Spring Initializr, the IDE will suggest installing or enabling appropriate plugins to ensure that
support for all
selected technologies is present.

Better JPA and Spring Data support for Kotlin

Now the IDE can automatically inject JPQL into query strings, providing completion for entity names and parameters. You can write Spring Data interfaces in
Kotlin, and IntelliJ IDEA will understand the entities you use. The IDE provides smart completion for method names, and quick-fixes for parameters.

Accessibility

High-contrast theme

We are committed to providing a great experience for all of our users. With IntelliJ IDEA 2018.3, we’re rolling out a few important accessibility
improvements, such as the brand new High-contrast theme.

Better support for screen readers

We’ve improved our support for screen readers, allowing them to read line numbers, VCS annotations, the debugger, and our gutter icons.

Now you can define your own Async annotations in the Async Annotations Configuration dialog.

Action to remove all breakpoints

IntelliJ IDEA 2018.3 comes with handy new actions that remove all the breakpoints in a project, or all the breakpoints in the file. You can assign your
own shortcuts for these in Preferences (Settings) | Keymap | Debugger Actions.

Maven

Now, it is possible to delegate all your build and run actions to Maven. Go to Preferences (Settings) | Build, Execution, Deployment | Build
Tools
| Maven | Runner and select the new Delegate IDE build / run actions to maven option.

Terminal

Improvements were made to the embedded terminal, so now IntelliJ IDEA 2018.3 will save the terminal tab names, current working directory,
and shell history
when you close the project or IntelliJ IDEA.

We’ve also redesigned the terminal tabs to look like the other tool window tabs.

Run Configuration

Macros in Java run configurations

IntelliJ IDEA now allows you to use macros in the ‘Application’ and ‘npm’ run configurations. You can enter a predefined macro in the Program
arguments field.

Ability to use text files as input

If you want to use a text or log file as an input, simply select the Redirect input from option in the Run/Debug
Configurations
dialog, and then specify the path to the file that has your input data.

Run configuration is run as a single instance only, by default

By default, a run configuration is now run as a single instance only. However, there is the Allow running in parallel option in the
Run/Debug Configuration dialog which you can enable if you ever want to run several instances of the same run configuration in
parallel.

JavaScript & TypeScript

Autoimports in JavaScript

IntelliJ IDEA can now automatically add imports for symbols from the project’s dependencies, in JavaScript files. This works as long as there’s a
TypeScript definition file inside the package, or the package contains sources written as ES module.

Improved Angular support

Code completion and Go to definition for variables, pipes, async pipes, and template reference variables in Angular templates are now more accurate.

Support for Node.js worker threads

You can now debug Node.js workers in IntelliJ IDEA – just make sure that you are using Node.js 10.12 or above and the --experimental-worker
flag. The IDE provides code completion for the worker threads’ API.

More flexibility with ESLint and TSLint

You can override severity levels from the linter’s configuration file and see all problems from the linter as errors or warnings.

For TSLint errors, press Alt-Enter and then the right arrow key. Now you have an option to add a special TSLint disable
comment for this rule.

Support for Helm resource files

Navigation in Helm resource files

The IDE lets you navigate from a value’s usage to its declaration in the chart’s values.yaml file.
You can use the gutter icons to navigate between a label definition and its selector.
Moreover, there are new gutter icons in values.yaml files that you can use to navigate to overridden / overriding values.

Helm template result preview

The IDE can now preview the result of the Helm template rendering in the diff. Simply choose the new Kubernetes | Helm Template
action from the context menu.

Helm dependency update

A new Helm Dependency Update action is available to download the external tgz dependencies (or update the existing ones) and display
them in the project tree.

Database Tools

Cassandra database

With this release, we've added support for one more NoSQL database – Cassandra.

Improvements in SQL code completion

Now code completion works for: non-aggregated fields in GROUP BY, all the columns are listed in SELECT, MERGE, and INSERT INTO table variable, named
parameters of stored procedures, numeric fields in SUM() and AVG(), FILTER (WHERE) clause, and field types in SQLite.

Introduce table alias

You can now use the Introduce table alias action to create an alias directly on the table, and this alias will automatically replace
usages of the table’s name.

Single connection mode

Each new console means a new connection. In IntelliJ IDEA 2018.3 though, it’s possible to use only one connection for the data source, and have all
consoles then use this single connection. You can view any temporary objects in the database tree. Also, it’s possible to use the same transaction in
different consoles.
To turn it on, go to Data source properties | Options | Single connection mode.

2018.2 Jul 25

Java

Java 11

IntelliJ IDEA 2018.2 brings support for the upcoming Java 11. The IDE now supports local-variable syntax for lambda parameters according to the JEP 323, so you can use the var keyword in lambda expressions.

Preview data flow information in the editor

Type hints for long method chains

IntelliJ IDEA displays type hints for long method chains. This is especially useful when you want to see the type of each call as a type hint for long method chains
with generics.

Configure Quick Documentation to pop-up together with autocompletion

It’s now possible to configure Quick Documentation to pop-up together with autocompletion. Simply enable the Show the documentation pop-up in…
option in Preferences/Settings | Editor | General | Code Completion. Previously, the documentation pop-up could be configured to be shown only with explicitly invoked
completion.

New preview panel for Extract Method

IntelliJ IDEA 2018.2 introduces a new preview panel for the Extract Method refactoring. It lets you see what the results of your refactoring will
look like, before confirming the changes. This can be very useful when you refactor code fragments with duplicates.

New @Contract annotation return values

IntelliJ IDEA supports the @Contract annotation, which allows you to specify a method reaction when a particular parameter is passed. The contract
information is available for various inspections and actions, which use it to produce better warnings and remove false-positives.

In version 2018.2, we’ve extended the @Contract annotation to support more return values:

new – every time the method is executed, it returns a non-null new object.

Smarter Join Line action

We’ve upgraded the Join Lines action (Ctrl+Shift+J on Linux/Windows/macOS). Now, on any method call where the return type is the same as the qualifier
type, the
action will merge multiple method calls into a chained call. This also works on a declaration or assignment line with a subsequent call.

Join Lines now produces a cleaner result with a nested if, and when you are joining lines with an unnecessary 0.

Improved Stream API support

In IntelliJ IDEA 2018.2, we’ve improved support for Stream API so now it detects sorted streams that collect an unsorted collection. This indicates that either
the sorting is unnecessary or that using the collector or collection is wrong.

In addition, there is a new warning about a redundant distinct() call before collect(toSet()), because when collecting to a Set, the result is
always distinct
anyway.

Editor

Jump outside closing bracket/quote with Tab

Now, while typing, you can use Tab to navigate outside the closing brackets or closing quotes. This works in Java, Kotlin, Groovy, SQL, PHP, JavaScript, and Python
files. To enable this
Tab behavior, go to Preferences/Settings | Editor | General | Smart keys and select Jump outside closing brackets/quote with Tab.

Underlining reassigned local variables and reassigned parameters

IntelliJ IDEA now underlines reassigned local variables and reassigned parameters, by default. The attributes for all the languages supporting this feature,
which for now include Java and Groovy, can be changed in Preferences/Settings | Editor | Color Scheme | Language Defaults | Identifiers | Reassigned.

For and while keywords highlighted

When you place the caret at the break or continue keyword, IntelliJ IDEA highlights the for or while keyword of the
corresponding loop.

User Interface

MacBook Touch Bar support

IntelliJ IDEA 2018.2 comes with support for the MacBook Touch Bar! Run, build, and debug your project, commit changes, and update the project right from the
Touch Bar. IntelliJ IDEA buttons are displayed in the app-specific area in the middle of the Touch Bar interface, and they are dependent on the context or which
modifier keys you press.

All available Touch Bar contexts can be customized on the Touch Bar page in Preferences | Appearance & Behavior | Menus and Toolbars.

Dark window headers

It's now possible to make the IntelliJ IDEA title bars darker on macOS. Go to Preferences | Appearance & Behavior | Appearance and select Use dark window
headers.

New Icons

We’ve rolled out some brand new icons! New cleaner and simpler icons on the IDE toolbar and tool windows reduce visual clutter and ensure better readability.
We believe that a clearer UI will help to maintain focus and productivity. Read the story behind the recently updated UI icons.

Updated IntelliJ theme on Linux

We’ve made the IntelliJ theme on Linux look more modern. The appearance of UI elements such as buttons, radio buttons, checkboxes, text fields, select controls, spinner, and tabs have
been updated.

Version Control

Easier resolve of merge conflicts

When working with Git, now it's much easier to find files with merge conflicts. For each changelist, the IDE groups such files under a new Merge Conflicts node.
Click the Resolve action link to open the Files Merged with Conflicts dialog.

Also, IntelliJ IDEA now displays Git branch names in the Files Merged with Conflicts dialog when you perform a pull, merge, or rebase. This updated dialog allows
you to group files by directory, which should come in handy if there are multiple files merged with conflicts.

Enhancements in VCS Log tab

You can now delete a Git tag from a commit right from the context menu of the Log tab.

Also, the Diff Preview Panel is now available in the VCS Log.

Additionally, you can open as many Log tabs as you like.

Favorite branches in Branch filter

We’ve added Favorite branches to the Branch filter in the Log tab, so you can now quickly filter commits by your favorite branches.

Browse repository at revision

If you use Git for version control, you can now explore the state of the repository based on any given revision. Use the new Browse Repository at Revision action,
which is available from the context menu in the VCS Log or from the file history, to open the required repository state in the Project Tool Window.

Multiple GitHub accounts

With IntelliJ IDEA 2018.2, you can configure as many GitHub accounts as you need (in Preferences | Version Control | GitHub), and set the default
GitHub account for
each of your projects.

Skip the Push dialog

While using the Commit and Push action in IntelliJ IDEA 2018.2, you can skip the Push dialog completely, or only show this dialog when pushing to
protected branches.
Customize this behavior in Preferences | Version Control | Git.

JVM Debugger

New breakpoint intentions

For debugging Java projects, IntelliJ IDEA 2018.2 includes several new handy breakpoint intention actions. No need to set up the properties of a particular
breakpoint by hand anymore – simply press Alt+Enter and the IDE will offer you the new breakpoint intentions, along with all the other available intentions.

Ability to filter a breakpoint hit by the caller method.

In IntelliJ IDEA 2018.2, you can stop at a breakpoint if a certain condition applies to the call stack.

The new Caller filter allows you to only stop at a breakpoint if it’s called from the specified method. Or, vice versa, it will not stop at a breakpoint if it’s
called from that method.

Gradle

Auto-discovery of the included buildSrc Gradle project

IntelliJ IDEA 2018.2 links Gradle’s buildSrc sources and their usages in a build, so you can now navigate from the build scripts to the buildSrc source.

Debug the Gradle DSL blocks

You can now debug a Gradle script in IntelliJ IDEA. Previously, you could debug a build.gradle file only as a Groovy script. With IntelliJ IDEA 2018.2, you can
now set a breakpoint not only at the top level of the Gradle build script, but also in the Gradle DSL blocks.

Configuration

Project Configuration

In IntelliJ IDEA 2018.2, you can exclude some of the transitive dependencies when adding a new repository library. Click the new Configure action link in the
library properties editor. In the new Configure Transitive Dependencies dialog that opens, select only the necessary transitive dependencies you want to add to
your current project.

IDE configuration

With IntelliJ IDEA 2018.2, you can assign shortcuts to actions right from the Find Action dialog. Simply select the needed action, press Alt+Enter,
and
enter a shortcut.

Differences Viewer

Compare any text sources

In IntelliJ IDEA 2018.2, you can open an empty Differences Viewer and paste any text you want to compare in its left and right panels. The new Open Blank
Diff
Viewer action can be found
in the Find Action dialog.

Kotlin

The bundled Kotlin plugin has been updated to Kotlin 1.2.51

Runnable Kotlin scratch files

Now you can run Kotlin Script scratch files and see the results right in the editor. Also, Kotlin Script scratch files can use the declarations from the code in the project.

Also, you can now create new Kotlin Script scratch files right from the Project view.

Convert end-of-line comments into block ones and vice versa.

Unused Deferred result

We’ve improved our support for kotlinx.coroutines: the IDE now reports unused Deferred results.

Merge call chain to kotlinx.coroutines.experimental.withContext

The IDE detects redundant async calls that are immediately followed by an await call, and suggests two new intentions to merge the call chain into
kotlinx.coroutines.experimental.withContext:

async {}.await() to withContext(DefaultDispatcher).

async(ctx){ }.await() to withContext(ctx) { }.

Scala

Improved display of implicit conversions and arguments

The Scala plugin now can show implicit conversions and arguments as inline hints. These provide navigation and extended information in a tooltip.
They are shown in the editor even when an implicit argument is used explicitly.

Improved autocompletion for type annotation and pattern matching

The Scala plugin now generates an exhaustive match for sealed types with inheritors, Java Enums, and Scala Enumerations.

In pattern matching completion the Scala plugin suggests a list of typed patterns for applicable classes and interfaces, while autocompletion with TAB updates the
name and type.

Scalafmt as an alternative to the built-in formatter

The Scalafmt formatter, which used to be a standalone plugin, is now part of the Scala plugin. It can be configured at Preferences/Settings | Editor | Code
Style | Scala.

Semantic Highlighting

Now, you can enable semantic highlighting for your project in Preferences/ Settings | Editor | Color Scheme | Scala, and assign distinct colors to a function’s
parameter, local variable, variable in a pattern-matching case clause, or variable in a sequence comprehension. Then you can scan through a function to track the
variable,
with no distracting action, isolate one of the variables, or switch focus to another variable.

JavaScript & TypeScript

Extract and convert React component

Use the new Extract Component refactoring to create a new React component, by extracting the JSX code from the render method of an
existing one.
You can also convert React class components into functional components, and vice versa, by using new intentions.

Find unused code

You can now find unused JavaScript code (or TypeScript code) on your client-side, by using the new Code Coverage feature. Start a JavaScript Debug configuration
with
coverage in the IDE
and interact with your app in Chrome. Then stop the configuration, and IntelliJ IDEA will show you the coverage report in the Coverage tool window. Info about the
coverage of files and
folders will display on the Project view.

New integrations with Angular CLI

In IntelliJ IDEA 2018.2, you can add new features to your Angular app thanks to the integration with ng add. Use the New… | Angular Dependency… action to install
libraries that support
installation with ng add without using the terminal.

To generate the code with Angular schematics, use the New… | Angular Schematic… action.

New JavaScript and TypeScript intentions

Lots of new JavaScript and TypeScript intentions are now available when you press Alt+Enter: Implement interface, Create derived class,
Implement members of an interface or abstract class, Generate cases for 'switch', and Iterate with 'for..of'.

Spring Integration

IntelliJ IDEA 2018.2 supports Spring Integration 5.0. There is also a new Spring Integration Diagram that visualizes the components in the system.
The
new diagram shows the gateways,
channels, bridges, etc. that have been configured for the application using XML or Java annotations.

Spring Boot

Spring Runtime Beans diagram

In IntelliJ IDEA 2018.2, you can select the new Diagram Mode option and visualize the dependencies between runtime beans of a Spring Boot application.

Start your application and click the new Diagram Mode icon in the right gutter of the Beans tab in the Run Dashboard. The IDE will
display the
Spring Runtime Beans diagram for the whole application.

Access HTTP requests mappings from the Run Dashboard

Manage your HTTP requests mappings from the Run Dashboard in IntelliJ IDEA 2018.2. After you run your application, select the request you need from the
Mappings
tab, and then either run your HTTP request straight away or open it in the editor-based REST client.

For GET methods, you have an additional option to open a HTTP request in the browser.

Smarter YAML with JSON Schemas

Code autocompletion now works for YAML data structures that have a JSON Schema file. IntelliJ IDEA automatically traces schemas from schemastore.org, and moreover, if you need to you
can manually add and configure JSON schema files Preferences/Settings | Languages & Frameworks | Schemas and DTDs | JSON Schema Mappings.

Database Tools

SQL log

Now you can use the console output to view every query that IntelliJ IDEA runs.
All queries from the IDE are now logged in a text file; you can open this file via Help | Show SQL log.

New SQL formatter

Now custom Code Style schemes can be used specifically for each data source. You can assign your Code Style schemes in the Options tab
of the data source properties.

Running stored procedures

Now you can execute stored Oracle and PostgreSQL procedures in IntelliJ IDEA.
You can either run a procedure by selecting the Execute action from the context menu of the procedure or by clicking the Run button in the toolbar
when opening the source code.

Source code migrations

Now, it’s much easier to update the source code of any objects,
you just double-click the objects and make changes, and then click Commit, and the migration dialog will preview the generated SQL code to update the
source code.

Docker

Navigate from compose nodes and containers

The Docker plugin now lets you navigate from compose nodes and containers to the corresponding compose and dockerfile files.

Wrapping words in Docker logs

This update adds a new Use Soft Wraps action for wrapping words in Docker logs. The new action is available via the gutter icon in the Log tab
of
the Docker Tool
Window.

New Context folder field

Now you can specify the base directory for executing a Docker build command for a dockerfile. To do this, use the new Context folder field in the Docker run
configuration. By default, the Context folder field is set to the parent folder of the specified dockerfile.

File Watcher plugin

Global file watchers

You can now store the configured File Watchers in the IDE settings and use them in different projects,
as it’s now possible to set a Global File Watcher and not just one per-project, as it was before.
This will help to reduce setup redundancy for developers working with many projects.

2018.1 Mar 27

Java

Enhancements in code completion

Completion in the Stream API chains is now aware of type casting.
Code completion can not only suggest a completion item according to the existing call filter (String.class::isInstance), but also for an automatically typecast completion item.

Data flow analysis

We’ve improved our data flow analysis so it can now track the relationships between variables like “greater than” and “less than.”
The IDE detects when a condition is always true (or false) in all the possible code paths when the variables are compared.

The IDE will now warn you when you try to assign a variable to the same value it already contains. This may help you detect and then remove some redundant code.

The data flow analysis now works for non-terminated stream API chains.

The IDE will also warn you about modifications to immutable collections.

Missing ServiceLoader declaration

IntelliJ IDEA 2018.1 has new Java 9 inspections and quick-fixes.
The IDE now checks that a service loaded by ServiceLoader is declared in the module-info.java file, and will offer a quick-fix to add a missing statement to the module-info.java file.

Creating missing class

For an unresolved class mentioned in module-info.java, the IDE will suggest creating the missing class, and create missing exported packages as well.
Note the IDE creates the package with the class in the required directory, as you can’t export an empty package in Java 9.

Idempotent body detection

The IDE will detect and warn you about the while-loops with an idempotent body, as in most cases this indicates a programming error and can lead to a program hang.

Move break-condition of infinite loop to loop condition

For while-loops, now you get a notification about a conditional break at the end or beginning of an infinite loop.
The IDE will suggest moving a break condition to a loop condition and offer a quick-fix to modify your loop.
Usually replacing a conditional break with a loop condition makes the code clearer.

Explicitly redundant close() call

IntelliJ IDEA now detects an explicitly redundant close() call of the resource at the end of a try-with-resources block.

Infinite Stream detection

IntelliJ IDEA will warn you about any infinite streams that weren’t short-circuited, as such operations can be completed only by throwing an exception.
Such code may result in an infinite loop or a running out of memory issue.

Copy constructor with missing fields detection

In IntelliJ IDEA 2018.1 you’ll get a notification if there is a copy constructor that doesn’t copy all the fields in a class.
The IDE considers fields with a transient modifier unnecessary to copy.

Sort array content

A new Sort content action is available in array initializers and varargs. This new action sorts content alphabetically.

User Postfix Completion template

The postfix code completion has been improved. The IDE now lets you create your own Java templates or edit and rename some of the predefined Java templates through Preferences | Editor | General | Postfix Completion.

Fix partially in Inspection Results

A new Fix partially button has been added to the right-hand pane of the Inspection Results Tool Window.
It appears when you have several options for fixing possible problems in the chosen scope.
All the suggested quick-fixes are grouped by the quick-fix type under the Fix partially button.
This new feature allows you to apply the required quick-fix to the chosen scope, and fix all affected cases in one go.

Test prefix in Code Generation

In IntelliJ IDEA you can generate a test class using the intention action.
With IntelliJ IDEA 2018.1, you can customize a test class template and create a test class with Test as a prefix.
Go to Preferences | Editor | Code Style | Java | Code Generation, and choose how the test class name should be generated.
By default, the IDE creates a test class with the Test as a suffix.

JUnit 5 @Tag annotation support

IntelliJ IDEA 2018.1 now supports the JUnit5 @Tag annotation so now you can include tagged classes and tagged methods, in the testing scope. Select the Tags (JUnit 5) option in the test kind field in the Run/Debug Configuration dialog. Use the Uniqueld field to filter tests according to their id.

JVM Debugger

Throw Exception

IntelliJ IDEA 2018.1 has a new Throw Exception action that allows you to throw an exception from a certain location in your program without changing the code. It is available from the Run | Throw Exception menu, or from the frame context menu during a debugging session.

Logging stacktrace to console

The IDE now allows you to print breakpoints stack traces to the console. You can enable the stack trace option in the Breakpoints dialog box. In IntelliJ IDEA, you can now observe multiple breakpoints stack traces at the same time in the Console log.

Copy current thread stacktrace

You can now copy the current thread stack trace via a new Copy Stack action which is available from the frame context menu.

Annotations for Async stack traces

With IntelliJ IDEA 2018.1 we’ve extended the Async stack traces feature so that you can now use the @Async.Schedule and @Async.Execute annotations to set up capture points that are not included in the default configuration. You just need to add Maven artifact as a dependency.

Java Compiler

There is a new Use --release option for cross-compilation (Java 9 and later) checkbox on the Java Compiler page at Preferences | Build, Execution, Deployment | Compiler | Java Compiler that is enabled by default. When you need to use the --source and --target options with Java 9 and link against Java 9 classes at the same time, you can disable this checkbox.

You can also use a specific version of the ECJ compiler. Select Eclipse from the Use Compiler drop-down menu, and specify the path to jar with the chosen compiler.

Editor

Folded code highlighting

If any issues have been detected in your code, now you can find them quicker than before. The IDE now highlights the folded code regions that contain errors or warnings, and colors such blocks according to their validation status.

Highlights the folded code regions with the search results

The IDE also highlights folded code regions if they contain any matches when you search through the current file.

Inline external annotations

In IntelliJ IDEA you can annotate your code with external annotations even when direct annotation of the source code is not possible (library classes). You can configure your annotations in the annotations.xml files, which are stored outside of your source code. Previously the IDE only showed the @ icon in the gutter near the externally annotated code; now the IDE shows these external annotations inline in your code.

Inferred Annotation Hints

IntelliJ IDEA now lets you view the automatic inferences of @NotNull or @Nullable annotations right in your source code (not only in the gutter icon near the inferred annotation, as it was before). You can enable the Show inferred annotations inline checkbox in the Preferences | Editor | General | Appearance.

Project Configuration

Add “provided” dependencies to classpath

A new Include dependencies with “Provided” scope checkbox has been added in the Run/Debug Configurations for the Application and Spring Boot configurations. This new option will be useful if you have the provided dependencies for the scope in your project, but you run your application both inside a container (where provided dependencies are supplied by the container) and outside a container (where provided dependencies are not automatically supplied).

For the Spring Boot applications, the Include dependencies with “Provided” scope option is enabled by default.

New Change Module Names... action

With IntelliJ IDEA, you can now change qualified names for multiple modules all at once. This is done via the new Change Module Names… action, from the context menu of the Project Structure dialog.

Search and Replace

Structural Search enhancement

With IntelliJ IDEA 2018.1, you can find method calls to annotated methods using Structural Search. You can select them from the existing search templates or create your own.

Replace in Path improvements

IntelliJ IDEA 2018.1 has the ability to preview a regex replacement in the Replace in Path dialog.

Kotlin

The Kotlin plugin bundled with the IDE has been updated to Kotlin 1.2.30

Pasting Kotlin code into a package

Now, in the Project Tool Window, you can paste a code fragment directly into a package, and the IDE will create a new Kotlin file with the pasted code.

Intentions for converting the scoping function calls

The Kotlin Plugin now offers new intentions that convert the scoping function calls let and run into each other, as well as also into apply and vice versa.

Groovy

New Convert to @CompileStatic refactoring action

Now you have a new action that’s very useful when you want to keep your code in Groovy and at the same time benefit from static compilation. To save you a lot of time migrating from existing Groovy code, this new refactoring annotates every groovy class in the scope with the @CompileStatic annotation.

This new refactoring action is available from the context menu Refactor | Convert to @CompileStatic.

Unnecessary import alias

IntelliJ IDEA 2018.1 reports unnecessary import alias for Groovy files. This new warning also works on static imports.

Scala

Inline hints

The editor can now show inline hints for parameter names, method result types, and variable types. You can also easily use the settings to customize when such a hint should be shown.

Structure View improvement

The Structure View now shows much more information about code. It displays final, abstract and access modifiers, nested definitions, primary constructor types, case class parameters as members, etc. The Structure View also provides you with an option to show all inherited members with their original class.

Refactoring: Inline function parameters

The refactoring is now capable of inlining functions with parameters. It correctly substitutes them with actual values.

Android

IntelliJ IDEA 2018.1 merges the changes from Android Studio 3.0 and includes dozens of new features, with the following major new ones

Layout Editor improvements

The Layout Editor has been improved: there is a new toolbar layout and icons, updated layouts in the component tree, a new error panel, and more.

Brand new profiling tools

IntelliJ IDEA 2018.1 now includes Android Profiler, a brand new suite of profiling tools that provide real-time data for your app’s CPU, memory, and network activity.

Device File Explorer Tool Window

The new Device File Explorer Tool Window displays the file and directory structure of your Android device or emulator.
Use this tool window to view, copy, and delete files on an Android device. You can access it through View | Tool Windows | Device File Explorer.

Build Instant Apps

The IDE now supports the ability to build Instant Apps – lightweight Android apps that can be run without installation. To start building Instant Apps, make sure that the Instant Apps Development SDK is installed. You can check which SDK tools are installed in Preferences | Appearance & Behavior | System Settings | Android SDK in the SDK tab.

Spring Boot

Access HTTP request mappings from the editor via the new REST client

Now, after you run a Spring Boot web application, a new icon is shown in the gutter for methods with @RequestMapping annotations that handle incoming HTTP requests. Click this gutter icon to open all the mappings in a scratch file with an .http extension and perform an HTTP request in the editor via the new REST client.

For methods with @GetMapping annotations, you have the choice to open the mapped URLs in a browser, or open a request in the HTTP Request Editor.

Note, that you need to add the dependency for the spring-boot-starter-actuator to your pom.xml or build.gradle file.

New gutter icons for beans registered in the application context

IntelliJ IDEA shows all the beans that are registered in the application context in the Beans tab in the Run Dashboard (or in the Run Tool Window). We’ve extended this functionality, and now this information is also available in the editor. The new gutter icons are shown next to the beans that are used at runtime.

Click these new gutter icons to navigate to the dependent beans.

Version Control

Partial Git commits

IntelliJ IDEA 2018.1 supports partial Git commits (git add -p). The IDE lets you associate the code chunks with a changelist. Create a changelist, put all the needed code chunks there, and then commit it. The IDE will now only commit the selected changes from the file and will skip all other changes. To add the code chunks to a commit, use the checkboxes in the gutter in the Diff pane of the Commit Changes dialog.

To move the code chunks between changelists, use the Move to Another Changelist... action from the context menu of the Diff pane in the Commit Changes dialog.

Alternatively, add code chunks to a changelist from the editor by clicking on a change marker in the gutter.

Toggle grouping of local changes by directory, module, or repository

With IntelliJ IDEA 2018.1, you can choose how to display your local changes by grouping them according to their directory, module, or repository. Use the new Group by icon available in the Local Changes tab in the Version Control Tool Window. Note that now you can select one of the grouping options or all three at once if needed.

Navigate by clicking on the commit hash

In the Log tab inside the commit detail panes, the IDE now highlights hashes of the commits you are referring to.
By simply clicking commit hashes you can jump to that commit in the Log tab. This works for Git and Mercurial. Also, the Commit Details pane of the Log tab has been redesigned

History for revision tab enhancement

IntelliJ IDEA lets you view detailed information about file changes by invoking the Show History for a Revision action on a file in the Log tab (available for Git integration).
In 2018.1, we’ve updated the History for revision tab so that now it works much faster. In addition to better performance, this tab has a refreshed UI resembling the Log tab.

Clone Repository

Moreover, the Clone Repository dialogs for Git and GitHub have been merged into one.

Autocompletion for GitHub repositories also works in the new Clone Repository dialog. You just need to log in to your GitHub account by clicking Log in to GitHub.

New shortcut for the Commit and Push… action

The IDE has a new default shortcut to perform the Commit and Push… action from the Commit Changes dialog. Please use Alt + Cmd + K (on macOS) or Alt + Ctrl + K (on Windows and Linux).

Git Branches pop-up

The Abort Rebase, Continue Rebase, and Skip Commit actions are now available from the Git Branches pop-up if there is an ongoing rebase process.

User Interface

New documentation UI

We’ve updated the Quick Documentation pop-up and made it clearer and more compact.
Information about the method’s parameters, type, and return type is now available for Java, JavaScript, and TypeScript in the updated Quick Documentation pop-up

Better HiDPI support

When you run the IntelliJ IDEA 2018.1 on Windows 8.1 (or higher), the IDE starts in per-monitor DPI-aware mode, with implemented support for the fractional scale factors of the monitor. Previously only integral scale factors were supported in the IDE. To switch back to the default mode, you need to set-up the VM option -Dsun.java2d.uiScale.enabled = false

JavaScript & TypeScript

TypeScript improvements

IntelliJ IDEA now supports the latest TypeScript 2.7 features, improves the Implement Members action, and adds the new Surround with type guard quick-fix for unresolved properties.

Create a new Vue project

With the Vue.js plugin installed in IntelliJ IDEA, you can use Vue CLI, an official tool for scaffolding Vue apps, to create new Vue projects.
To install Vue CLI, run npm install --g vue-cli in the terminal.

Reformat with Prettier

IntelliJ IDEA supports Prettier, an opinionated code formatter via Prettier plugin.
After you have the prettier package installed, the new Reformat with Prettier action will become available in IntelliJ IDEA.
You can format the selected code, a file, or a whole directory using Prettier.

Hunspell

Hunspell dictionary support

The Hunspell plugin that provides Hunspell dictionary support is now compatible with IntelliJ IDEA.
Compared to a plain list of words, Hunspell provides significantly faster and much more accurate misprint detection, with far fewer false positives.

Docker

Enhancement in Docker compose

The Docker plugin now supports Multiple Docker Compose files and respects not only a docker-compose.yml but also an optional docker-compose.override.yml file. You can add docker-compose.override.yml as you would any other override file, right after the base configuration file.

Docker compose services

The Docker plugin allows you to choose the services to run just after choosing the configuration files in the Docker-compose run configuration.

The plugin shows all the existing Compose projects, not only the ones deployed via the Docker-Compose run configuration.

Kubernetes

Support for YAML Kubernetes resource files

The brand new Kubernetes plugin supports the Kubernetes resource files from v1.5 up to the recently released v1.9.
The new plugin will look for the presence of apiVersion and other fields of this kind in the files, and if these are present, it will consider such files as Kubernetes resource files.

Completion in YAML Kubernetes resource files

To help you really quickly create the required YAML definition file for Kubernetes, start typing the required key and invoke Smart Completion.
The new plugin will auto-complete all the required keys from all the levels below.

Code completion now works for YAML Kubernetes resource files. The Kubernetes plugin offers the correct values you can use within the resources.

Kubernetes Live Template

The Kubernetes plugin has a built-in Live Template that allows you to quickly create the type of YAML Kubernetes resource file that you need. The new plugin now contains several predefined Kubernetes templates, and you can invoke the necessary Live Template by typing its abbreviation.

Navigation in YAML Kubernetes files

Use gutter icons to quickly navigate between a label definition and a label selector.

Jump from a label selector to a label definition inside the editor if there is a direct match for a label, both for the key and for the value.

Inspections for YAML Kubernetes files

The Kubernetes plugin will alert you whenever you select deprecated Kubernetes properties.

Also, you’ll get a warning for YAML files if you try to use properties that are not applicable for the specified elements with the applied apiVersion and kind of field.

Quick-fixes for YAML Kubernetes files

The plugin highlights elements with missing keys in YAML Kubernetes resource definition files and provides a quick-fix to add the required keys.

Also, you'll get a warning about redundant keys. Use the provided quick-fix to remove redundant keys in YAML Kubernetes resource files.

The new plugin also detects non-editable keys in YAML Kubernetes resource files and highlights them in the editor. Note that there’s an easy way to remove all such read-only keys from the current YAML file – with a handy quick-fix.

Support for JSON Kubernetes resource files

The new plugin provides some support for JSON Kubernetes resource files based on the JSON schema functionality.

Code completion and the Quick Documentation Popup are also available for JSON Kubernetes resource files.

Inspections for JSON Kubernetes resource files

The new Kubernetes plugin validates the current keys according to the JSON schema and alerts you when incorrect properties or values are used.

Also, the plugin highlights elements with any missing required properties and then advises you about the appropriate properties that should be added.