IntelliJ IDEA starts 2018.1 Early Access Program

We are pleased to announce the start of the Early Access Program for our next major release – IntelliJ IDEA 2018.1! The first IntelliJ IDEA 2018.1 EAP build is already available for download, and it brings you lots of improvements and a full bag of new features. If you want to know more about the highlights of the release planned for this spring – read this blog post.

ij2018_1_eap_blog

Java

In the upcoming IntelliJ IDEA 2018.1 code completion was improved. In particular, now completion in the Stream API chains are aware of the type casts, and suggests completion item according to the existing call: filter(String.class::isInstance). The completion item will then be automatically type casted.

completionInStreamAPI

As always, the upcoming update of our IDE brings tons of new inspections. Now IntelliJ IDEA  helps you write clear code, and detects even more cases where redundant code constructs are used.

In the first IntelliJ IDEA 2018.1 EAP build all the older inspections that detect a redundant string operation have been merged into a single Redundant String operation inspection. And here is the exact and complete list of inspections which were merged: Redundant 'String.toString()', Redundant 'substring(0)' call and Call to 'intern()' on String constant.

Also new scenarios are now covered: such as StringBuilder(""), sb.append("") or System.out.println("").

RedundantStringOperations

The IDE now reports unnecessarily complex collection operations. The IntelliJ IDEA 2018.1 EAP build provides quick-fixes and suggests simpler alternatives.

RedundantCollectionOperations

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

SortContent

The IntelliJ IDEA 2018.1 EAP build introduces a new Idempotent loop body inspection that detects possible code errors in the while-loops, for which only the initial assignment and the first iteration matter, and the following iterations do not. In most cases this is a programming error, as it causes an infinite loop if the condition is still true after the first iteration.

image11

The upcoming IntelliJ IDEA 2018.1 detects a copy constructor that doesn’t copy all fields in a class. The IDE considers fields with the transient modifier unnecessary to copy.

image3

Now the IDE detects and warns you about the infinite streams that weren’t short-circuited. Such code may result in an infinite loop or a running out of memory issue.

image1

Also, you will get a warning about modifications of immutable collections.

image6

For while-loops, now you get the 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.

LoopTransformation

In the right-hand pane of the Inspection Results Tool Window, a new Fix partially button has been added. It appears when you have several different ways to fix 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 at once.

FixedPartially

JUnit 5 @Tag annotation support

A new @Tag annotation has been added to the JUnit5 testing framework, to mark class or method for filtering tests. We implemented support for the @Tag annotation in the IntelliJ IDEA 2018.1 EAP build, so now you can run tests filtered by tags. In the Run/Debug Configuration dialog, select Tags (JUnit 5) in the test kind field and the IDE will only include in the testing scope tagged classes and tagged methods. Also, you can use Uniqueld field to filter tests according to their id.

Screen Shot 2018-01-12 at 17.40.29

JVM Debugger

We have a tradition of improving our debugger with each release, and the upcoming IntelliJ IDEA 2018.1 is no exception. Speaking about exceptions, we’ve just added an ability to throw an exception without actually adding any code to your project during a debugging session.

The new Throw Exception action lets you throw an exception from a certain location without altering the code. While in a debugging session, you can access this new action through the Run | Throw Exception menu, or from the frame context menu.

DebuggerThrowException

Breakpoints Stacktraces

With the upcoming IntelliJ IDEA 2018.1, you can now print breakpoints Stacktraces to the console: just select the Stacktrace checkbox in the Breakpoints dialog box.

You can also select to print several breakpoints’ Stacktraces to the console, and then observe all breakpoints Stacktraces at once in the Console tab after the execution of your program has finished.

image8

Project Configuration

A new Include dependencies with “Provided” scope checkbox appeared 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 example:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>

With this new feature, you can easily add “provided” dependencies to the classpath when needed. So now, if you need to test, debug, or run your application with “provided” dependencies within the IDE, you don’t need to install the required container for the application locally on your machine, or manually change the dependencies.

image16

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

Code Generation and Navigation

In IntelliJ IDEA you can generate a test class using the intention action. With the 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.

image13

Search and Replace improvements

In the Replace in Path window now the IDE provides an ability to preview a regex replacement.

image10

Structural Search enhancements

Now you can find method calls to annotated methods using Structural Search. You can select from the existing search templates or create your own.

StructuralSearch1

StructuralSearch

We have significantly improved the Structural Search performance in XML and HTML files, also we have sped up the Java search. Search and replace in Javascript has been improved as well. We’ve fixed a bunch of bugs, so now you’ll be getting more relevant results. Code constructs that previously did not appear in search results can now be found. Expressions that previously could not be replaced, are now replaced. And incorrect search patterns are now reported instead of failing silently.

Injection into FreeMarker macro calls

The support for the FreeMarker template engine has been improved; now the IDE supports configurable injection into FreeMarker macro calls.

Injection

Spring Framework

The IntelliJ IDEA 2018.1 EAP build supports new features of the recently released Spring Security 5.0: Spring Framework 5 integration, Reactive Support (@EnableWebFluxSecurity, @EnableReactiveMethodSecurity, WebFlux Testing), OAuth 2.0 and others.

VCS

Now the IDE allows you to paste a branch name into the Git Branches popup while performing a search for a needed branch.

GitBranches-paste

Now the force push action is enabled by default for all branches except for the protected one. The Allow force push checkbox has been removed from the Preferences | Version Control | Git.

The SVNKit library has been removed from the IDE; now Subversion 1.6 is not supported in the IntelliJ IDEA 2018.1 EAP build and integration with Subversion is possible only through an SVN client. We’ll publish a dedicated blog post with more information about the SVNKit library removal as soon as possible.
Update: the blog post about the SVNKit library removal.

Better HiDPI support on multiple displays for Windows

From now on, if you run the IntelliJ IDEA 2018.1 EAP build 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. As before, to switch to the default mode, you need to set the VM option -Dsun.java2d.uiScale.enabled = false.

In other news, a new Open in terminal feature has been implemented in the upcoming IntelliJ IDEA 2018.1. Select a directory or a file in the Project Tool Window and chose the Open in terminal option from the context menu. The IDE launches the terminal session in the required directory.

OpenInTerminal

Improvements are also coming for Groovy support. We plan to publish a dedicated blog post with more details pretty soon.

As usual, we have devoted a lot of time to bug fixes, and we are happy to announce that we have fixed several major bugs related to the focus subsystem. We understand that some of those issues were reported a long time ago and that they caused a lot of frustration. We’ve worked hard to solve those issues, and in order to accomplish that task we have considerably reworked our focus subsystem.
Now we believe that we can fix more focus bugs much faster than before. This took us some time, so we would like to say a big thank you for your patience and for your bug reports as well. If something doesn’t work as expected please file a new report, and will try to fix it as soon as possible. Meanwhile, take a look at what has been accomplished up to this point:

Now, the Search Everywhere pop-up receives focus: IDEA-124160.
The Project tool window receives focus when invoking from Select In pop-up: IDEA-164945.
The Version Control Tool Window receives focus after viewing diff dialog: IDEA-124651.

And here are even more notable bug fixes:
Better JavaDoc formatting: prevent re-flowing of HTML-fragments IDEA-143120.
Now, the Find in Path dialog doesn’t disappear if you click outside the dialog IDEA-168640
For Maven projects, the IDE now imports sources/test sources/resources, even if they are not in the module’s content root: IDEA-72904.

Download and try the freshly-baked EAP build, and don’t forget to tell us what you think. We are always eager to hear your feedback in our issue tracker, here in the comments, or on Twitter.

Happy developing!

About Zlata Kalyuzhnaya

IntelliJ IDEA Marketing Manager at JetBrains. twitter: @ZlataKalyuzhnay ‏
This entry was posted in EAP Releases, New Features and tagged , . Bookmark the permalink.

42 Responses to IntelliJ IDEA starts 2018.1 Early Access Program

  1. Alex Katlein says:

    This was the worst trade deal in the history of trade deals:
    Didn’t migrate my config from 2017.3, started it and was blinded by the unusual brightness of the UI.

    • Zlata Kalyuzhnaya says:

      Hi Alex, we would highly appreciate if you submit an issue to our tracker with more details. Also a screenshot will be a great help in order to understand the problem and fix it ASAP. Thank you!

    • James says:

      Experienced the same config migration issue. On first start, IJ seemed to detect the wrong “previous version”, finding my 2017.2 settings. Manually selecting the correct “.IntelliJIdea2017.3” folder gave an error that it was not a valid config directory. Selecting the executable directory for my last 2017.3.3 EAP build reported no errors… but no settings seem to have been migrated.

      Also, when starting the IDE for the first time, I get very intrusive/unpleasant messages about plugins failing to launch — JRebel being one of them. For each failure, IJ needs to be restarted. I am used to the little “Some plugins are incompatible with this version and have been disabled” non-modal popup, which is a much more pleasant experience.

    • Alex Katlein says:

      That’s so weird, I just tried to reproduce it and everything went off without a hitch. Must have been a freak convergence of bytes in my RAM.

  2. Mike says:

    Great news!
    What about adoption of Java 9?
    Can Idea 2018.1 run on Java 9 or it stil requires Java 8?

    Thanks.

  3. Raphael says:

    What happened to partial commit support (in git) ?

    The feature was scheduled for 2017.3 and never materialised. I don’t generally use EAP builds unless I really need to, but this feature alone won’t make me think twice. I understand it’s non-trivial, but an update would make my day (as well as thousands of others)

    Here is the link to the issue: https://youtrack.jetbrains.com/issue/IDEA-63201

  4. Dmitry Fill says:

    What happened to support of the bash files? Do not highlight them anymore and plugin is gone.

  5. Fabio says:

    Is it normal that the PHP plugin does not work anymore?
    I use Intellij for Python and PHP and the PHP plugin seems to be incompatible with 2018.1 EAP

  6. Alex says:

    Thanks for the new build, but I have to admit, the new splash screen is ugly!

  7. Генерал says:

    What is the reason to remove svnkit? I have a couple of svn repos with svn+ssh access and it is a pain to make them work under windows with svn.exe. Why should I have it after an upgrade?

  8. Mike says:

    The “Sort Content” feature sounds very handy. It isn’t something I need to a lot but there have been several times I wished I could sort something exactly like your example shows.

  9. IntelliJ user says:

    Really, I appreciate all the new features of IntelliJ every release but I think it’s time to clear the IDE up a little.

    IntelliJ is getting more and more complicated because of so many settings etc.

    Also, the performance is getting worse with every release. My suggestion is that the next major release should be a “Clear up” release with just bugfixes, cleanups and performance improvements. Believe me, it would be great!

    • Fabio says:

      +1
      No company ever does that. I’d love to have a new version with only performance improvement just to sit back and relax for one time.

  10. Jon says:

    Will you still be providing full release notes, as you did with older EAPs? I was curious what JavaScript / TypeScript changes had been included, but I can’t find the complete list of issues.

  11. Phil Kim says:

    How about long delayed MacBook Pro Touch Bar support (IDEA-163208)?

  12. Michal says:

    There is a typo in sentence “Also, you can use Uniquield field to filter tests according to their id.” Uniquield -> Uniqueld.

  13. I’ve found that completion popups are broken in this release. It looks like they are behind the main window. I suppose it window manager specific issue, but it worked fine in previous releases. I’m using XMonad on Linux. I can provide screenshots if it required.

  14. Łukasz says:

    1) Injection into FreeMarker macro calls is not working for *.ftl with:

    alert(“xyz”);

    Here is script.ftl file:

    <script type="text/javascript" id=”${id}”>
    (function(init) {
    init(window.jQuery, window, document);
    }(function($, window, document) {
    $(function() {

    });
    }));

    Yellow bulb is not showing up.

    2) Another issue is nesting “” in some tag like . Yellow bulb is showing up but injection is bound with tag.

  15. Sola says:

    “Open in terminal” should be “Open in Terminal”

  16. Torsten Werner says:

    Are there any plans for Java 10 support?

  17. Pingback: Welcome GoLand 2018.1 EAP: Better Inspections, Completion, Performance, and More | GoLand Blog

  18. Pingback: Welcome GoLand 2018.1 EAP: Better Inspections, Completion, Performance, and More – A WordPress Site

Leave a Reply

Your email address will not be published. Required fields are marked *