| Summary: | [M2x IDE Integration] CoreException when invoking XtendXpandUtil#getUnderlyingFile(String, ResourceLoader) for resources stored in plug-ins | ||
|---|---|---|---|
| Product: | [Automotive] Sphinx | Reporter: | Stephan Eberle <stephaneberle9> |
| Component: | Core | Assignee: | Stephan Eberle <stephaneberle9> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | ali.akar82, idydieng |
| Version: | 0.7.0 | ||
| Target Milestone: | 0.7.0 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
I think the exception occur only for Eclipse 3.7. Indeed, the org.eclipse.core.internal.localstore.FileSystemResourceManager#findLinkedResourcesPaths(URI inputLocation, final ArrayList<IPath> results) throws CoreException method is used in FileSystemResourceManager#allPathsForLocationNonCanonical(URI) for Eclipse 3.7 like this:
....
try {
findLinkedResourcesPaths(inputLocation, results);
} catch (CoreException e) {
Policy.log(e);
}
For Eclipse 3.6, the org.eclipse.core.internal.localstore.FileSystemResourceManager#findLinkedResourcesPaths() does not exist and is not used (i.e., below code as missing). That is why the bug occur only for Eclipse 3.7.
According to the exception stack trace, the critical point is more likely org.eclipse.core.internal.filesystem#InternalFileSystemCore#getFileSystem(String), line 65. It logs an internal error no matter if the calling application catches and handles the exception subsequently or not. In our case XtendXpandUtil#getUnderlyingFile() does catch the exception and returns null (which is the expected behavior), so the problem does not entail any consequences. Nevertheless, it is somehow annoying to see the Error Log view getting filled up even though there is no actual misbehavior. To avoid that, XtendXpandUtil.getUnderlyingFile() should be improved so as to make sure that IWorkspaceRoot#findFilesForLocationURI(), and subsequently InternalFileSystemCore#getFileSystem(), do never get invoked with a ''bundleresource'' URL. Fixed as proposed in comment #2. Mass-closing Resolved tickets |
org.eclipse.core.runtime.CoreException: No file system is defined for scheme: bundleresource 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.sphinx.xtendxpand.util.XtendXpandUtil.getUnderlyingFile(XtendXpandUtil.java:86) at org.eclipse.sphinx.xtendxpand.ui.util.WorkspaceStorageFinder.findStorage(WorkspaceStorageFinder.java:82) at org.eclipse.xtend.shared.ui.Activator.findStorage(Activator.java:239) at org.eclipse.xtend.shared.ui.core.internal.XtendXpandProject.loadXtendXpandResource(XtendXpandProject.java:310) at org.eclipse.xtend.shared.ui.core.internal.XtendXpandProject.loadXtendXpandResource(XtendXpandProject.java:298) at org.eclipse.xtend.shared.ui.core.internal.XtendXpandProject.findExtXptResource(XtendXpandProject.java:244) at org.eclipse.xtend.shared.ui.core.internal.XtendXpandProject.findXtendXpandResource(XtendXpandProject.java:397) at org.eclipse.xtend.shared.ui.core.builder.XtendXpandBuilder.fullBuild(XtendXpandBuilder.java:324) at org.eclipse.xtend.shared.ui.core.builder.XtendXpandBuilder.build(XtendXpandBuilder.java:158) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728) ...