DESCRIPTION

Bug 490038 - New File wizard should be able to create non existing folders

Change-Id: Ib5b8de84b35a369fbda5b11accc7be6e81d4ceda
Signed-off-by: Lucia Hendrix xxx@xxx.xxx


COMMENTS

author: Lucia Hendrix
date: 2016-03-22 12:49:00.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2016-03-22 12:49:06.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/8677/

-------------------------------------
author: Brenden Conley
date: 2016-03-22 14:30:42.000000000

Patch Set 1: Verified+1

Build Successful 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/8677/ : SUCCESS

-------------------------------------
author: Teagan Marsh
date: 2016-03-23 14:12:17.000000000

Patch Set 1: Code-Review-2

(2 comments)

Thanks for the speedy patch, Snjezana.  I took a look at your patch last night, and it can be simplified as much of the functionality is already done in ResourceAndGroupContainer — really we just need to relax the assumption that the last component is a filename.

But this change also shows some strange inconsistencies. "/ddd" is invalid but "/ddd/ddd" is not. "./ddd" is invalid, but "./ddd/ddd" is not. "." is invalid, "d/." is invalid but "d/d/." is not. "ddd/../ddd" is invalid, but "ddd/ddd/../ddd" and "ddd/../ddd/ddd" are not.  We could use the Path class to perform normalization, but it also normalizes "foo/." (a directory) into "foo", which may not match the user's strange intent.

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

But if we relax the constraint that the filename area can actually specify a path, then we should just do away with the resource path entirely and just have a single field.

I'm going to -2 this patch as you're relaxing an assumption but there's still UX confusion around having two path areas.

Line:825, bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardNewFileCreationPage.java -> Much of this logic is actually already handled in ResourceAndGroupContainer#validateFullResourcePath() and handled in the code above.  I think the only issue that needs to be handled here is the trailing slash

Line:826, bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardNewFileCreationPage.java -> Unix-specific.  Better to use Path.hasTrailingSeparator() and isRoot() too.

-------------------------------------
