IntelliJ IDEA 2017.2.1

Smart Completion è ora consapevole delle classi di build nel progetto e suggerisce il loro uso.
Agosto 4, 2017
Nuova versione

Funzionalità

  • Java
    • Smart completion - Chain Completion, which was available on the second call of Smart Completion, gets even better. Now the suggestions are displayed after the first call of Smart Completion, and they’re sorted by how frequently they’re used in the project. This feature works only for Java and requires the project to be built with the IDE’s (not Gradle’s) compiler. Smart Completion is now aware of builder classes in the project and suggests their usage where relevant.
    • Control flow analysis - Control flow analysis has become much smarter and now detects a wider variety of problems in the code. For example, if Collection#isEmpty() returns true, the IDE understands that there are no elements in that collection to iterate over. The IDE also understands that String#charAt(int index) throws an exception when called with an empty string, or when the index exceeds the value returned by the String#length() method. The same intelligence applies to: String#isEmpty(), String#charAt(int index), List#get(int index), Set#contains(Object item), Map#containsKey(Object key), Map#containsValue(Object value), and many other methods. The IDE also gains a better understanding of reporting nullability issues, in particular when it comes to working with Collection and Map type parameters.
    • Java 9 module diagrams - Embracing Java 9 and its new module system, the preview introduces Module Diagrams. Use them to see the dependencies between the selected modules. To see the diagram, invoke Diagrams | Show Diagram (Ctrl+Alt+Shift+U), and then choose Java Modules Diagram. The diagram works for JRE modules as well.
    • Refactoring to Java 9 - The IDE finds the code where you construct sets and pre-fill them with data, and suggests replacing it with Set#of(String…items) where possible. The IDE finds the loops spinning on a volatile field and suggests calling Thread#onSpinWait() inside such a loop. This call may significantly improve the performance of your code.
    • Extracting an expression as a map operation - Now, when you call Extract Variable inside a Stream API map call, the IDE offers to extract it as a separate map() expression.
    • Extracting a lambda to a method reference - IntelliJ IDEA now offers you a quick-fix that replaces a lambda expression with a method reference. This combines Extract Method and Replace Lambda with Method Reference.
    • Replacing multiple equals with Set.contains - When you are checking whether an expression is equal to one of several literals, the IDE now offers you to replace these checks with a Set#contains(Object key) call.
    • JUnit 5 M4: parameterized and repeated tests - Following the recent JUnit 5 changes, the IDE adds dedicated coding assistance for Parameterized Tests and Repeated Tests.
    • Reflection API - Coding assistance for Reflection has gotten better. Also, JetBrains have introduced similar coding assistance for Method Handlers and Variable Handlers. IntelliJ IDEA provides code completion for method and field names as well as their signatures.
  • JVM debugger
    • Filtering arrays & collections - The debugger now allows you to filter arrays and collections in Variables, Watches, Evaluate Expression and other similar views.
    • Java Stream Debugger - This plugin provides visualization of Java Stream operations.
  • Spring Boot
    • Run Dashboard - For Spring Boot applications, the traditional Run tool window has been replaced with Run Dashboard. This dashboard lets you manage Run configurations and see their application-specific information on the right.
    • Actuator endpoints - For Spring Boot applications, the Run/Debug tool window now has a tab called Endpoints. This tab shows information about the Health, Beans, and Mappings endpoints.
  • Gradle
    • Progress indicator - When Gradle is downloading a wrapper distributive, the IDE now displays the progress bar in both the Console tool window and the Background Tasks popup.
    • Environment variables - When you run a Gradle task via a Run Configuration, you can now specify and/or override environment variables. On macOS, the Gradle build is now consistent with the command line behavior because the IDE now respects environment variables defined on the system level.
    • Kotlin 1.1.3
    • Semantic highlighting - Now, if you enable Semantic highlighting in the Colors & Fonts settings, the IDE highlights the definitions and all occurrences of local variable, and parameter with a distinct color.
    • TODO highlighting - The usages of the TODO() method are now highlighted in the editor as TODOs and shown in the TODO tool window.
    • Parameter names - To make the code even more readable, the editor now shows hints for the parameter names in method calls where the meaning of the arguments may not be clear from the context.
    • Type hints - Similarly to Parameter Hints, the editor now is capable of showing inferred types for the variables, functions, and parameters. This functionality is disabled by default; you can enable it in the editor appearance settings.
  • Groovy 2.5.0
    • This update brings the support for the new features introduced with Groovy 2.5.0: @groovy.transform.builder.Builder#includeSuperProperties, @groovy.transform.AutoImplement, and @groovy.lang.Delegate for methods
  • Scala
    • Debugging in SBT Shell - Now, you can easily attach a Debugger to it with just one click.
    • Play 2.6 support - The support for Play Framework has been updated according to its latest version.
    • Implicits management - The Type Annotations inspection has been improved with implicit declarations processing. Any implicit is worth being explicitly annotated. It significantly increases the performance of compilation and IDE code analysis. It reduces the risk of a type inconsistency.
    • Completion for implicits - Now, if you call Smart Completion for following types: akka.actor.ActorRef, scala.concurrent.Future, it also suggests implicit conversions, and adds import statements automatically.
  • Version control
    • Reverting and rewording commits - The Git Log now provides two new actions: Revert and Reword. The first one lets you revert selected commits. The second one lets you change the commit message for any commits that have not been pushed yet.
    • Formatting commit messages - The settings related to the Commit dialog have been reworked and moved to a separate page called Commit Dialog. The new settings let you customize the rules applied to commit messages: a blank line between the subject and the body, and the maximum length. Also, now the IDE offers a quick fix and the Reformat action inside Commit Message.
    • Shelf - The Shelf tab has been reworked for better performance and ergonomics. The Show Diff action now by default compares the shelved version to the base version instead of local (when possible). The old behaviour, which is comparing to the local version, is available via the Compare with Local action (listed in the context menu). The raw patch content can be viewed in the Preview tab.
  • User interface
    • Find in Path - The Preview panel in Find in Path now has a Gutter (a left-hand pane like that in the editor) with line numbers, navigation icons, and local change markers. Search results from the same lines are now merged together. A small icon indicates when a search is in progress.
    • Window 10 native UI - The appearance of certain UI elements on Windows 10 has been updated to follow the system look and feel. This includes buttons, radio buttons, checkboxes, text fields, select controls, spinner and a few others.
    • Better HiDPI support - The IDE used to scale its UI based on the global settings of the primary display. This scale factor was applied even to non-primary monitors. Now it scales its UI based on the scale factor for the monitor the UI is shown on. This improvement has a limitation: it works only for Windows and doesn’t support fractional values. The font settings are now automatically adjusted based on the display resolution.
  • JavaScript & TypeScript
    • Parameter hints and type info - Parameter hints make the code easier to read by showing parameter names in method and function calls. Now, you can also now see the inferred type for objects by hovering over them with the mouse and holding Ctrl.
    • Code arrangement - The new Arrangement code style options allow you to configure how different blocks of code such as the constructor, fields and methods are ordered in your JavaScript and TypeScript classes. Call the Rearrange Code action or use it together with Reformat Code to make the code more readable and consistent.
    • Import code style from .eslintrc - You can now import some of the ESLint code style rules to the IDE’s JavaScript code style settings. Reply Yes when prompted about this in the .eslintrc file – that will apply the matched rules and make the IDE formatting more consistent with your ESLint configuration.
    • Move symbol refactoring - With the new Move Symbol refactoring you can now safely move classes, global functions or variables across ES6 modules – all the imports and exports will be updated automatically.
    • CSS modules - Using CSS Modules? Now when you’ve imported a CSS Module in your JavaScript file, you will get code completion and navigation to the definition for the class names in that module.
    • Angular Material - Support for Angular Material improvement: you can now use code completion and navigation for the Material attributes in addition to completion, for the components that were available before.
    • Webpack - Coding assistance in JavaScript files now respects the webpack module resolution. Now when you’re using a complex webpack configuration with aliases and multiple modules, the IDE properly resolves the paths in import statements and suggest symbols to import.
    • Code coverage for Mocha - Run Mocha tests with coverage and see the coverage reports created by Istanbul right in the IDE. The report shows how many files were covered with tests and the percentage of covered lines in them. From it, you can jump to the file and see what lines were and were not covered.
  • Performance
    • Unloading modules - The preview brings a new experimental feature called Unloaded Modules. This feature gives you the ability to select which modules you are going to work on in your project. Those you are not working with at the moment are marked as Unloaded. The IDE will not index or otherwise touch any files in Unloaded Modules. This helps conserve CPU and memory resources when dealing with large codebases.
    • Pausing indexing - The indexing process now can be paused, e.g. if you need your CPU power for an urgent task.
Smart Completion is now aware of builder classes in the project and suggests their usage.

IntelliJ IDEA

Ambiente di sviluppo Java completo.

IntelliJ IDEA è disponibile anche in:

Hai una domanda?

Chatta live con i nostri specialisti di gestione delle licenze di JetBrains ora.