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 184830 - Defaulting Project Location inside previously created/opened project deserves a better heuristics
Summary: Defaulting Project Location inside previously created/opened project deserves...
Status: RESOLVED INVALID
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Projects UI (show other bugs)
Version: 6.x
Hardware: All All
: P1 normal (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-23 10:13 UTC by Antonin Nebuzelsky
Modified: 2010-04-27 18:30 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antonin Nebuzelsky 2010-04-23 10:13:26 UTC
When I create or open a certain project which expects nested projects, like NetBeans Platform Application project, any new project that I start creating has this "container" project's folder as its Project Location default.

IMO having one NetBeans Platform Application project open does not mean that I will be creating only NetBeans Module projects (which usually belong under the App project).

Having the default set in the current way can lead to frequent user errors when user does not pay enough attention to the Project Location field of new projects.

Jesse, if you tell me how the current mechanism works, how I think it could be improved.
Comment 1 Antonin Nebuzelsky 2010-04-23 12:46:14 UTC
What is even more weird about the current mechanism is that after finishing with a Platform App project and its modules, closing *all* projects, next project I try to create (e.g. a pure general Java Application) still defaults its Project Location under the already closed Platform App project's folder.
Comment 2 Jesse Glick 2010-04-23 19:21:18 UTC
As far as I know there is just one persisted location, used for any project type, via ProjectsChooser.projectFolder: the last parent dir used to create a new project. If the last project you created was a module inside a suite, then that is the default location for subsequent projects too. If you don't like that location, pick a different one. Simply opening a suite does not affect the default location for a new j2seproject.

The exception is that in the wizard for a new module, if you elect to add to a suite (the default behavior if a suite is open), the default location for that wizard panel is set to the suite's dir; this is reset to the current projectFolder if you choose "standalone module".
Comment 3 Jesse Glick 2010-04-26 20:49:39 UTC
(In reply to comment #2)
> The exception is that in the wizard for a new module, if you elect to add to a
> suite (the default behavior if a suite is open), the default location for that
> wizard panel is set to the suite's dir

One improvement I can make is that if you accept this default and Finish, the default project directory will be left untouched: core-main #f149670bf0c4
Comment 4 Antonin Nebuzelsky 2010-04-27 11:21:27 UTC
> One improvement I can make is that if you accept this default and Finish,
> the default project directory will be left untouched.

Good! This fixed the concern about completely unrelated projects being also put under the suite's dir if module was added previously.

Could NetBeans Platform Application project be treated separately as well. I know it is only a template of Module Suite project (and placing the new suite under the opened suite may make sense), but maybe we can differentiate Platform Application template and not default it under the already existing suite/app project?
Comment 5 Jesse Glick 2010-04-27 18:30:09 UTC
(In reply to comment #4)
> Could NetBeans Platform Application project be treated separately as well.

Suite project templates use the standard ProjectsChooser.projectFolder setting; there is no special handling for them. The special behavior is only for library wrapper module projects and suite component module projects.