See: Description
Package | Description |
---|---|
org.netbeans.spi.java.hints | |
org.netbeans.spi.java.hints.support | |
org.netbeans.spi.java.hints.unused |
spi.java.hints SPI to create custom Java hints, including code smell warnings, productivity tips, etc. Please see the Use Cases section for a guide on how to use this SPI.
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.
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.
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.
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.
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.
public static ErrorDescription hint(HintContext ctx) {}
method in the
class. Annotate the method either with the @TriggerPattern
annotation (strongly recommended), or with the @TriggerTreeKind.
This method will be called when for parts of the code that match the given pattern, of for trees of the specified kinds.
toEditorFix()
method to get the Fix
, if the transformation is going to be used inside Inspect&Transform.
test
branding, so create Bundle_test.properties
, and add
bundle keys into it for ErrorDescription and Fix display names, to isolate the test from changes in the production
Bundle.properties
.
|
The sources for the module are in the Apache Git repositories or in the GitHub repositories.
XXX no answer for deploy-dependencies
Read more about the implementation in the answers to architecture questions.