This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I have a module within my NetBeans suite that includes source code generated by JAXB. To avoid overwriting hand-edited sources, I generate the source code into a directory named gen-src. Therefore, I have two source trees: src and gen-src. Both are compiled into the build/classes directory. My module compiles and works OK. However, the gen-src tree does not show up in the projects view (a nuisance but not a big problem since I only need to inspect them, never need to edit them). More importantly, I have a "red squiggly" line in the IDE for any reference to a class from the generated sources. I have confirmed that the classes have been compiled. I have the following extra-compilation-unit in my project.xml: <extra-compilation-unit> <package-root>gen-src</package-root> <classpath>${module.classpath}</classpath> <javadoc/> <built-to>${build.classes.dir}</built-to> </extra-compilation-unit> This behavior did not occur in NetBeans 5.0 IDE. I only saw these errors after moving to NetBeans 6. I am currently using NB 6.0 M8.
I stand corrected, adding the extra-compilation-unit does make my additional source tree show up in the IDE (though I had to restart it). However, the more important problems remain: the IDE shows "red squigglies" beneath all references to those classes and there is no code completion for the methods they expose.
I suggest generating the files to a 'src' subfolder, ie. src/com/myorg/gen etc. But there should be a way to do it as you describe. Reassigning.
You need to explicitly include the extra source dir (or its build product?) in ${cp.extra}.
I tried Jesse's suggestion and it did remove the "red squigglies" in the IDE. However, since reading the harness README many times did not itself lead me to a solution, I think the documentation should be improved. I am therefore reopening as a lower-priority RFE under the documentation subcomponent and will attach a patch of the README file shortly. If you'd prefer I open a whole new issue instead, I'd be happy to do that too.
Created attachment 43118 [details] Patch to explain required use of cp.extra
Suite to illustrate the problem is in issue #105420 http://www.netbeans.org/nonav/issues/showattachment.cgi/43133/extrasourcesuite.zip
Thanks! Checking in apisupport/harness/release/README; /shared/data/ccvs/repository/apisupport/harness/release/README,v <-- README new revision: 1.59; previous revision: 1.58 done