Skip navigation links


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

Details of all changes by API and date

Java Hints SPI

Added UsedDetector SPI to mark an arbitrary elements as used

Aug 2 '23; API spec. version: 1.56; affected top-level classes:

The SPI to mark an arbitrary element as used was added. Allows to suppress the standard NetBeans unused element detection and to prevent the "unused" hint being displayed on given elements. Can be used by various framework libraries that sometimes honor annotations (i.e. injections or bindings) even on private methods.

Added utility methods and SPI to open UI for hints

Mar 17 '21; API spec. version: 1.53; affected top-level classes:

Internal helper method added to open refactoring UI with selected hints. Added SPI that can be implemented by UI module(s) to actually provide the UI implementation.

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).