We are experiencing issue #121853.
As I look at other bugs being linked to this bug I think there is a
bigger underlying gap/issue here that I'd like to raise for discussion
(as suggested by those manning the NetBeans booth at JavaOne):
NetBeans's editor (error marking, code completion, etc) has
no out-of-the-box or easy-to-add means of handling references to
classes which result from non-Java source files.
Sure NetBeans now has great handling for all sorts of languages from
Ruby to JavaScript. Sure via some Ant tweaks you can convince
"compile" and "build" actions to do most anything. The gap is that
there's no systematic recognition that regular Java projects may
contain non-Java source files that produce Java classes which other
classes in those projects or others are written against.
What non-Java sources are involved is somewhat irrevelant -- the issue
remains the same. The workaround is to use
-J-DCacheClassPath.keepJars=true in one's netbeans.conf, but that does
not actually suffice as per issue #121853. Also this assumes the
non-Java-sourced classes have been built into the project compilation
classpath -- the editor will show errors in any case until this is done.
The point issue cited above should be addressed, but the larger issue
is that NetBeans should provide an easy means (I include authoring a
*simple* module in this category) by which one can tell the IDE that
certain non-Java files produce Java classes and what those classes look
like.
This issue applies to everything from JAXB to various custom code
generation scenarios and is an ever more pressing issue for our
continued use of NetBeans. [We're probably ~80% Eclipse the way it is,
but the 20% is likely to shrink rather than grow if this is not
addressed.]
--
Jess Holle