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

Bug 314336

Summary: org.eclipse.gmf.internal.common URIUtil bug in IFile getFile(uri) conversion
Product: [Modeling] GMF-Tooling Reporter: Daniel Glaser <daniel.glaser>
Component: CoreAssignee: gmf.generation-inbox <gmf.generation-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: ahunter.eclipse
Version: 2.2.2   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:

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