Community
Participate
Working Groups
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.
Created attachment 199487 [details] patch to avoid the exception
ping
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.
I have committed to R1_5_maintenance Will do a build over the next few days and get a build in SR1.
Not sure if this defect is related to bug 333960
(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.
(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
(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 !