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 75960 - Unwanted NetBeansProjects folder created
Summary: Unwanted NetBeansProjects folder created
Status: VERIFIED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Projects UI (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Milan Kubec
URL:
Keywords:
: 89622 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-05-05 08:28 UTC by Jiri Skrivanek
Modified: 2007-05-18 14:36 UTC (History)
4 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 Jiri Skrivanek 2006-05-05 08:28:17 UTC
After fix of issue 50143 it happens that NetBeansProjects folder is
automatically created even you don't create any new object. To reproduce:

- open New Project wizard (File|New Project)
- click Next
- click Cancel and folder .../Documents and Settings/My
Documents/NetBeansProjects is created.

Build 20060504-1526, JDK1.5.0_06, WindowsXP.
Comment 1 Jan Lahoda 2006-05-05 09:56:14 UTC
See also issue #50143.
Comment 2 Milan Kubec 2006-05-05 11:50:09 UTC
In order to show the Create Project dialog without inline error message the
folder must be already created. The only place where it could be reverted when
user hits Cancel or selects different folder is in wizard itself, but it's not
good to delete folder just becasue it's empty. Or rewrite all wizards that use
ProjectChooser.getProjectFolder() to count with not existing folder being returned.

Note that the empty folder is even created when user clicks Open Project action
for the first time, because wizard has to show content of some projects folder.
If it's not created in this case it would show user home dir or My Documents in
case of Windows.

Is it really P2 problem that empty folder is being created? E.g. there is couple
of empty folders in My Documents folder on Windows - they usualy start with My ...
Comment 3 Jiri Skrivanek 2006-05-05 12:29:30 UTC
Maybe it is time to revise wizards API to handle cases when you want to create
subfolders only when final object is really created. If you cancel wizard it
should not create anything. Look at issue 56805. It is similar and probably you
find other duplicates.
Comment 4 jrojcek 2006-05-05 15:23:27 UTC
I think the right behavior from user view should be like this:

1. The user starts the IDE for the very first time.
2. Goes to Open Project dialog which opens up in user home (My Documents on windows). The 
"NetBeansProjects" folder is not created.
3. Goes to create a new project. The wizard offers "My Documents\NetBeansProjects\JavaApplication" as 
the initial project folder. The user cancels the wizard and nothing gets created. Not even the 
"NetBeansProjects" folder. It doesn't matter whether in which wizard step the user cancels the wizard.

4. Goes again to Open Project dialog which opens up in user home (My Documents on windows). The 
"NetBeansProjects" folder is not created.
5. Goes again to Open Project dialog. It offers the "My Documents\NetBeansProjects\JavaApplication" as 
the initial project folder. He finishes the wizard and project is created.

6. Goes again to Open Project dialog which opens up in "NetBeansProjects" folder.
Comment 5 Jesse Glick 2006-05-05 15:35:45 UTC
The step #3 is the hard part; not possible without rewriting some nasty APIs.
Comment 6 Lukas Hasik 2006-05-31 13:01:44 UTC
it seems weird to me that it creates an unwanted folder. I remember that is
exactly the behaviour that I don't like on Windows - it creates folders/files
whenever it wants and wherever it wants. 
Comment 7 Milan Kubec 2007-04-26 15:23:23 UTC
Default projects folder won't be created if user cancels new project wizard or
nothing was created in the folder.

Checking in OpenProjectListSettings.java;
/cvs/projects/projectui/src/org/netbeans/modules/project/ui/OpenProjectListSettings.java,v
 <--  OpenProjectListSettings.java
new revision: 1.29; previous revision: 1.28
done
Checking in actions/NewProject.java;
/cvs/projects/projectui/src/org/netbeans/modules/project/ui/actions/NewProject.java,v
 <--  NewProject.java
new revision: 1.32; previous revision: 1.31
done
Comment 8 Jiri Skrivanek 2007-04-27 12:30:29 UTC
Verified.
Comment 9 Milan Kubec 2007-05-18 14:36:25 UTC
*** Issue 89622 has been marked as a duplicate of this issue. ***