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 53533

Summary: GUI to set unit test information for freeform projects
Product: java Reporter: Jesse Glick <jglick>
Component: FreeformAssignee: David Konecny <dkonecny>
Status: RESOLVED FIXED    
Severity: blocker CC: jrojcek
Priority: P2 Keywords: UI
Version: 4.x   
Hardware: All   
OS: All   
URL: http://projects.netbeans.org/buildsys/freeform-project-ui-spec-promoe.html#Sources
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on:    
Bug Blocks: 47835    

Description Jesse Glick 2005-01-18 01:00:50 UTC
JavaProjectGenerator now lets you set a flag
isTests on a compilation unit in case it contains
unit tests. The freeform properties dialog
(Sources panel) should let you configure both
plain source roots and test roots, and set this
flag correspondingly. Note that only a whole
compilation unit can be marked for being a test,
so you need to be using separate classpaths in
order to mark just some roots as test roots.
Comment 1 David Konecny 2005-01-19 17:20:14 UTC
"Note that only a whole
compilation unit can be marked for being a test,
so you need to be using separate classpaths in
order to mark just some roots as test roots." - in order to implement
this I has to set and disable "Separate Classpath for Each Source
Package Folder" checkbox when both sources and test source are specified. 

Done in:
src/org/netbeans/modules/java/freeform/ui/Bundle.properties;
new revision: 1.3; previous revision: 1.2
src/org/netbeans/modules/java/freeform/ui/ClasspathPanel.java;
new revision: 1.3; previous revision: 1.2
src/org/netbeans/modules/java/freeform/ui/OutputPanel.java;
new revision: 1.3; previous revision: 1.2
src/org/netbeans/modules/java/freeform/ui/ProjectModel.java;
new revision: 1.4; previous revision: 1.3
src/org/netbeans/modules/java/freeform/ui/SourceFoldersPanel.form;
new revision: 1.3; previous revision: 1.2
src/org/netbeans/modules/java/freeform/ui/SourceFoldersPanel.java;
new revision: 1.3; previous revision: 1.2
src/org/netbeans/modules/java/freeform/ui/SourceFoldersWizardPanel.java;
Comment 2 Jesse Glick 2005-01-22 21:47:01 UTC
I think it is fine to force separate classpaths if you are using test
roots - you are almost surely going to actually have different
classpaths for them anyway. Another approach would be to keep that
checkbox enabled but when off, put tests into their own compilation
unit (together).
Comment 3 David Konecny 2005-01-23 19:51:57 UTC
"Another approach would be to keep that checkbox enabled but when off,
put tests into their own compilation unit (together)." - yes, I was
thinking about that too. Possible, but more work, e.g. when opening
project properties and there are two compilation units with the same
classpath but one for sources and second for tests then init checkbox
to OFF, etc. Can be done in future if needed.