Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 351813 - WorkspaceSynchronizer problem with platform plug-in URI
Summary: WorkspaceSynchronizer problem with platform plug-in URI
Status: RESOLVED FIXED
Alias: None
Product: EMF Services
Classification: Modeling
Component: Transaction (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 blocker
Target Milestone: ---   Edit
Assignee: EMF Services Transaction inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-12 06:45 EDT by Mariot Chauvin CLA
Modified: 2017-02-24 15:20 EST (History)
2 users (show)

See Also:


Attachments
patch to avoid the exception (1.62 KB, patch)
2011-07-12 08:49 EDT, Mariot Chauvin CLA
ahunter.eclipse: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mariot Chauvin CLA 2011-07-12 06:45:44 EDT
WorkspaceSynchronizer#getFile enables one to retrieve a workspace file from an EMF resource. The javadoc of the method explains that it will do it only if the resource has a platform-resource URI. However the implementation supports more scheme and finally, if it could not retrieve the file, try to ask to the workspace with the EMF URI translated to an absolute java net URI.

With the modifications made to org.eclipse.core.internal.localstore.FileSystemResourceManager for bug 233939, if the given URI is a platform plug-in one, a core exception will be thrown : 
 
org.eclipse.core.runtime.CoreException: No file system is defined for scheme: platform
    at org.eclipse.core.internal.filesystem.Policy.error(Policy.java:55)
    at org.eclipse.core.internal.filesystem.Policy.error(Policy.java:50)
    at org.eclipse.core.internal.filesystem.InternalFileSystemCore.getFileSystem(InternalFileSystemCore.java:65)
    at org.eclipse.core.internal.filesystem.InternalFileSystemCore.getStore(InternalFileSystemCore.java:107)
    at org.eclipse.core.filesystem.EFS.getStore(EFS.java:470)
    at org.eclipse.core.internal.localstore.FileSystemResourceManager.findLinkedResourcesPaths(FileSystemResourceManager.java:142)
    at org.eclipse.core.internal.localstore.FileSystemResourceManager.allPathsForLocationNonCanonical(FileSystemResourceManager.java:124)
    at org.eclipse.core.internal.localstore.FileSystemResourceManager.allPathsForLocation(FileSystemResourceManager.java:62)
    at org.eclipse.core.internal.localstore.FileSystemResourceManager.allResourcesFor(FileSystemResourceManager.java:216)
    at org.eclipse.core.internal.resources.WorkspaceRoot.findFilesForLocationURI(WorkspaceRoot.java:113)
    at org.eclipse.core.internal.resources.WorkspaceRoot.findFilesForLocationURI(WorkspaceRoot.java:104)
    at org.eclipse.emf.workspace.util.WorkspaceSynchronizer.getFile(WorkspaceSynchronizer.java:357)
    at org.eclipse.emf.workspace.util.WorkspaceSynchronizer.getFile(WorkspaceSynchronizer.java:270)

This was not the case with previous version. Rather than fixing all caller code, I think we could simply return if URI is a platform plug-in one.
Comment 1 Mariot Chauvin CLA 2011-07-12 08:49:50 EDT
Created attachment 199487 [details]
patch to avoid the exception
Comment 2 Mariot Chauvin CLA 2011-07-25 10:05:55 EDT
ping
Comment 3 Mariot Chauvin CLA 2011-08-18 07:45:15 EDT
The problem is a blocker for our product on top of Eclipse 3.7 and the deadline for SR1 is approaching. The patch is very simple and fix the problem for all plug-ins on top of EMF Transaction which may encounter this bug.

If there is nobody to at least review provided patches such as this one, may be it is necessary to add new committers on this component.
Comment 4 Anthony Hunter CLA 2011-08-23 17:51:13 EDT
I have committed to R1_5_maintenance

Will do a build over the next few days and get a build in SR1.
Comment 5 Anthony Hunter CLA 2011-08-23 17:58:31 EDT
Not sure if this defect is related to bug 333960
Comment 6 Anthony Hunter CLA 2011-08-23 20:57:55 EDT
(In reply to comment #4)
> I have committed to R1_5_maintenance
> 
> Will do a build over the next few days and get a build in SR1.

This fix is in the indigo repository for SR1.
Comment 7 Anthony Hunter CLA 2011-08-23 20:59:50 EDT
(In reply to comment #5)
> Not sure if this defect is related to bug 333960

Should have been not sure if this defect is related to bug 333690
Comment 8 Mariot Chauvin CLA 2011-08-24 03:55:02 EDT
(In reply to comment #6)
> (In reply to comment #4)
> > I have committed to R1_5_maintenance
> > 
> > Will do a build over the next few days and get a build in SR1.
> 
> This fix is in the indigo repository for SR1.

Thanks Anthony !