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.
040803, b60. Create a new freeform project for e.g. Jakarta Xerces-J. Select "src" and "tests" initially. Skip over classpath panel. project.xml gets the compilation units. Now open customizer, add "samples" dir, close dialog. Source folders list and logical view are updated with new source root, but there is no <compilation-unit> for it.
Frankly I don't think I understand this code well enough to fix it. Seems that updating compilation units is done only by ClasspathPanel, so if you don't touch this panel, it won't be changed?? Weird design IMHO.
Hi Jesse, "Seems that updating compilation units is done only by ClasspathPanel, so if you don't touch this panel, it won't be changed?? Weird design IMHO." - I have to look at the code to be 100% sure, but I think that's how it works. Compilation units are generated only when you specify something in ClasspathPanel. I believe they are optional so why to generate them when I do not have classpath?
No! Compilation units should *always* be listed explicitly; an empty classpath (or no <classpath> at all) is fine. If there is no <compilation-unit>, you get null from ClassPath.getClassPath (even for SOURCE) which is quite wrong - means e.g. that the fallback provider is used instead, etc.
I refactored the logic from wizard panels into separate class and fixed this issue. I agree that logic become a bit bloated and was hard to grasp even for me after my holiday. It is also better unit tested now. Fixed in: Checking in src/org/netbeans/modules/ant/freeform/ui/BasicProjectInfoWizardPanel.java; new revision: 1.5; previous revision: 1.4 Checking in src/org/netbeans/modules/ant/freeform/ui/ClasspathPanel.java; new revision: 1.17; previous revision: 1.16 Checking in src/org/netbeans/modules/ant/freeform/ui/ClasspathWizardPanel.java; new revision: 1.6; previous revision: 1.5 Checking in src/org/netbeans/modules/ant/freeform/ui/GeneralPanel.java; new revision: 1.6; previous revision: 1.5 Checking in src/org/netbeans/modules/ant/freeform/ui/NewJ2SEFreeformProjectWizardIterator.java; new revision: 1.15; previous revision: 1.14 Checking in src/org/netbeans/modules/ant/freeform/ui/NewWebFreeformProjectWizardIterator.java; new revision: 1.10; previous revision: 1.9 Checking in src/org/netbeans/modules/ant/freeform/ui/OutputPanel.java; new revision: 1.10; previous revision: 1.9 Checking in src/org/netbeans/modules/ant/freeform/ui/ProjectCustomizer.java; new revision: 1.14; previous revision: 1.13 Checking in src/org/netbeans/modules/ant/freeform/ui/ProjectModel.java; initial revision: 1.1 Checking in src/org/netbeans/modules/ant/freeform/ui/SourceFoldersPanel.form; new revision: 1.4; previous revision: 1.3 Checking in src/org/netbeans/modules/ant/freeform/ui/SourceFoldersPanel.java; new revision: 1.20; previous revision: 1.19 Checking in src/org/netbeans/modules/ant/freeform/ui/SourceFoldersWizardPanel.java; new revision: 1.9; previous revision: 1.8 Checking in src/org/netbeans/modules/ant/freeform/ui/TargetMappingPanel.java; new revision: 1.21; previous revision: 1.20 Checking in src/org/netbeans/modules/ant/freeform/ui/TargetMappingWizardPanel.java; new revision: 1.10; previous revision: 1.9 Checking in src/org/netbeans/modules/ant/freeform/ui/WebLocationsPanel.java; new revision: 1.17; previous revision: 1.16 Checking in src/org/netbeans/modules/ant/freeform/ui/WebLocationsWizardPanel.java; new revision: 1.10; previous revision: 1.9 Removing test/unit/src/org/netbeans/modules/ant/freeform/ui/ClasspathPanelTest.java; new revision: delete; previous revision: 1.1 Checking in test/unit/src/org/netbeans/modules/ant/freeform/ui/ProjectModelTest.java; initial revision: 1.1
Thanks, from the commit log at least it looks that it will be easier to make fixes in the future...
Definitely.
This issue was solved long time ago. Because nobody has reopened it neither added comments, we are verifying/closing it now. If you are still able to reproduce the problem, please reopen. Thanks in advance.