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 43604

Summary: Sources mixed with tests
Product: java Reporter: Milan Kubec <mkubec>
Component: ProjectAssignee: Tomas Zezula <tzezula>
Status: CLOSED FIXED    
Severity: blocker    
Priority: P2    
Version: 4.x   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 41537    
Attachments: exc stack trace

Description Milan Kubec 2004-05-20 11:22:31 UTC
[custom build 20040520]
I downloaded project (jfreechart) which has
sources mixed with tests. So I wanted to create
project from ex. sources - I selected src as
source folder and I also selected src as tests
folder, after clicking Finish I got
IllegalArgumentException and no project was created.

I think it can be regular usecase that user
already has some project where sources are mixed
with tests.
Comment 1 Milan Kubec 2004-05-20 11:23:04 UTC
Created attachment 15027 [details]
exc stack trace
Comment 2 Milan Kubec 2004-05-20 11:27:47 UTC
I'm no more able to create that project even if I specify only src
root. The same exception is thrown. Raising prio to P2.
Comment 3 Jesse Glick 2004-05-20 18:23:28 UTC
The j2seproject type does not (and will not) support tests mixed into
the source dir. However the import wizard should deal with this
attempted user action more gracefully:

- should disable Finish if the src and test dirs are the same

- should disable Next if the proposed new project dir is already
occupied by a project
Comment 4 Tomas Zezula 2004-05-20 21:07:01 UTC
OK, I will add the test for this, disable the Finish button and
display some error message.
Comment 5 Tomas Zezula 2004-05-25 09:55:18 UTC
Checking in
src/org/netbeans/modules/java/j2seproject/ui/wizards/Bundle.properties;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/wizards/Bundle.properties,v
 <--  Bundle.properties
new revision: 1.15; previous revision: 1.14
done
Checking in
src/org/netbeans/modules/java/j2seproject/ui/wizards/PanelSourceFolders.java;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/wizards/PanelSourceFolders.java,v
 <--  PanelSourceFolders.java
new revision: 1.6; previous revision: 1.5
done
Comment 6 Milan Kubec 2004-06-30 14:54:12 UTC
Verified in 040630, wizard disables Next when Sources folder is the
same as Tests folder.