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.
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.
See also issue #50143.
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 ...
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.
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.
The step #3 is the hard part; not possible without rewriting some nasty APIs.
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.
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
Verified.
*** Issue 89622 has been marked as a duplicate of this issue. ***