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 44926 - Cannot choose project dir above existing source root in j2seproject import
Summary: Cannot choose project dir above existing source root in j2seproject import
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: Tomas Zezula
URL:
Keywords:
: 44355 (view as bug list)
Depends on:
Blocks: 41537
  Show dependency tree
 
Reported: 2004-06-16 09:17 UTC by John Jullion-ceccarelli
Modified: 2007-09-26 09:14 UTC (History)
5 users (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 John Jullion-ceccarelli 2004-06-16 09:17:25 UTC
There is a total lack of consistency in where we
allow the user to put the project directory in
relation to the source directories for each
project template. This makes the IDE seem
scattered and unprofessional, without a uniting
idea of where the project dir fits in with the
development cycle.

For example:

* Empty Java Project - source dir must be within
project dir.
* J2SE Project with Existing Sources - source dir
must be separate from project dir.
* J2SE Project with Existing Ant Script - source
dir can be both inside or separate from project
dir, default is inside.
* Web Apps from Existing Sources - project dir can
be same as web module root, renaming of nb
build.xml means that web apps Project from
Existing Sources is also meant for using with your
own Ant build script.
Comment 1 Petr Hrebejk 2004-06-16 09:56:36 UTC
I fear we can not serve here. This is how it is designed. Ve are
trying to cover the usecases users may potentialy have. I also thing
that this is not related to ui at all, but rather to project types.
Comment 2 Jesse Glick 2004-06-16 15:47:47 UTC
Agreed. Re.

Empty j2seproject: src inside project dir is preferred, no real reason
to offer other options.

j2seproject from existing sources: source dir is wherever it is, we
don't pick that. Project dir may be above it, or not; both
alternatives need to be supported.

freeform project with J2SE-style wizard: source and project dirs can
be wherever you please. There is no "default" as such.

web projects: don't know in detail but whatever they are doing I am
sure they have their reasons. The scenarios are not the same as for
j2seprojects.
Comment 3 jrojcek 2004-06-18 10:31:22 UTC
Re. "j2seproject from existing sources: source dir is wherever it is, we
don't pick that. Project dir may be above it, or not; both
alternatives need to be supported."

Currently we don't support project dir above the existing source root. I think that's what 
this bug is actually about.

Reopening... close if disagree.
Comment 4 Jesse Glick 2004-06-18 15:10:43 UTC
"Currently we don't support project dir above the existing source
root" - we don't? Why not?
Comment 5 jrojcek 2004-06-18 15:45:50 UTC
Why not? Because we didn't want to. I thought we all agreed with this solution. We wanted 
to avoid a clash with existing 'build.xml' and existing build/dist folders. If we want to 
support project dir above the source dir then the wizard needs to change and take care of 
exception cases.
Comment 6 Jesse Glick 2004-06-18 15:57:44 UTC
True; but the wizard could check these things. It would need to check
that the requested project dir does not contain a build.xml nor
subdirs named build/ nor dist/ nor nbproject/.
Comment 7 Jesse Glick 2004-07-13 18:22:14 UTC
Please reevaluate.
Comment 8 Tomas Zezula 2004-07-15 15:01:04 UTC
*** Issue 46169 has been marked as a duplicate of this issue. ***
Comment 9 Tomas Zezula 2004-07-15 15:03:15 UTC
Changed priority to P3.
Comment 10 ivan 2004-07-15 20:06:07 UTC
When issue 44926 was marked as duplicate of this one it
failed to note that you can't create the project directory _under_
the sources. I could create it above the sources in /tmp.
(Or does above have a strict meaning of "doesn't contain the sources
somewhere under it"? Is that with softlink loops or without :-).

Comment 11 Jesse Glick 2004-07-15 23:21:30 UTC
You cannot create project metadata directories inside Java package
trees and we have no plans to permit that either. It is technically
possible using freeform projects, though you will see the metadata dir
in your package view which may be disconcerting.
Comment 12 Jiri Kovalsky 2004-07-16 07:42:51 UTC
Could somebody please confirm that this issue will be fixed in Promo-D
timeframe ? Target Milestone still says TBD and this defect is very
important from VCS support point of view.
Comment 13 jrojcek 2004-07-16 15:27:36 UTC
I have updated the spec to allow the user to select any folder that doesn't contain files or 
folders generated with NetBeans.

http://projects.netbeans.org/nonav/buildsys/j2se-project-ui-
spec.html#Step_2_New_Java_Project_with

Btw, the same issue should be filed agains the webapp project with existing sources.
Comment 14 jrojcek 2004-07-16 17:06:17 UTC
*** Issue 44355 has been marked as a duplicate of this issue. ***
Comment 15 Tomas Zezula 2004-07-19 16:02:50 UTC
Checking in
j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProjectGenerator.java;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProjectGenerator.java,v
 <--  J2SEProjectGenerator.java
new revision: 1.18; previous revision: 1.17
done
Processing log script arguments...
More commits to come...
Checking in
j2seproject/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.28; previous revision: 1.27
done
Checking in
j2seproject/src/org/netbeans/modules/java/j2seproject/ui/wizards/PanelSourceFolders.form;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/wizards/PanelSourceFolders.form,v
 <--  PanelSourceFolders.form
new revision: 1.9; previous revision: 1.8
done
Checking in
j2seproject/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.18; previous revision: 1.17
done
Comment 16 Jiri Kovalsky 2004-07-26 13:07:27 UTC
Excuse me, but I probably don't get something obvious here. Why it is
required not to have build.xml and manifest.mf files under the
specified directory if those files are not being created during "New
Project..." operation. I know that I actually had to use freeform
project type but why is this limitation necessary ?

Can somebody please explain it to me ?
Comment 17 Petr Jiricka 2004-07-26 13:42:00 UTC
For WebApps, if build.xml already exists, we create a new build script
not called build.xml which is then used by the IDE.
Comment 18 Tomas Zezula 2004-07-26 14:12:59 UTC
The build.xml is generated when you create new project. If it was
already there it would be rewritten. I don't want to generate the next
build.xml file, two build files in the single project is much more
worse then not to allow user to create J2SEProject from it.
Comment 19 Jiri Kovalsky 2004-07-26 14:43:51 UTC
Okay, but why don't you create it if there is no build.xml file ?