summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorRené Brandstetter2013-11-29 15:54:44 (EST)
committer Gerrit Code Review @ Eclipse.org2013-12-02 13:00:41 (EST)
commit4cd7ec0c141090944df560bae0c6cbc8524b5020 (patch)
treed224daac595fac085aabc9fbc2c7cd4e8ba0e2e7
parentcf38dbb74abf87a193b4754b0274410dc105934e (diff)
downloadeclipse.platform.ui-4cd7ec0c141090944df560bae0c6cbc8524b5020.zip
eclipse.platform.ui-4cd7ec0c141090944df560bae0c6cbc8524b5020.tar.gz
eclipse.platform.ui-4cd7ec0c141090944df560bae0c6cbc8524b5020.tar.bz2
Bug 369884 - platform:/plugin/ not used for applicationXMII20131203-0800refs/changes/53/19153/2
Add a check before loading the application model if the specified "applicationXMI" is already a platform URI and if so it will be used. The old logic which generates the platform URI is still in use. Change-Id: I1a3202c5572f550d8a67039d344476b0822d439a Signed-off-by: René Brandstetter <Rene.Brandstetter@gmx.net>
-rw-r--r--bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/E4Application.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/E4Application.java b/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/E4Application.java
index d82df96..cc5dc3b 100644
--- a/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/E4Application.java
+++ b/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/E4Application.java
@@ -53,6 +53,7 @@ import org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory;
import org.eclipse.e4.ui.internal.workbench.ResourceHandler;
import org.eclipse.e4.ui.internal.workbench.SelectionAggregator;
import org.eclipse.e4.ui.internal.workbench.SelectionServiceImpl;
+import org.eclipse.e4.ui.internal.workbench.URIHelper;
import org.eclipse.e4.ui.internal.workbench.WorkbenchLogger;
import org.eclipse.e4.ui.model.application.MAddon;
import org.eclipse.e4.ui.model.application.MApplication;
@@ -348,8 +349,17 @@ public class E4Application implements IApplication {
}
Assert.isNotNull(appModelPath, IWorkbench.XMI_URI_ARG
+ " argument missing"); //$NON-NLS-1$
- final URI initialWorkbenchDefinitionInstance = URI
- .createPlatformPluginURI(appModelPath, true);
+
+ URI initialWorkbenchDefinitionInstance;
+
+ // check if the appModelPath is already a platform-URI and if so use it
+ if (URIHelper.isPlatformURI(appModelPath)) {
+ initialWorkbenchDefinitionInstance = URI.createURI(appModelPath,
+ true);
+ } else {
+ initialWorkbenchDefinitionInstance = URI.createPlatformPluginURI(
+ appModelPath, true);
+ }
eclipseContext.set(E4Workbench.INITIAL_WORKBENCH_MODEL_URI,
initialWorkbenchDefinitionInstance);