Bug 490038 - New File wizard should be able to create non existing folders
Summary: New File wizard should be able to create non existing folders
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 4.6   Edit
Hardware: PC All
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Snjezana Peco CLA
QA Contact:
URL:
Whiteboard:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2016-03-20 14:43 EDT by Fred Bricon CLA
Modified: 2019-09-17 09:02 EDT (History)
7 users (show)

See Also:


Attachments
Providing a path (94.87 KB, image/png)
2016-03-21 14:54 EDT, Brian de Alwis CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fred Bricon CLA 2016-03-20 14:43:07 EDT
When creating a new file from the New > File menu, type foo/bar/Some.properties as file name causes an error "/ is an invalid character in resource name 'foo/bar/Some.properties'."

This forces users to first create the parent folders from the new Folder wizard, which is clearly a suboptimal workflow. Most modern IDEs allow the creation of a new File by allowing path+filename. Would be awesome if Eclipse could also create the file hierarchy when necessary.
Comment 1 Brian de Alwis CLA 2016-03-21 14:54:43 EDT
Created attachment 260454 [details]
Providing a path

You can do it, but the path needs to be done in the parent folder area.  It seems weird  until I realized that having directories in the "File name:" widget was equally weird.
Comment 2 Brian de Alwis CLA 2016-03-21 14:55:13 EDT
Marking as WORKSFORME.
Comment 3 Fred Bricon CLA 2016-03-21 15:04:19 EDT
This definitely counts as a UX fail to me.

Can't we just have 1 input text, prepopulated with the current path?
Comment 4 Lars Vogel CLA 2016-03-21 15:22:43 EDT
(In reply to Fred Bricon from comment #3)
> This definitely counts as a UX fail to me.
> 
> Can't we just have 1 input text, prepopulated with the current path?

+1, Gerrit reviews welcome
Comment 5 Eclipse Genie CLA 2016-03-22 08:49:03 EDT
New Gerrit change created: https://git.eclipse.org/r/69010
Comment 6 Snjezana Peco CLA 2016-03-22 08:52:35 EDT
https://git.eclipse.org/r/69010 fixes the issue.
I have tested it on Windows and Linux.
Comment 7 Brian de Alwis CLA 2016-03-23 10:18:37 EDT
Thanks for the speedy patch Snjezana.  I posted some comments on the patch.  This ResourceAndGroupContainer is used in other areas (the SaveAsDialog and the NewFolderWizardPage) and if we're going to fix this in one place, we should fix them in all.  But more to the point, having two areas for path names is kinda silly and if we're going to revisit one for UX reasons then we should do this right.

If we allow specifying new paths in the file name area, then we can get rid of the parent path area to the top and just use the path selection in the directory-selection area.
Comment 8 Snjezana Peco CLA 2016-03-23 17:25:51 EDT
(In reply to Brian de Alwis from comment #7)
> Thanks for the speedy patch Snjezana.  I posted some comments on the patch. 
> This ResourceAndGroupContainer is used in other areas (the SaveAsDialog and
> the NewFolderWizardPage) and if we're going to fix this in one place, we
> should fix them in all.  But more to the point, having two areas for path
> names is kinda silly and if we're going to revisit one for UX reasons then
> we should do this right.

I am not sure what change exactly you want. 
I could create a wizard with a field (as it is in Intelij IDEA), but maybe some users would want the existing behaviour. 
The current patch won't change the behaviour of the existing wizard. 

> 
> If we allow specifying new paths in the file name area, then we can get rid
> of the parent path area to the top and just use the path selection in the
> directory-selection area.

> The ResourceAndGroupContainer is used in other locations too (Save As dialog, New Folder wizard), and 
> those locations should probably be fixed too.

If this patch is acceptable, I can add it to other places, too.

BTW
I have also fixed a bug that can be reproduced in the following way:

- enter an invalid file name ("/", for instance)
- click the Advanced button

You will get the "Unhandled event loop exception" exception.
Comment 9 Snjezana Peco CLA 2016-03-23 17:27:11 EDT
I have updated the patch - https://git.eclipse.org/r/69010.
Comment 10 Lars Vogel CLA 2016-03-24 05:24:18 EDT
(In reply to Snjezana Peco from comment #8)
> I could create a wizard with a field (as it is in Intelij IDEA), but maybe
> some users would want the existing behaviour. 
> The current patch won't change the behaviour of the existing wizard. 

The patch should change the existing wizard so that the folder and the file name is in one field, prepopulated with the current path. See Comment 3 and Comment 4.
Comment 11 Snjezana Peco CLA 2016-03-24 16:44:47 EDT
(In reply to Lars Vogel from comment #10)
> (In reply to Snjezana Peco from comment #8)
> > I could create a wizard with a field (as it is in Intelij IDEA), but maybe
> > some users would want the existing behaviour. 
> > The current patch won't change the behaviour of the existing wizard. 
> 
> The patch should change the existing wizard so that the folder and the file
> name is in one field, prepopulated with the current path. See Comment 3 and
> Comment 4.

That would require the API changes. Do you really want to change the mentioned wizards and dialog?
Comment 12 Lars Vogel CLA 2016-03-29 08:17:04 EDT
(In reply to Snjezana Peco from comment #11)
> That would require the API changes. Do you really want to change the
> mentioned wizards and dialog?

I think we could change the UI representation of the wizard without API breakage. But I'm also OK with fixing the behavior of the existing UI, if that is what you prefer.
Comment 13 Mickael Istria CLA 2019-06-03 10:53:53 EDT
Let's try it for 4.13; I'll try to rebase Snjezana patch soon.
Comment 14 Dani Megert CLA 2019-09-17 09:02:07 EDT
We have many wizards. If we start to add that feature it would have to be added everywhere. I don't think anyone would be willing to take up that work.