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 228255 - favorites cannot create file in arbitrary folder
Summary: favorites cannot create file in arbitrary folder
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 7.2.1
Hardware: PC Linux
: P2 normal (vote)
Assignee: Milos Kleint
URL:
Keywords: REGRESSION
: 230136 230678 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-04-04 15:27 UTC by drampulla
Modified: 2013-06-08 01:08 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 drampulla 2013-04-04 15:27:39 UTC
Starting in version 7.2.1 when I try to create a new file from the favorites menu it 
1. does not default the folder to the folder that I right clicked on
2. It is assuming that I am creating this file in the current "default project" and therefore does not allow me to create a file in folder I want

The only workaround I've come up with is to drop into my shell, touch the file, and then open it in Netbeans.
Comment 1 Milos Kleint 2013-04-08 09:40:38 UTC
some file wizards assume owning project and within that project only allow specific locations. eg. the java wizards will only let you create a java file in known java source roots, not considering your folder selection in that case. that's designed behaviour afaik.

what file(s) have you tried to create?
Comment 2 Milos Kleint 2013-04-12 15:07:52 UTC
related to issue 227848
Comment 3 Petr Jiricka 2013-04-23 11:26:52 UTC
> some file wizards assume owning project and within that project 
> only allow specific locations

This is only a part of the problem. The other issue is that the first step in the New File wizard (Choose File Type) has a Project combo box which forces you to choose a project, even if you initiated the New File wizard from Favorites. So even if the particular file wizard (e.g. txt file) does not require to be in a project, the wizard forces you to. To fix that, I guess there would have to be a <No Project> option in the Project combo box.

> The only workaround I've come up with is to drop into my shell...

One other workaround I found is to close all projects in the IDE. After that, the wizard allows you to create some files (e.g. txt file or html file) in Favorites.
Comment 4 Milos Kleint 2013-04-23 11:30:16 UTC
(In reply to comment #3)
> > The only workaround I've come up with is to drop into my shell...
> 
> One other workaround I found is to close all projects in the IDE. After that,
> the wizard allows you to create some files (e.g. txt file or html file) in
> Favorites.

That's only a result of a recent community contribution and only works in upcoming 7.4 (and maybe 7.3, not sure there)
Comment 5 Milos Kleint 2013-06-04 14:51:47 UTC
*** Bug 230678 has been marked as a duplicate of this bug. ***
Comment 6 Milos Kleint 2013-06-04 14:53:08 UTC
*** Bug 230136 has been marked as a duplicate of this bug. ***
Comment 7 Alexander Pepin 2013-06-04 15:08:44 UTC
see also bug #230134
Comment 8 Vladimir Voskresensky 2013-06-06 06:32:57 UTC
Milos, could you, please, investigate the issue. It blocks automatic tests.
Thanks!
Comment 9 Milos Kleint 2013-06-06 08:54:30 UTC
http://hg.netbeans.org/core-main/rev/2de343d643c6
http://hg.netbeans.org/core-main/rev/b00d9b2eeec9

sort of fixed I hope, still there's way to many pathways through the UI. here's what I tested.

1. with no projects opened.

   a. in toolbar new file/folder
   b. right click in favourites new file/other -> file/folder 
   c. right click in favourites  new folder (preselected template by now)

2. with one project opened.
   a. new folder on project popup
   b. new file/other ->file/folder on project popup
   c. in favourites new folder on project popup
   d. in favourites new file/other -> file/folder
   e. in toolbar and main menu new file/folder

in all scenarios attempted to change the parent folder location.
Comment 10 Quality Engineering 2013-06-08 01:08:34 UTC
Integrated into 'main-golden', will be available in build *201306072301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/b00d9b2eeec9
User: Milos Kleint <mkleint@netbeans.org>
Log: #230134, #228255 simpliest possible cut through the spageti code known as new file wizard. There's way too many optional pathways through the code and ui. attempted to make both in-project and out-of-project creation work at the same time.. includes fixes to parent folder selection ui.