Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian de Alwis2016-04-20 02:32:43 +0000
committerBrian de Alwis2016-04-21 13:37:53 +0000
commit31bcbfb0012425aa1b5b9b9b974cf7ae878f0b79 (patch)
tree38ef8f4495ddbd753f3d7e6df01db7f7bba12c82 /org.eclipse.ui.intro
parent18cb084eeee21bab27389aeefe7e6d1e597721f0 (diff)
downloadeclipse.platform.ua-31bcbfb0012425aa1b5b9b9b974cf7ae878f0b79.tar.gz
eclipse.platform.ua-31bcbfb0012425aa1b5b9b9b974cf7ae878f0b79.tar.xz
eclipse.platform.ua-31bcbfb0012425aa1b5b9b9b974cf7ae878f0b79.zip
Add support for resolving theme-specific files. When resolving a file path, the Intro first checks for a file under a path with the theme-id. For example, resolving 'intro-eclipse.png' -> 'org.eclipse.ui.intro.universal.solstice/intro-eclipse.png'. Change-Id: I8f558a4c264fb459efe0dbaeed7f92aaa980fb09
Diffstat (limited to 'org.eclipse.ui.intro')
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroTheme.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroTheme.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroTheme.java
index a71080e33..b5a1ea809 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroTheme.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroTheme.java
@@ -21,6 +21,7 @@ import org.w3c.dom.Element;
public class IntroTheme extends AbstractIntroIdElement {
+ private static final String ATT_NAME = "name"; //$NON-NLS-1$
private static final String ATT_PATH = "path"; //$NON-NLS-1$
private String name;
private String path;
@@ -29,7 +30,7 @@ public class IntroTheme extends AbstractIntroIdElement {
public IntroTheme(IConfigurationElement element) {
super(element);
- name = element.getAttribute(name);
+ name = element.getAttribute(ATT_NAME);
path = element.getAttribute(ATT_PATH);
path = BundleUtil.getResolvedResourceLocation(path, getBundle());
scalable = "true".equals(element.getAttribute(FontSelection.ATT_SCALABLE)); //$NON-NLS-1$
@@ -76,5 +77,7 @@ public class IntroTheme extends AbstractIntroIdElement {
if (name!=null && value!=null)
properties.put(name, value);
}
+ // Put the theme id in the properties too
+ properties.put(ATT_ID, getId());
}
}

Back to the top