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 46830 - Making a freeform project w/ >1 source root but empty classpaths does not define >1 <compilation-unit>
Summary: Making a freeform project w/ >1 source root but empty classpaths does not def...
Status: CLOSED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Ant (show other bugs)
Version: 4.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks: 42682
  Show dependency tree
 
Reported: 2004-08-02 13:36 UTC by Jesse Glick
Modified: 2006-03-24 10:21 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2004-08-02 13:36:06 UTC
I tried making a freeform project (from a copy of
ant/freeform/eg/simple minus nbproject/) and in
the Sources panel selecting two source roots (src/
and antsrc/). Trying to reproduce issue #46791, I
skipped over the Classpath panel - did not touch
it, just clicked Next. After opening the project,
noticed that project.xml had a <compilation-unit>
for src/ but none for antsrc/. (Both appeared in
the logical view, note, and both were marked as
java-typed <source-folder>s.)

Seems to me that
ClasspathPanel.getJavaCompilationUnits may not be
working: applyChanges() only does anything with
the currently selected source folder. Since my
combo box had src/ (position 0) and antsrc/ (pos
1), and I never changed the selection from the
original 0 (but left the checkbox "separate
classpath" marked), probably it only ever updated
the CU for the first source root.

Possibly rather than calling applyChanges it
should do something like

for (CUK key : compUnitsKeys) {
    FPG.JCU cu = getCU(compUnitsList, key);
    updateCUCompileClasspath(cu);
}

?
Comment 1 Jesse Glick 2004-08-02 14:01:08 UTC
I guess you're out; I will try that change.
Comment 2 Jesse Glick 2004-08-04 00:06:57 UTC
It works.
Comment 3 Jesse Glick 2004-08-04 01:27:18 UTC
committed     Up-To-Date  1.13       
ant/freeform/src/org/netbeans/modules/ant/freeform/ui/ClasspathPanel.java
Comment 4 David Konecny 2004-08-17 15:10:37 UTC
Related to issue 46881 - CU is not created when no CP is specified.

The "updateCompilationUnitCompileClasspath(jcu);" should not be
called, but I will fix it as part of issue 46881.