IntelliJ IDEA – Devstyler.io https://devstyler.io News for developers from tech to lifestyle Thu, 12 Aug 2021 09:00:27 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.2 JetBrains Java IDE Adds Project Analysis, Build System Improvements https://devstyler.io/blog/2021/08/12/jetbrains-java-ide-adds-project-analysis-build-system-improvements-2/ Thu, 12 Aug 2021 09:00:27 +0000 https://devstyler.io/?p=65298 ...]]> JetBrains has released version 2021.2 of its IntelliJ IDEA integrated development environment for JVM languages. The upgrade emphasizes capabilities such as project analysis and easier management of build system dependencies.

Downloadable from jetbrains.com, IntelliJ IDEA 2021.2 was released on July 26. The update introduces project-wide analysis for Java projects, a new feature that checks every code change for errors before compilation. However, this feature is limited to the IntelliJ IDEA Ultimate edition.

In both the Ultimate and Community editions of the IDE, version 2021.2 also will initiate several actions when a project is being saved including reformatting code and optimizing imports. These actions are grouped in Preferences/Settings > Tools > Actions on Save. And version 2021.2 makes it easier to manage Maven and Gradle dependencies with a Package Search plug-in, which allows developers to find version updates for dependencies.

Other new capabilities in JetBrains IntelliJ IDEA 2021.2 include:

  • For Java, a new two-step JavaFX project wizard has been introduced. Also, developers can mark public, protected, and private Java members (methods, fields, classes) in different ways. Additionally for Java, new inspections have been added for particular use cases in data flow analysis.
  • A Migrate refactoring capability enables migration of a project or module from Java EE to Jakarta EE.
  • By default, Kotlin code completion now works based on the machine learning mechanism. Also for Kotlin, support for WSL 2 (Windows Subsystem for Linux) and a Run Targets feature have been introduced.
  • For JavaScript, the IntelliJ Ultimate edition can rename useState values and functions simultaneously.
    Scala 3 support has been improved, with faster indexing and Scala 3 project creation enhanced. Also for Scala, developers can use compiler-based error-highlighting to avoid false error reports.
  • The Preview tab now works in the debugger.
  • In the editor, descriptions for inspections and quick fixes are more comprehensive and some include examples. Also in the editor, diagrams have become more informative, with a Structure view with a diagram map and a preview of the selected block and neighbors. Markdown support now includes the ability to convert .md files to and from various formats, change image sizes, and use drag and drop to insert images.
  • For the user experience, IntelliJ now can automatically detect Eclipse projects stored locally from the dedicated folder on the Welcome screen.
  • Tool window organization has been made easier, with developers able to drag them by their name bar and drop them to the highlighted place within the main IDE window or in a separate window.
  • If a project is missing a plug-in for a specific framework, the IDE will alert the user and offer to enable it.
    When previewing HTML files in a browser, the IDE will show saved changes made to an HTML file or the linked CSS and JavaScript files.
  • Developers can connect to Docker via SSH.
]]>
JetBrains Java IDE adds project analysis, build System Improvements https://devstyler.io/blog/2021/08/11/jetbrains-java-ide-adds-project-analysis-build-system-improvements/ Wed, 11 Aug 2021 16:18:17 +0000 https://devstyler.io/?p=65159 ...]]> JetBrains has released version 2021.2 of its IntelliJ IDEA integrated development environment for JVM languages. The upgrade emphasizes capabilities such as project analysis and easier management of build system dependencies.

Downloadable from jetbrains.com, IntelliJ IDEA 2021.2 was released on July 26. The update introduces project-wide analysis for Java projects, a new feature that checks every code change for errors before compilation. However, this feature is limited to the IntelliJ IDEA Ultimate edition.

In both the Ultimate and Community editions of the IDE, version 2021.2 also will initiate several actions when a project is being saved including reformatting code and optimizing imports. These actions are grouped in Preferences/Settings > Tools > Actions on Save. And version 2021.2 makes it easier to manage Maven and Gradle dependencies with a Package Search plug-in, which allows developers to find version updates for dependencies.

Other new capabilities in JetBrains IntelliJ IDEA 2021.2 include:

  • For Java, a new two-step JavaFX project wizard has been introduced. Also, developers can mark public, protected, and private Java members (methods, fields, classes) in different ways. Additionally, for Java, new inspections have been added for particular use cases in data flow analysis.
  • A Migrate refactoring capability enables the migration of a project or module from Java EE to Jakarta EE.
  • By default, Kotlin code completion now works based on the machine learning mechanism. Also for Kotlin, support for WSL 2 (Windows Subsystem for Linux) and a Run Targets feature have been introduced.
  • For JavaScript, the IntelliJ Ultimate edition can rename user State values and functions simultaneously.
  • Scala 3 support has been improved, with faster indexing and Scala 3 project creation enhanced. Also for Scala, developers can use compiler-based error highlighting to avoid false error reports.
  • The Preview tab now works in the debugger.
  • In the editor, descriptions for inspections and quick fixes are more comprehensive and some include examples. Also in the editor, diagrams have become more informative, with a Structure view with a diagram map and a preview of the selected block and neighbours. Markdown support now includes the ability to convert .md files to and from various formats, change image sizes, and use drag and drop to insert images.
  • For the user experience, IntelliJ now can automatically detect Eclipse projects stored locally from the dedicated folder on the Welcome screen.
  • Tool window organization has been made easier, with developers able to drag them by their name bar and drop them to the highlighted place within the main IDE window or in a separate window.
  • If a project is missing a plug-in for a specific framework, the IDE will alert the user and offer to enable it.
  • When previewing HTML files in a browser, the IDE will show saved changes made to an HTML file or the linked CSS and JavaScript files.
  • Developers can connect to Docker via SSH.
]]>
Kotlin 1.5.0 – the First Big Release of 2021 https://devstyler.io/blog/2021/05/10/kotlin-1-5-0-the-first-big-release-of-2021/ Mon, 10 May 2021 12:58:23 +0000 https://devstyler.io/?p=50402 ...]]> Here is the first feature release in accordance with the new release schedule – Kotlin 1.5.0!

What the release delivers is stable language features such as JVM records, sealed interfaces, online classes, and includes the new default JVM IR compiler.

More than 25,000 developers have already tried the new JVM IR compiler in IntelliJ IDEA.

The new compiler shares a unified pipeline and business logic with Kotlin/Native and Kotlin/JS IR compilers, which will allow developers to implement most features, optimizations, and bug fixes for all platforms simultaneously. It will also allow you to add custom processing and transformations that will automatically work on all platforms.

Auto-update to Kotlin 1.5.0

If you are a user of IntelliJ IDEA or Android Studio, it will give you the option to automatically update to the new Kotlin release as soon as it becomes available.

Stable language features

Kotlin 1.5.0 includes stable versions of the new language features presented for preview in 1.4.30:

  • Support for JVM records to remain interoperable with the latest Java features – record classes. To use a Kotlin class as a record in Java code, make it a data class and mark it with the @JvmRecord annotation.
  • Sealed interfaces. The sealed modifier works on interfaces the same way it works on classes.
  • Sealed class improvements. Previously, all subclasses had to be in the same file with sealed classes.
  • Online classes are a subset of value-based classes that only hold values.

Standard and test library improvements

The standard library provides many helpful features, including:

  • The new stable APIs for unsigned integer types as well as for ranges, progressions, and functions for them.
  • Extension functions for java.nio.file. Path to use the modern non-blocking Java IO in a Kotlin-idiomatic style.
  • String and Chаr API improvements including the new locale-agnostic API for changing the case of strings and characters, a set of new functions for conversion between characters and their integer codes and numeric values, and multiplatform support for more char functions.
  • Duration API changes including using a Long value for the internal representation and providing new properties for retrieving a duration as a Long value.

The test library comes with a set of important improvements:

  • Single kotlin-test dependency in the common source set of multiplatform projects.
  • Automatic choice of a testing framework for Kotlin/JVM source sets when you specify only the kotlin-test dependency.
  • A number of assertion function updates.

Kotlin/JVM

Kotlin 1.5.0 brings the new JVM IR compiler, announced in Kotlin 1.4.0, becomes Stable and default. Compilation of Kotlin plain lambdas is Experimental, New default JVM target: 1.8. (the 1.6 target is deprecated), Improved handling of type nullability information from Java and Deprecation of @JvmDefault and old Xjvm-default modes.

Kotlin 1.5.0 provides support for compiler caches in debug mode for linuxX64 and iosArm64 targets. With compiler caches enabled, most debug compilations complete much faster, except for the first one. Kotlin 1.5.0 also provides deactivation of the built-in memory leak checker to avoid issues that may cause application crashes.

]]>