diff options
author | Daniel Rolka | 2013-10-01 05:35:28 -0400 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org | 2013-10-04 13:07:36 -0400 |
commit | 5aacec6526f95c6da600acbf109b9b35af9348b0 (patch) | |
tree | 6a5b6799ba3de7f1b72db1ec80084c1e8b846342 | |
parent | 8a91a5734559e43ea4dda308896eb8679e8c4ec8 (diff) | |
download | eclipse.platform.ui-5aacec6526f95c6da600acbf109b9b35af9348b0.zip eclipse.platform.ui-5aacec6526f95c6da600acbf109b9b35af9348b0.tar.gz eclipse.platform.ui-5aacec6526f95c6da600acbf109b9b35af9348b0.tar.xz |
Bug 355010 - [CSS] Understand default behaviour if product doesn't
specify a theme
Change-Id: I7726cea2057e17fb0aec282f3d8333996208afa5
Signed-off-by: Daniel Rolka <daniel.rolka@pl.ibm.com>
-rw-r--r-- | bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/E4Application.java | 11 |
1 files changed, 7 insertions, 4 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 262d4b2..d82df96 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 @@ -105,6 +105,7 @@ public class E4Application implements IApplication { private static final String WORKSPACE_VERSION_VALUE = "2"; //$NON-NLS-1$ private static final String APPLICATION_MODEL_PATH_DEFAULT = "Application.e4xmi"; private static final String PERSPECTIVE_ARG_NAME = "perspective"; + private static final String DEFAULT_THEME_ID = "org.eclipse.e4.ui.css.theme.e4_default"; private String[] args; @@ -292,10 +293,7 @@ public class E4Application implements IApplication { String xmiURI = getArgValue(IWorkbench.XMI_URI_ARG, applicationContext, false); appContext.set(IWorkbench.XMI_URI_ARG, xmiURI); - - String themeId = getArgValue(E4Application.THEME_ID, - applicationContext, false); - appContext.set(E4Application.THEME_ID, themeId); + appContext.set(E4Application.THEME_ID, getThemeId(applicationContext)); String cssURI = getArgValue(IWorkbench.CSS_URI_ARG, applicationContext, false); @@ -656,6 +654,11 @@ public class E4Application implements IApplication { return mbox.open() == SWT.OK; } + private String getThemeId(IApplicationContext appContext) { + String themeId = getArgValue(E4Application.THEME_ID, appContext, false); + return themeId != null ? themeId : DEFAULT_THEME_ID; + } + /** * Look at the argument URL for the workspace's version information. Return * that version if found and null otherwise. |