Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 370509

Summary: New E4 Application wizard does not handle spaces in project name
Product: [Eclipse Project] e4 Reporter: Curtis Windatt <curtis.windatt.public>
Component: UIAssignee: Eric Moffatt <emoffatt>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: emoffatt, Michael_Rennie, remy.suen, tom.schindl
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Patch for spaces in product id
none
Better fix none

Description Curtis Windatt CLA 2012-02-02 18:35:16 EST
Created attachment 210481 [details]
Patch for spaces in product id

1) Create a new project > new e4 application project
2) Choose a project name with spaces or another disallowed character
3) Complete the wizard
4) Try running the product
Result:
Application could not start because the product is not found

There are two problems here:
1) The product name should have it's spaces replaced with underscores so the product configuration has the right settings.  I have attached a patch to deal with this.

2) The application model uri set in E4Application.loadApplicationModel() does not handle the spaces correctly leading to an IOException.  I am not sure if this is because of incorrect escaping or the application is looking at the project name instead of the plug-in name.
Comment 1 Curtis Windatt CLA 2012-02-03 17:34:10 EST
Created attachment 210530 [details]
Better fix

This patch provides a better solution for validating the product/plug-in id in the wizard.

One additional restriction I discovered is that the xmi model URI parser doesn't handle plug-in names that contain underscores and numbers well.  It assumes that if an underscore exists in the URI, it must be trying to describe a plug-in version.  I'm not sure who specifies the URI structure.
See: PlatformURLPluginConnection.parse()
Comment 2 Curtis Windatt CLA 2012-02-03 17:35:32 EST
Remy, is this where bugs against org.eclipse.e4.tools should be filed or is platform UI responsible for them as well?
Comment 3 Remy Suen CLA 2012-02-03 18:08:25 EST
(In reply to comment #2)
> Remy, is this where bugs against org.eclipse.e4.tools should be filed or is
> platform UI responsible for them as well?

e4/UI is correct, Curtis.
Comment 4 Eric Moffatt CLA 2012-02-07 14:08:47 EST
Pushed (on Curtis' behalf) in >20120207.

commit c68d805b69bd6c2cc50ce2f3ac75b49c4ac91db7

Curtis, nice fix, thanks...

BTW while I doubt we'll be doing many other fixes here it turns out that there is indeed a GIT repo for this...but the patch applied fine.