Skip navigation links

Introduction

This document lists changes made to the Java Hints SPI.


Index of APIs

Incompatible changes by date

Fuller descriptions of all changes can be found below (follow links).

Not all deprecations are listed here, assuming that the deprecated APIs continue to essentially work. For a full deprecation list, please consult the Javadoc.

All changes by date

Changes by version

These API specification versions may be used to indicate that a module requires a certain API feature in order to function. For example, if you see here a feature you need which is labelled 1.20, your manifest should contain in its main attributes the line:

OpenIDE-Module-Module-Dependencies: $codebase > 1.20

Changes by affected class

org.netbeans.spi.java.hints.ErrorDescriptionFactory

org.netbeans.spi.java.hints.Hint

org.netbeans.spi.java.hints.IntegerOption

org.netbeans.spi.java.hints.support.TransformationSupport


Details of all changes by API and date


Java Hints SPI

Added JavaFixUtilities.isPrimary() utility

Jan 15 '18; API spec. version: 1.31

The utility method JavaFixUtilities.isPrimary() was added. This API checks whether a specified tree can be used in places where a Primary expression is required.

Hint can choose to trigger for guarded code

Jul 27 '15; API spec. version: 1.27; made by: sdedic

Hints triggered by Tree.Kind are not invoked for Trees which are protected from editing (i.e. Form Builder guarded blocks). Hint implementor can opt to be triggered even for such code, in order to e.g. collect data.

Hint can specify minimum source version for operation

May 24 '15; API spec. version: 1.28; made by: sdedic

Certain hints generate source code following newer language specifications. A hint may declare minSourceVersion in its @Hint annotation to specify a minimum source version. Such hint will be never invoked for files configured for earlier source level.

Added ability to specify sort text for JavaFix

Jul 14 '13; API spec. version: 1.18; made by: jlahoda

Adding to new constructors to JavaFix to define the sort text for the fix.

Defining system filesystem folder for per-project Java hints customizers

Apr 24 '13; API spec. version: 1.16; made by: jlahoda

Defining Project/hints/java-based folder, where provider for hints customizers for Java-based projects should be stored.

Added support for integer options. Hints can be declared to appear only in inspect & transform

Apr 3 '13; API spec. version: 1.14; affected top-level classes: IntegerOption Hint; made by: sdedic; issues: #227822 #227959

Added declarative support for integer options. @IntegerOption can be used with option name field, similar to @BooleanOption.

An option was added to Hint.Options, so that hint can declare to be only shown in Inspect & transform dialog. Useful for computation-intensive hints, which should only run on demand.

Introducing ErrorDescriptionFactory.forSpan.

Dec 19 '12; API spec. version: 1.9; affected top-level classes: ErrorDescriptionFactory; made by: jlahoda; issues: #223723

Added ErrorDescriptionFactory.forSpan to create the correct Java-enhanced ErrorDescription from a span.

Added support for using jackpot patterns from other modules (e.g. refactoring).

Mar 29 '12; API spec. version: 1.1; affected top-level classes: TransformationSupport; made by: jbecicka; issues: #210262

Added support for using jackpot patterns from other modules (e.g. refactoring).