Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Haug2018-06-15 05:57:48 -0400
committerJuergen Haug2018-06-15 08:37:49 -0400
commitfce1a44a2f8008dbb3729e09a93ab4ac60655ce8 (patch)
tree64661c05e22ae306bdb51e077b7bfb3caebcebb2
parentb2e558a382dc661f16439bfe2ee8e311bc2ccefd (diff)
downloadorg.eclipse.etrice-fce1a44a2f8008dbb3729e09a93ab4ac60655ce8.tar.gz
org.eclipse.etrice-fce1a44a2f8008dbb3729e09a93ab4ac60655ce8.tar.xz
org.eclipse.etrice-fce1a44a2f8008dbb3729e09a93ab4ac60655ce8.zip
Bug 532878 [core] standalone resolved platfrom uri to absolute
-rw-r--r--plugins/org.eclipse.etrice.core.common/src/org/eclipse/etrice/core/common/scoping/StandardModelLocator.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/plugins/org.eclipse.etrice.core.common/src/org/eclipse/etrice/core/common/scoping/StandardModelLocator.java b/plugins/org.eclipse.etrice.core.common/src/org/eclipse/etrice/core/common/scoping/StandardModelLocator.java
index 4e01fdfed..c83edc975 100644
--- a/plugins/org.eclipse.etrice.core.common/src/org/eclipse/etrice/core/common/scoping/StandardModelLocator.java
+++ b/plugins/org.eclipse.etrice.core.common/src/org/eclipse/etrice/core/common/scoping/StandardModelLocator.java
@@ -25,6 +25,7 @@ import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.emf.common.EMFPlugin;
import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.URIConverter;
import org.eclipse.xtext.resource.ClasspathUriResolutionException;
@@ -156,7 +157,18 @@ public class StandardModelLocator implements IModelLocator {
}
catch (Throwable e) {
}
+ }
+ else if (uri.isPlatform()) {
+ String platformResourcePath = uri.toPlatformString(true);
+
+ // if workspace is not available, convert platform URI to absolute URI
+ if (EcorePlugin.getWorkspaceRoot() == null) {
+ URI resolvedURI = EcorePlugin.resolvePlatformResourcePath(platformResourcePath);
+ if(resolvedURI != null)
+ resolve = resolvedURI.toString();
+ }
}
+
return resolve;
}

Back to the top