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.

Bug 105172 - Extra source tree not shown/interpreted in NB module project w/o docs addition
Summary: Extra source tree not shown/interpreted in NB module project w/o docs addition
Status: RESOLVED FIXED
Alias: None
Product: usersguide
Classification: Unclassified
Component: API Support (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-30 17:43 UTC by tomwheeler
Modified: 2007-06-01 21:32 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Patch to explain required use of cp.extra (1.36 KB, patch)
2007-06-01 17:02 UTC, tomwheeler
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tomwheeler 2007-05-30 17:43:52 UTC
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.
Comment 1 tomwheeler 2007-05-30 23:45:52 UTC
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.
Comment 2 Max Sauer 2007-05-31 14:04:30 UTC
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.
Comment 3 Jesse Glick 2007-06-01 00:01:29 UTC
You need to explicitly include the extra source dir (or its build product?) in
${cp.extra}.
Comment 4 tomwheeler 2007-06-01 17:01:27 UTC
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.
Comment 5 tomwheeler 2007-06-01 17:02:20 UTC
Created attachment 43118 [details]
Patch to explain required use of cp.extra
Comment 6 tomwheeler 2007-06-01 20:37:32 UTC
Suite to illustrate the problem is in issue #105420

http://www.netbeans.org/nonav/issues/showattachment.cgi/43133/extrasourcesuite.zip
Comment 7 Jesse Glick 2007-06-01 21:32:03 UTC
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