Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 314336 - org.eclipse.gmf.internal.common URIUtil bug in IFile getFile(uri) conversion
Summary: org.eclipse.gmf.internal.common URIUtil bug in IFile getFile(uri) conversion
Status: NEW
Alias: None
Product: GMF-Tooling
Classification: Modeling
Component: Core (show other bugs)
Version: 2.2.2   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: gmf.generation-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-25 15:21 EDT by Daniel Glaser CLA
Modified: 2010-07-19 22:21 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Glaser CLA 2010-05-25 15:21:33 EDT
In class org.eclipse.gmf.internal.common.URIUtil, the handling of URIs in "public static IFile getFile(URI uri)" seems to miss some conversion. If the Project Name includes e.g. spaces, which are represented as "%20" in the uri, the tool can not locate the file (line 35) and therefore the workspaceResource contains null instead of an IFile instance. If using a project name without problematic characters, everything works fine. This happens for example in GMF Dashboard, which makes use of the URIUtils when invoking the Edit Action for some model file.

Converting the uri-coded characters to a string would be a solution.

Tests to reproduce:
1. Create new GMF project named "Test GMF"
2. Open View GMF Dashboard
3. Click on Domain Model -> Create
4. Follow the Wizard with default settings
5. Close the the newly opened editor
6. Click Domain Model -> Edit (Bug: Nothing happens, no Editor opens)

Using "Test_GMF" in step 1 reproduces correct behaviour.

-- Configuration Details --
Product: Eclipse 1.2.2.20100122-1337 (org.eclipse.epp.package.jee.product)
Installed Features:
 org.eclipse.platform 3.5.2.R35x_v20100210-0800-9hEiFzmFst-TiEn9hNYgDWg1XN8ulH_JvCNGB
Comment 1 Eclipse Webmaster CLA 2010-07-19 22:21:24 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Generation was the original product and component for this bug