Replies: 1 comment 1 reply
-
I don't think this is a NB hint in the traditional sense. NB itself uses the javac API and this is likely simply the msg of the javac error converted into the editor annotation. A quick test showed that javac emits the very same |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am playing around with javac's Compiler Plugin API but the Netbeans editor does not seem to pick it up. In my experiment I am trying to create a plugin that adds missing semicolons.
My plugin works fine when running "Clean and Build" on the project, and also when running "mvn clean compile" from a terminal. That is: the plugin is activated and called on the PARSE event.
But in the editor some module (java hints?) puts the line with the missing semicolon in error.
So I am wondering if one can somehow get the editor to find the plugin (adding -Xplugin to my compiler args does not work, nor does using the plugin APIs autodiscovery). Also, I am wondering which class/module emits the "';' expected" error. It really sounds like an error from the java compiler but perhaps it comes from some static code analysis tool being run?
I should add that adding the plugin programmatically via an AbstractProcessor does not work either. The plugin is indeed being invoked (the tasklistener registered is), also for PARSE events after edits forces a new compilation, but it still does not remove the missing semicolon error in the editor.
Beta Was this translation helpful? Give feedback.
All reactions