diff options
author | Dejan Gloszic | 2006-02-27 02:57:27 +0000 |
---|---|---|
committer | Dejan Gloszic | 2006-02-27 02:57:27 +0000 |
commit | af0d86d94aa0666a6c0e7a7691c38b8f25f3e2b1 (patch) | |
tree | aef10132cc384ed91a1068c5577c4193028c75a2 | |
parent | 894973bc132720c577cda9d0d9baf451c9083ae7 (diff) | |
download | eclipse.platform.ua-af0d86d94aa0666a6c0e7a7691c38b8f25f3e2b1.tar.gz eclipse.platform.ua-af0d86d94aa0666a6c0e7a7691c38b8f25f3e2b1.tar.xz eclipse.platform.ua-af0d86d94aa0666a6c0e7a7691c38b8f25f3e2b1.zip |
*** empty log message ***
64 files changed, 437 insertions, 194 deletions
diff --git a/org.eclipse.ui.intro.universal/plugin.xml b/org.eclipse.ui.intro.universal/plugin.xml index d589a1cce..7fd7d75fe 100644 --- a/org.eclipse.ui.intro.universal/plugin.xml +++ b/org.eclipse.ui.intro.universal/plugin.xml @@ -41,7 +41,7 @@ </implementation> <launchBar location="fastview" - bg="#c6c3e8" + bg="$launchbarBackground$" computed="true"> </launchBar> </presentation> @@ -54,11 +54,45 @@ id="org.eclipse.ui.intro.universal.circles" name="%theme.name.circles" path="$nl$/themes/circles" - previewImage="themes/circles/preview.png"/> + previewImage="themes/circles/preview.png"> + <property name="launchbarBackground" + value="#a1c2cb"/> + <property name="launchbarOverviewIcon" + value="$theme$graphics/launchbar/overview16.png"/> + <property name="launchbarFirststepsIcon" + value="$theme$graphics/launchbar/firststeps16.png"/> + <property name="launchbarTutorialsIcon" + value="$theme$graphics/launchbar/tutorials16.png"/> + <property name="launchbarSamplesIcon" + value="$theme$graphics/launchbar/samples16.png"/> + <property name="launchbarWhatsnewIcon" + value="$theme$graphics/launchbar/whatsnew16.png"/> + <property name="launchbarMigrateIcon" + value="$theme$graphics/launchbar/migrate16.png"/> + <property name="launchbarWebresourcesIcon" + value="$theme$graphics/launchbar/webresources16.png"/> + </theme> <theme id="org.eclipse.ui.intro.universal.purpleMesh" name="%theme.name.purpleMesh" path="$nl$/themes/purpleMesh" - previewImage="themes/purpleMesh/preview.png"/> + previewImage="themes/purpleMesh/preview.png"> + <property name="launchbarBackground" + value="#c6c3e8"/> + <property name="launchbarOverviewIcon" + value="$theme$graphics/launchbar/overview.gif"/> + <property name="launchbarFirststepsIcon" + value="$theme$graphics/launchbar/firststeps16.png"/> + <property name="launchbarTutorialsIcon" + value="$theme$graphics/launchbar/tutorials.gif"/> + <property name="launchbarSamplesIcon" + value="$theme$graphics/launchbar/samples.gif"/> + <property name="launchbarWhatsnewIcon" + value="$theme$graphics/launchbar/whatsnew.gif"/> + <property name="launchbarMigrateIcon" + value="$theme$graphics/launchbar/migrate16.png"/> + <property name="launchbarWebresourcesIcon" + value="$theme$graphics/launchbar/webresources16.png"/> + </theme> </extension> </plugin> diff --git a/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/IUniversalIntroConstants.java b/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/IUniversalIntroConstants.java index 4de49e6e1..17e7afb3e 100644 --- a/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/IUniversalIntroConstants.java +++ b/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/IUniversalIntroConstants.java @@ -98,4 +98,13 @@ public interface IUniversalIntroConstants { //Page table properties String P_IMPORTANCE = "importance"; //$NON-NLS-1$ String P_NAME = "name"; //$NON-NLS-1$ + + //Theme property constants + String LAUNCHBAR_OVERVIEW_ICON = "launchbarOverviewIcon"; //$NON-NLS-1$ + String LAUNCHBAR_FIRSTSTEPS_ICON = "launchbarFirststepsIcon"; //$NON-NLS-1$ + String LAUNCHBAR_TUTORIALS_ICON = "launchbarTutorialsIcon"; //$NON-NLS-1$ + String LAUNCHBAR_SAMPLES_ICON = "launchbarSamplesIcon"; //$NON-NLS-1$ + String LAUNCHBAR_WHATSNEW_ICON = "launchbarWhatsnewIcon"; //$NON-NLS-1$ + String LAUNCHBAR_MIGRATE_ICON = "launchbarMigrateIcon"; //$NON-NLS-1$ + String LAUNCHBAR_WEBRESOURCES_ICON = "launchbarWebresourcesIcon"; //$NON-NLS-1$ } diff --git a/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/UniversalIntroConfigurer.java b/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/UniversalIntroConfigurer.java index cca7e2370..8b13cecdf 100644 --- a/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/UniversalIntroConfigurer.java +++ b/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/UniversalIntroConfigurer.java @@ -12,6 +12,7 @@ package org.eclipse.ui.internal.intro.universal; import java.io.IOException; import java.net.URL; import java.util.ArrayList; +import java.util.Map; import java.util.StringTokenizer; import org.eclipse.core.runtime.FileLocator; @@ -30,13 +31,14 @@ import org.eclipse.ui.intro.config.IntroElement; import org.osgi.framework.Bundle; /** - * This class provides for dynamic configuration of the shared intro implementation based on the - * data file associated with the product. + * This class provides for dynamic configuration of the shared intro + * implementation based on the data file associated with the product. * * @since 3.2 */ -public class UniversalIntroConfigurer extends IntroConfigurer implements IUniversalIntroConstants { +public class UniversalIntroConfigurer extends IntroConfigurer implements + IUniversalIntroConstants { private ArrayList introData = new ArrayList(); public UniversalIntroConfigurer() { @@ -53,7 +55,8 @@ public class UniversalIntroConfigurer extends IntroConfigurer implements IUniver return value; } // nothing - try preferences - Preferences prefs = UniversalIntroPlugin.getDefault().getPluginPreferences(); + Preferences prefs = UniversalIntroPlugin.getDefault() + .getPluginPreferences(); // try to prefix with a preduct id first String key = product.getId() + "_" + variableName; //$NON-NLS-1$ value = prefs.getString(key); @@ -64,18 +67,22 @@ public class UniversalIntroConfigurer extends IntroConfigurer implements IUniver } if (value.length() > 0) value = resolveVariable(product.getDefiningBundle(), value); - else - value = null; + else { + // pass it to the theme + value = getThemeProperty(variableName); + } return value; } return null; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.eclipse.ui.intro.config.IntroConfigurer#getMixinStyle(java.lang.String) */ public String getMixinStyle(String pageId, String extensionId) { - if (introData.size()>0) { + if (introData.size() > 0) { // TODO getting the active product one only // Eventually we should consult the data from all the products IntroData idata = (IntroData) introData.get(0); @@ -83,7 +90,7 @@ public class UniversalIntroConfigurer extends IntroConfigurer implements IUniver if (pdata != null) { ExtensionData ed = pdata.findExtension(extensionId, false); int importance = ed.getImportance(); - if (importance!=ExtensionData.HIDDEN) + if (importance != ExtensionData.HIDDEN) return ExtensionData.IMPORTANCE_STYLE_TABLE[importance]; } } @@ -135,8 +142,10 @@ public class UniversalIntroConfigurer extends IntroConfigurer implements IUniver // other pages if (groupId.equals(DIV_PAGE_LINKS)) return getNavLinks(pageId); - if (groupId.equals(DIV_LAYOUT_TOP_LEFT) || groupId.equals(DIV_LAYOUT_TOP_RIGHT) - || groupId.equals(DIV_LAYOUT_BOTTOM_LEFT) || groupId.equals(DIV_LAYOUT_BOTTOM_RIGHT)) + if (groupId.equals(DIV_LAYOUT_TOP_LEFT) + || groupId.equals(DIV_LAYOUT_TOP_RIGHT) + || groupId.equals(DIV_LAYOUT_BOTTOM_LEFT) + || groupId.equals(DIV_LAYOUT_BOTTOM_RIGHT)) return getContent(pageId, groupId); } return new IntroElement[0]; @@ -230,35 +239,40 @@ public class UniversalIntroConfigurer extends IntroConfigurer implements IUniver id, "migrate_img", "$theme$/graphics/root/migrate.gif", Messages.SharedIntroConfigurer_migrate_alt, Messages.SharedIntroConfigurer_migrate_tooltip, "right"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ if (id.equals(ID_WEBRESOURCES)) - return createRootLink(Messages.SharedIntroConfigurer_webresources_name, - createPageURL(id, standby), id, "webresources_img", "css/graphics/root/webresources.gif", //$NON-NLS-1$ //$NON-NLS-2$ + return createRootLink( + Messages.SharedIntroConfigurer_webresources_name, + createPageURL(id, standby), + id, + "webresources_img", "css/graphics/root/webresources.gif", //$NON-NLS-1$ //$NON-NLS-2$ Messages.SharedIntroConfigurer_webresources_alt, - Messages.SharedIntroConfigurer_webresources_tooltip, "right"); //$NON-NLS-1$ + Messages.SharedIntroConfigurer_webresources_tooltip, + "right"); //$NON-NLS-1$ return null; } private IntroElement createNavLink(String id, String pageId) { if (id.equals(ID_OVERVIEW)) - return createNavLink(Messages.SharedIntroConfigurer_overview_nav, createPageURL(id, false), id, - "left"); //$NON-NLS-1$ + return createNavLink(Messages.SharedIntroConfigurer_overview_nav, + createPageURL(id, false), id, "left"); //$NON-NLS-1$ if (id.equals(ID_FIRSTSTEPS)) - return createNavLink(Messages.SharedIntroConfigurer_firststeps_nav, createPageURL(id, false), id, - "left"); //$NON-NLS-1$ + return createNavLink(Messages.SharedIntroConfigurer_firststeps_nav, + createPageURL(id, false), id, "left"); //$NON-NLS-1$ if (id.equals(ID_TUTORIALS)) - return createNavLink(Messages.SharedIntroConfigurer_tutorials_nav, createPageURL(id, false), id, - "left"); //$NON-NLS-1$ + return createNavLink(Messages.SharedIntroConfigurer_tutorials_nav, + createPageURL(id, false), id, "left"); //$NON-NLS-1$ if (id.equals(ID_SAMPLES)) - return createNavLink(Messages.SharedIntroConfigurer_samples_nav, createPageURL(id, false), id, - "right"); //$NON-NLS-1$ + return createNavLink(Messages.SharedIntroConfigurer_samples_nav, + createPageURL(id, false), id, "right"); //$NON-NLS-1$ if (id.equals(ID_WHATSNEW)) - return createNavLink(Messages.SharedIntroConfigurer_whatsnew_nav, createPageURL(id, false), id, - "right"); //$NON-NLS-1$ + return createNavLink(Messages.SharedIntroConfigurer_whatsnew_nav, + createPageURL(id, false), id, "right"); //$NON-NLS-1$ if (id.equals(ID_MIGRATE)) - return createNavLink(Messages.SharedIntroConfigurer_migrate_nav, createPageURL(id, false), id, - "right"); //$NON-NLS-1$ + return createNavLink(Messages.SharedIntroConfigurer_migrate_nav, + createPageURL(id, false), id, "right"); //$NON-NLS-1$ if (id.equals(ID_WEBRESOURCES)) - return createNavLink(Messages.SharedIntroConfigurer_webresources_nav, createPageURL(id, false), - id, "right"); //$NON-NLS-1$ + return createNavLink( + Messages.SharedIntroConfigurer_webresources_nav, + createPageURL(id, false), id, "right"); //$NON-NLS-1$ return null; } @@ -272,37 +286,38 @@ public class UniversalIntroConfigurer extends IntroConfigurer implements IUniver private IntroElement createLaunchBarShortcut(String id) { if (id.equals(ID_OVERVIEW)) return createShortcutLink( - "icons/full/obj16/overview16.png", Messages.SharedIntroConfigurer_overview_nav, //$NON-NLS-1$ + getThemeProperty(LAUNCHBAR_OVERVIEW_ICON), Messages.SharedIntroConfigurer_overview_nav, id); if (id.equals(ID_FIRSTSTEPS)) return createShortcutLink( - "icons/full/obj16/firststeps16.png", Messages.SharedIntroConfigurer_firststeps_nav, //$NON-NLS-1$ + getThemeProperty(LAUNCHBAR_FIRSTSTEPS_ICON), Messages.SharedIntroConfigurer_firststeps_nav, id); if (id.equals(ID_TUTORIALS)) return createShortcutLink( - "icons/full/obj16/tutorials16.png", Messages.SharedIntroConfigurer_tutorials_nav, //$NON-NLS-1$ + getThemeProperty(LAUNCHBAR_TUTORIALS_ICON), Messages.SharedIntroConfigurer_tutorials_nav, id); if (id.equals(ID_SAMPLES)) return createShortcutLink( - "icons/full/obj16/samples16.png", Messages.SharedIntroConfigurer_samples_nav, //$NON-NLS-1$ + getThemeProperty(LAUNCHBAR_SAMPLES_ICON), Messages.SharedIntroConfigurer_samples_nav, id); if (id.equals(ID_WHATSNEW)) return createShortcutLink( - "icons/full/obj16/whatsnew16.png", Messages.SharedIntroConfigurer_whatsnew_nav, //$NON-NLS-1$ + getThemeProperty(LAUNCHBAR_WHATSNEW_ICON), Messages.SharedIntroConfigurer_whatsnew_nav, id); if (id.equals(ID_MIGRATE)) return createShortcutLink( - "icons/full/obj16/migrate16.png", Messages.SharedIntroConfigurer_migrate_nav, //$NON-NLS-1$ + getThemeProperty(LAUNCHBAR_MIGRATE_ICON), Messages.SharedIntroConfigurer_migrate_nav, id); if (id.equals(ID_WEBRESOURCES)) return createShortcutLink( - "icons/full/obj16/webresources16.png", Messages.SharedIntroConfigurer_webresources_nav, //$NON-NLS-1$ + getThemeProperty(LAUNCHBAR_WEBRESOURCES_ICON), Messages.SharedIntroConfigurer_webresources_nav, id); return null; } - private IntroElement createRootLink(String name, String url, String id, String imgId, String imgSrc, - String imgAlt, String imgText, String styleId) { + private IntroElement createRootLink(String name, String url, String id, + String imgId, String imgSrc, String imgAlt, String imgText, + String styleId) { IntroElement element = new IntroElement("link"); //$NON-NLS-1$ element.setAttribute("label", name); //$NON-NLS-1$ element.setAttribute("url", url); //$NON-NLS-1$ @@ -320,7 +335,8 @@ public class UniversalIntroConfigurer extends IntroConfigurer implements IUniver return element; } - private IntroElement createNavLink(String label, String url, String id, String styleId) { + private IntroElement createNavLink(String label, String url, String id, + String styleId) { IntroElement element = new IntroElement("link"); //$NON-NLS-1$ element.setAttribute("label", label); //$NON-NLS-1$ element.setAttribute("url", url); //$NON-NLS-1$ @@ -329,7 +345,8 @@ public class UniversalIntroConfigurer extends IntroConfigurer implements IUniver return element; } - private IntroElement createShortcutLink(String icon, String tooltip, String id) { + private IntroElement createShortcutLink(String icon, String tooltip, + String id) { IntroElement element = new IntroElement("shortcut"); //$NON-NLS-1$ element.setAttribute("icon", icon); //$NON-NLS-1$ element.setAttribute("tooltip", tooltip); //$NON-NLS-1$ @@ -343,8 +360,9 @@ public class UniversalIntroConfigurer extends IntroConfigurer implements IUniver String pid = Platform.getProduct().getId(); if (dataFile != null) introData.add(new IntroData(pid, dataFile, true)); - IConfigurationElement[] products = Platform.getExtensionRegistry().getConfigurationElementsFor( - "org.eclipse.core.runtime.products"); //$NON-NLS-1$ + IConfigurationElement[] products = Platform.getExtensionRegistry() + .getConfigurationElementsFor( + "org.eclipse.core.runtime.products"); //$NON-NLS-1$ for (int i = 0; i < products.length; i++) { IConfigurationElement product = products[i]; IExtension extension = product.getDeclaringExtension(); @@ -363,7 +381,8 @@ public class UniversalIntroConfigurer extends IntroConfigurer implements IUniver String name = child.getAttribute("name"); //$NON-NLS-1$ if (name != null && name.equals(VAR_INTRO_DATA)) { String value = child.getAttribute("value"); //$NON-NLS-1$ - String bid = child.getDeclaringExtension().getNamespaceIdentifier(); + String bid = child.getDeclaringExtension() + .getNamespaceIdentifier(); Bundle bundle = Platform.getBundle(bid); if (bundle != null) { String dataFile = resolveVariable(bundle, value); @@ -412,7 +431,8 @@ public class UniversalIntroConfigurer extends IntroConfigurer implements IUniver IPath p1 = ipath.removeFirstSegments(2); // remove the last anchor and append the // relative path from the extension - resolvedPath = p2.removeLastSegments(1).append(p1).toString(); + resolvedPath = p2.removeLastSegments(1).append(p1) + .toString(); } return resolvedPath; } @@ -423,14 +443,18 @@ public class UniversalIntroConfigurer extends IntroConfigurer implements IUniver return null; } - public void init(IIntroSite site) { + public void init(IIntroSite site, Map themeProperties) { + super.init(site, themeProperties); IConfigurationElement element = CustomizeAction.getPageElement(); - if (element==null) + if (element == null) return; Action customizeAction = new CustomizeAction(site, element); customizeAction.setText(Messages.SharedIntroConfigurer_customize_label); - customizeAction.setToolTipText(Messages.SharedIntroConfigurer_customize_text); - customizeAction.setImageDescriptor(ImageUtil.createImageDescriptor("full/elcl16/configure.gif")); //$NON-NLS-1$ - site.getActionBars().getToolBarManager().appendToGroup(TB_ADDITIONS, customizeAction); + customizeAction + .setToolTipText(Messages.SharedIntroConfigurer_customize_text); + customizeAction.setImageDescriptor(ImageUtil + .createImageDescriptor("full/elcl16/configure.gif")); //$NON-NLS-1$ + site.getActionBars().getToolBarManager().appendToGroup(TB_ADDITIONS, + customizeAction); } }
\ No newline at end of file diff --git a/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/WelcomeCustomizationPreferencePage.java b/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/WelcomeCustomizationPreferencePage.java index 9b3aeddad..b6852fe41 100644 --- a/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/WelcomeCustomizationPreferencePage.java +++ b/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/WelcomeCustomizationPreferencePage.java @@ -678,6 +678,7 @@ public class WelcomeCustomizationPreferencePage extends PreferencePage implement IWorkbenchWindow window = part.getIntroSite().getWorkbenchWindow(); boolean standby = manager.isIntroStandby(part); PlatformUI.getWorkbench().getIntroManager().closeIntro(part); + IntroPlugin.getDefault().resetVolatileImageRegistry(); UniversalIntroPlugin.getDefault().resetVolatileImageRegistry(); part = PlatformUI.getWorkbench().getIntroManager().showIntro(window, standby); if (part != null) { diff --git a/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/firststeps.png b/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/firststeps.png Binary files differnew file mode 100644 index 000000000..eccc75735 --- /dev/null +++ b/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/firststeps.png diff --git a/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/fs_nav.png b/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/fs_nav.png Binary files differnew file mode 100644 index 000000000..99eb592de --- /dev/null +++ b/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/fs_nav.png diff --git a/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/mi_nav.png b/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/mi_nav.png Binary files differnew file mode 100644 index 000000000..5434708e5 --- /dev/null +++ b/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/mi_nav.png diff --git a/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/ov_nav.png b/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/ov_nav.png Binary files differnew file mode 100644 index 000000000..709f69a68 --- /dev/null +++ b/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/ov_nav.png diff --git a/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/overview.png b/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/overview.png Binary files differnew file mode 100644 index 000000000..64735d630 --- /dev/null +++ b/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/overview.png diff --git a/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/sa_nav.png b/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/sa_nav.png Binary files differnew file mode 100644 index 000000000..9871b72bb --- /dev/null +++ b/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/sa_nav.png diff --git a/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/samples.png b/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/samples.png Binary files differnew file mode 100644 index 000000000..cb3db1db8 --- /dev/null +++ b/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/samples.png diff --git a/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/tu_nav.png b/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/tu_nav.png Binary files differnew file mode 100644 index 000000000..ce589ab7d --- /dev/null +++ b/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/tu_nav.png diff --git a/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/tutorials.png b/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/tutorials.png Binary files differnew file mode 100644 index 000000000..e40a8239b --- /dev/null +++ b/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/tutorials.png diff --git a/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/wb_nav.png b/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/wb_nav.png Binary files differnew file mode 100644 index 000000000..0621c3c47 --- /dev/null +++ b/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/wb_nav.png diff --git a/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/webresources.png b/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/webresources.png Binary files differnew file mode 100644 index 000000000..1a876dc58 --- /dev/null +++ b/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/webresources.png diff --git a/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/whatsnew.png b/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/whatsnew.png Binary files differnew file mode 100644 index 000000000..a10dd3de0 --- /dev/null +++ b/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/whatsnew.png diff --git a/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/wn_nav.png b/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/wn_nav.png Binary files differnew file mode 100644 index 000000000..47ecb7c96 --- /dev/null +++ b/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/wn_nav.png diff --git a/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/workbench.png b/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/workbench.png Binary files differnew file mode 100644 index 000000000..868f3abbd --- /dev/null +++ b/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/workbench.png diff --git a/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/wr_nav.png b/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/wr_nav.png Binary files differnew file mode 100644 index 000000000..00d3056a8 --- /dev/null +++ b/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/wr_nav.png diff --git a/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/xx_topicname16.gif b/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/xx_topicname16.gif Binary files differdeleted file mode 100644 index a124a3f1d..000000000 --- a/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/xx_topicname16.gif +++ /dev/null diff --git a/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/xx_topicname36.gif b/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/xx_topicname36.gif Binary files differdeleted file mode 100644 index 58664ddfa..000000000 --- a/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/xx_topicname36.gif +++ /dev/null diff --git a/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/xx_topicname48.gif b/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/xx_topicname48.gif Binary files differdeleted file mode 100644 index 5143feb55..000000000 --- a/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/xx_topicname48.gif +++ /dev/null diff --git a/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/xx_topicname_tophov.gif b/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/xx_topicname_tophov.gif Binary files differdeleted file mode 100644 index fb12cbb08..000000000 --- a/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/xx_topicname_tophov.gif +++ /dev/null diff --git a/org.eclipse.ui.intro.universal/icons/full/obj16/firststeps16.png b/org.eclipse.ui.intro.universal/themes/circles/graphics/launchbar/firststeps16.png Binary files differindex 4c15c823b..4c15c823b 100644 --- a/org.eclipse.ui.intro.universal/icons/full/obj16/firststeps16.png +++ b/org.eclipse.ui.intro.universal/themes/circles/graphics/launchbar/firststeps16.png diff --git a/org.eclipse.ui.intro.universal/icons/full/obj16/migrate16.png b/org.eclipse.ui.intro.universal/themes/circles/graphics/launchbar/migrate16.png Binary files differindex 3fc84145d..3fc84145d 100644 --- a/org.eclipse.ui.intro.universal/icons/full/obj16/migrate16.png +++ b/org.eclipse.ui.intro.universal/themes/circles/graphics/launchbar/migrate16.png diff --git a/org.eclipse.ui.intro.universal/icons/full/obj16/overview16.png b/org.eclipse.ui.intro.universal/themes/circles/graphics/launchbar/overview16.png Binary files differindex b2e977f8d..b2e977f8d 100644 --- a/org.eclipse.ui.intro.universal/icons/full/obj16/overview16.png +++ b/org.eclipse.ui.intro.universal/themes/circles/graphics/launchbar/overview16.png diff --git a/org.eclipse.ui.intro.universal/icons/full/obj16/samples16.png b/org.eclipse.ui.intro.universal/themes/circles/graphics/launchbar/samples16.png Binary files differindex fdff5dd5b..fdff5dd5b 100644 --- a/org.eclipse.ui.intro.universal/icons/full/obj16/samples16.png +++ b/org.eclipse.ui.intro.universal/themes/circles/graphics/launchbar/samples16.png diff --git a/org.eclipse.ui.intro.universal/icons/full/obj16/tutorials16.png b/org.eclipse.ui.intro.universal/themes/circles/graphics/launchbar/tutorials16.png Binary files differindex f2d688f21..f2d688f21 100644 --- a/org.eclipse.ui.intro.universal/icons/full/obj16/tutorials16.png +++ b/org.eclipse.ui.intro.universal/themes/circles/graphics/launchbar/tutorials16.png diff --git a/org.eclipse.ui.intro.universal/icons/full/obj16/webresources16.png b/org.eclipse.ui.intro.universal/themes/circles/graphics/launchbar/webresources16.png Binary files differindex b847caad5..b847caad5 100644 --- a/org.eclipse.ui.intro.universal/icons/full/obj16/webresources16.png +++ b/org.eclipse.ui.intro.universal/themes/circles/graphics/launchbar/webresources16.png diff --git a/org.eclipse.ui.intro.universal/icons/full/obj16/whatsnew16.png b/org.eclipse.ui.intro.universal/themes/circles/graphics/launchbar/whatsnew16.png Binary files differindex 5294b1741..5294b1741 100644 --- a/org.eclipse.ui.intro.universal/icons/full/obj16/whatsnew16.png +++ b/org.eclipse.ui.intro.universal/themes/circles/graphics/launchbar/whatsnew16.png diff --git a/org.eclipse.ui.intro.universal/themes/circles/html/shared.css b/org.eclipse.ui.intro.universal/themes/circles/html/shared.css index 94f599f2e..26da8753a 100644 --- a/org.eclipse.ui.intro.universal/themes/circles/html/shared.css +++ b/org.eclipse.ui.intro.universal/themes/circles/html/shared.css @@ -74,12 +74,6 @@ html, body { width : 100%; height : 100%; } html, body, div, h1, h4, p, a { margin : 0px; padding : 0px; } -/* - * Folding section settings. - */ -.section { } -.section-body { display: none; padding : 0px; } - /* For regular div labels */ #page-content div H4 { padding : 10px; @@ -479,3 +473,26 @@ iframe { width: 98%; padding-left: 2%; } + +/* + * Folding section settings. + */ +.section { text-align: left; } +.section-body { + display: none; + padding : 0px; + color : cyan; +} + +.section-title { + font-size : 10pt; + color : blue; +} + +.section-toggle-image { + float : right; + clear: right; + width : 16px; + height : 16px; + background-image : url(../graphics/icons/ctool/widget_closed.gif); +} diff --git a/org.eclipse.ui.intro.universal/themes/circles/swt/firststeps.properties b/org.eclipse.ui.intro.universal/themes/circles/swt/firststeps.properties index cc62a3453..3f144a88d 100644 --- a/org.eclipse.ui.intro.universal/themes/circles/swt/firststeps.properties +++ b/org.eclipse.ui.intro.universal/themes/circles/swt/firststeps.properties @@ -1,3 +1,2 @@ firststeps.page-content.layout.ncolumns = 2 -firststeps.page-content.bottom.layout.colspan = 2 firstseps.subtitle-id = firststeps/page-content/page-title diff --git a/org.eclipse.ui.intro.universal/themes/circles/swt/migrate.properties b/org.eclipse.ui.intro.universal/themes/circles/swt/migrate.properties index a45e8d993..9d021b0b5 100644 --- a/org.eclipse.ui.intro.universal/themes/circles/swt/migrate.properties +++ b/org.eclipse.ui.intro.universal/themes/circles/swt/migrate.properties @@ -1,3 +1,2 @@ migrate.page-content.layout.ncolumns = 2 -migrate.page-content.bottom.layout.colspan = 2 migrate.subtitle-id = migrate/page-content/page-title diff --git a/org.eclipse.ui.intro.universal/themes/circles/swt/overview.properties b/org.eclipse.ui.intro.universal/themes/circles/swt/overview.properties index 89a574dc8..ada419da2 100644 --- a/org.eclipse.ui.intro.universal/themes/circles/swt/overview.properties +++ b/org.eclipse.ui.intro.universal/themes/circles/swt/overview.properties @@ -1,6 +1,5 @@ overview.page-content.layout.ncolumns = 2 -overview.page-content.bottom.layout.colspan = 2 overview.subtitle-id = overview/page-content/page-title overview.description-id = overview/page-content/page-description
\ No newline at end of file diff --git a/org.eclipse.ui.intro.universal/themes/circles/swt/root.properties b/org.eclipse.ui.intro.universal/themes/circles/swt/root.properties index a44653333..106ef98ff 100644 --- a/org.eclipse.ui.intro.universal/themes/circles/swt/root.properties +++ b/org.eclipse.ui.intro.universal/themes/circles/swt/root.properties @@ -1,29 +1,41 @@ -theme = true -root.links-background.page-links.overview.link-icon = ../graphics/root/overview.png -root.links-background.page-links.firststeps.link-icon = ../graphics/root/firststeps.png -root.links-background.page-links.tutorials.link-icon = ../graphics/root/tutorials.png -root.links-background.page-links.samples.link-icon= ../graphics/root/samples.png -root.links-background.page-links.whatsnew.link-icon = ../graphics/root/whatsnew.png -root.links-background.page-links.migrate.link-icon = ../graphics/root/migrate.png -root.links-background.page-links.webresources.link-icon = ../graphics/root/webresources.png -root.action-links.workbench.link-icon = ../graphics/root/workbench.png +theme=true -#root.links-background.page-links.overview.hover-icon = intro/css/../graphics/icons/ctool/overview72.gif -#root.links-background.page-links.tutorials.hover-icon = intro/css/../graphics/icons/ctool/tutorials72.gif -#root.links-background.page-links.samples.hover-icon = intro/css/../graphics/icons/ctool/samples72.gif -#root.links-background.page-links.news.hover-icon = intro/css/../graphics/icons/ctool/whatsnew72.gif -#root.action-links.workbench.hover-icon = intro/css/../graphics/icons/ctool/wb48.gif +root.links-background.page-links.overview.link-icon = ../graphics/icons/ctool/overview.png +root.links-background.page-links.tutorials.link-icon = ../graphics/icons/ctool/tutorials.png +root.links-background.page-links.samples.link-icon= ../graphics/icons/ctool/samples.png +root.links-background.page-links.whatsnew.link-icon = ../graphics/icons/ctool/whatsnew.png +root.links-background.page-links.firststeps.link-icon = ../graphics/icons/ctool/firststeps.png +root.links-background.page-links.migrate.link-icon = ../graphics/icons/ctool/migrate.png +root.links-background.page-links.webresources.link-icon = ../graphics/icons/ctool/webresources.png +root.action-links.workbench.link-icon = ../graphics/icons/ctool/workbench.png +root.links-background.page-links.overview.hover-icon = ../graphics/icons/ctool/overview.png +root.links-background.page-links.tutorials.hover-icon = ../graphics/icons/ctool/tutorials.png +root.links-background.page-links.samples.hover-icon = ../graphics/icons/ctool/samples.png +root.links-background.page-links.whatsnew.hover-icon = ../graphics/icons/ctool/whatsnew.png +root.links-background.page-links.firststeps.hover-icon = ../graphics/icons/ctool/firststeps.png +root.links-background.page-links.migrate.hover-icon = ../graphics/icons/ctool/migrate.png +root.links-background.page-links.webresources.hover-icon = ../graphics/icons/ctool/webresources.png +root.action-links.workbench.hover-icon = ../graphics/icons/ctool/workbench.png -root.links-background.page-links.overview.small-link-icon = ../graphics/root/overview48.png -root.links-background.page-links.firststeps.small-link-icon = ../graphics/root/firststeps48.png -root.links-background.page-links.tutorials.small-link-icon = ../graphics/root/tutorials48.png -root.links-background.page-links.samples.small-link-icon = ../graphics/root/samples48.png -root.links-background.page-links.whatsnew.small-link-icon = ../graphics/root/whatsnew48.png -root.links-background.page-links.migrate.small-link-icon = ../graphics/root/migrate48.png -root.links-background.page-links.webresources.small-link-icon = ../graphics/root/webresources48.png +root.links-background.page-links.overview.small-link-icon = ../graphics/icons/ctool/ov_nav.png +root.links-background.page-links.tutorials.small-link-icon = ../graphics/icons/ctool/tu_nav.png +root.links-background.page-links.samples.small-link-icon = ../graphics/icons/ctool/sa_nav.png +root.links-background.page-links.whatsnew.small-link-icon = ../graphics/icons/ctool/wn_nav.png +root.links-background.page-links.firststeps.small-link-icon = ../graphics/icons/ctool/fs_nav.png +root.links-background.page-links.migrate.small-link-icon = ../graphics/icons/ctool/mi_nav.png +root.links-background.page-links.webresources.small-link-icon = ../graphics/icons/ctool/sl_nav.png +root.action-links.workbench.small-link-icon = ../graphics/icons/ctool/wb_nav.png + +root.links-background.page-links.overview.small-hover-icon = ../graphics/icons/ctool/ov_nav.png +root.links-background.page-links.tutorials.small-hover-icon = ../graphics/icons/ctool/tu_nav.png +root.links-background.page-links.samples.small-hover-icon = ../graphics/icons/ctool/sa_nav.png +root.links-background.page-links.whatsnew.small-hover-icon = ../graphics/icons/ctool/wn_nav.png +root.links-background.page-links.firststeps.small-hover-icon = ../graphics/icons/ctool/fs_nav.png +root.links-background.page-links.migrate.small-hover-icon = ../graphics/icons/ctool/mi_nav.png +root.links-background.page-links.webresources.small-hover-icon = ../graphics/icons/ctool/sl_nav.png +root.action-links.workbench.small-hover-icon = ../graphics/icons/ctool/wb_nav.png -root.action-links.workbench.small-link-icon = ../graphics/root/workbench48.png root.layout.ncolumns = 1 root.links-background.page-links.layout.hspacing = 40 diff --git a/org.eclipse.ui.intro.universal/themes/circles/swt/samples.properties b/org.eclipse.ui.intro.universal/themes/circles/swt/samples.properties index fbbe9c49b..18f7058d0 100644 --- a/org.eclipse.ui.intro.universal/themes/circles/swt/samples.properties +++ b/org.eclipse.ui.intro.universal/themes/circles/swt/samples.properties @@ -1,7 +1,6 @@ samples.page-content.layout.vspacing = 40 samples.page-content.layout.ncolumns = 2 -samples.page-content.bottom.layout.colspan = 2 description-style-id = group-description samples.subtitle-id = samples/page-content/page-title diff --git a/org.eclipse.ui.intro.universal/themes/circles/swt/tutorials.properties b/org.eclipse.ui.intro.universal/themes/circles/swt/tutorials.properties index de1d07215..ce4b4a08d 100644 --- a/org.eclipse.ui.intro.universal/themes/circles/swt/tutorials.properties +++ b/org.eclipse.ui.intro.universal/themes/circles/swt/tutorials.properties @@ -1,7 +1,5 @@ tutorials.page-content.layout.vspacing = 40 tutorials.page-content.layout.ncolumns = 2 -tutorials.page-content.bottom.layout.colspan = 2 - tutorials.subtitle-id = tutorials/page-content/page-title tutorials.description-id = tutorials/page-content/page-description
\ No newline at end of file diff --git a/org.eclipse.ui.intro.universal/themes/circles/swt/webresources.properties b/org.eclipse.ui.intro.universal/themes/circles/swt/webresources.properties index 2d8589fec..39d5a85cf 100644 --- a/org.eclipse.ui.intro.universal/themes/circles/swt/webresources.properties +++ b/org.eclipse.ui.intro.universal/themes/circles/swt/webresources.properties @@ -1,6 +1,5 @@ webresources.page-content.layout.vspacing = 40 webresources.page-content.layout.ncolumns = 2 -webresources.page-content.bottom.layout.colspan = 2 webresources.subtitle-id = news/page-content/page-title diff --git a/org.eclipse.ui.intro.universal/themes/circles/swt/whatsnew.properties b/org.eclipse.ui.intro.universal/themes/circles/swt/whatsnew.properties index 72ab45cfa..2a732e2f9 100644 --- a/org.eclipse.ui.intro.universal/themes/circles/swt/whatsnew.properties +++ b/org.eclipse.ui.intro.universal/themes/circles/swt/whatsnew.properties @@ -3,7 +3,7 @@ whatsnew.page-content.layout.vspacing = 40 whatsnew.page-content.layout.ncolumns = 2 whatsnew.page-content.bottom.layout.colspan = 2 -whatsnew.link-icon = ../graphics/new_obj.gif -whatsnew.hover-icon = ../graphics/newhov_obj.gif +whatsnew.link-icon = ../graphics/icons/obj48/new_obj.gif +whatsnew.hover-icon = ../graphics/icons/obj48/newhov_obj.gif whatsnew.subtitle-id = whatsnew/page-content/page-title diff --git a/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/icons/dtool/overview.gif b/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/icons/dtool/overview.gif Binary files differdeleted file mode 100644 index 2bc7b0d58..000000000 --- a/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/icons/dtool/overview.gif +++ /dev/null diff --git a/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/icons/dtool/restore_welcome.gif b/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/icons/dtool/restore_welcome.gif Binary files differdeleted file mode 100644 index 4997b20ce..000000000 --- a/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/icons/dtool/restore_welcome.gif +++ /dev/null diff --git a/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/icons/dtool/samples.gif b/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/icons/dtool/samples.gif Binary files differdeleted file mode 100644 index 5cf3caed2..000000000 --- a/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/icons/dtool/samples.gif +++ /dev/null diff --git a/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/icons/dtool/tutorials.gif b/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/icons/dtool/tutorials.gif Binary files differdeleted file mode 100644 index 63826a5d8..000000000 --- a/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/icons/dtool/tutorials.gif +++ /dev/null diff --git a/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/icons/dtool/whatsnew.gif b/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/icons/dtool/whatsnew.gif Binary files differdeleted file mode 100644 index 8056c99ff..000000000 --- a/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/icons/dtool/whatsnew.gif +++ /dev/null diff --git a/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/icons/etool/restore_welcome.gif b/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/icons/etool/restore_welcome.gif Binary files differdeleted file mode 100644 index 7736bcec6..000000000 --- a/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/icons/etool/restore_welcome.gif +++ /dev/null diff --git a/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/launchbar/firststeps16.png b/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/launchbar/firststeps16.png Binary files differnew file mode 100644 index 000000000..4c15c823b --- /dev/null +++ b/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/launchbar/firststeps16.png diff --git a/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/launchbar/migrate16.png b/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/launchbar/migrate16.png Binary files differnew file mode 100644 index 000000000..3fc84145d --- /dev/null +++ b/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/launchbar/migrate16.png diff --git a/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/icons/etool/overview.gif b/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/launchbar/overview.gif Binary files differindex 3fe629a83..3fe629a83 100644 --- a/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/icons/etool/overview.gif +++ b/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/launchbar/overview.gif diff --git a/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/icons/etool/samples.gif b/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/launchbar/samples.gif Binary files differindex c69588429..c69588429 100644 --- a/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/icons/etool/samples.gif +++ b/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/launchbar/samples.gif diff --git a/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/icons/etool/tutorials.gif b/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/launchbar/tutorials.gif Binary files differindex a18d7ddf8..a18d7ddf8 100644 --- a/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/icons/etool/tutorials.gif +++ b/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/launchbar/tutorials.gif diff --git a/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/launchbar/webresources16.png b/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/launchbar/webresources16.png Binary files differnew file mode 100644 index 000000000..b847caad5 --- /dev/null +++ b/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/launchbar/webresources16.png diff --git a/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/icons/etool/whatsnew.gif b/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/launchbar/whatsnew.gif Binary files differindex f02232444..f02232444 100644 --- a/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/icons/etool/whatsnew.gif +++ b/org.eclipse.ui.intro.universal/themes/purpleMesh/graphics/launchbar/whatsnew.gif diff --git a/org.eclipse.ui.intro/build.properties b/org.eclipse.ui.intro/build.properties index b3a473490..3815cc21d 100644 --- a/org.eclipse.ui.intro/build.properties +++ b/org.eclipse.ui.intro/build.properties @@ -19,7 +19,8 @@ bin.includes = plugin.xml,\ about_files/,\ dtds/,\ META-INF/,\ - invalidPage/ + invalidPage/,\ + javascript/ src.includes = schema/,\ about.html,\ diff --git a/org.eclipse.ui.intro/schema/configExtension.exsd b/org.eclipse.ui.intro/schema/configExtension.exsd index 1b75847de..c9e269183 100644 --- a/org.eclipse.ui.intro/schema/configExtension.exsd +++ b/org.eclipse.ui.intro/schema/configExtension.exsd @@ -136,6 +136,9 @@ http://org.eclipse.ui.intro/showStandby?partId=&lt;id of standbyContentPart& <element name="theme"> <complexType> + <sequence> + <element ref="property" minOccurs="0" maxOccurs="unbounded"/> + </sequence> <attribute name="id" type="string" use="required"> <annotation> <documentation> @@ -180,6 +183,30 @@ http://org.eclipse.ui.intro/showStandby?partId=&lt;id of standbyContentPart& </complexType> </element> + <element name="property"> + <annotation> + <documentation> + an optional theme property that can be used by intro configurers to further customize intro presentation. + </documentation> + </annotation> + <complexType> + <attribute name="name" type="string" use="required"> + <annotation> + <documentation> + unique name of the property + </documentation> + </annotation> + </attribute> + <attribute name="value" type="string" use="required"> + <annotation> + <documentation> + value of the property + </documentation> + </annotation> + </attribute> + </complexType> + </element> + <annotation> <appInfo> <meta.section type="since"/> diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/html/IntroHTMLGenerator.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/html/IntroHTMLGenerator.java index b9c1eb74b..6dffc9ae2 100644 --- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/html/IntroHTMLGenerator.java +++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/html/IntroHTMLGenerator.java @@ -75,16 +75,16 @@ public class IntroHTMLGenerator { * Generates the HTML element and its content: * * <pre> - * - * <HTML> - * <HEAD> - * head content - * </HEAD> - * <BODY> - * body content - * </BODY> - * </HTML> * + * <HTML> + * <HEAD> + * head content + * </HEAD> + * <BODY> + * body content + * </BODY> + * </HTML> + * * </pre> * * @return the html HTMLElement @@ -104,16 +104,16 @@ public class IntroHTMLGenerator { * Generates the HEAD element and its content: * * <pre> - * - * - * <HEAD> - * <BASE href="base_plugin_location> - * <style type="text/css">HTML, IMG { border: 0px; } </style> - * <TITLE>page title </TITLE> - * <LINK href="style sheet"> - * additional head content, if specified - * </HEAD> * + * + * <HEAD> + * <BASE href="base_plugin_location> + * <style type="text/css">HTML, IMG { border: 0px; } </style> + * <TITLE>page title </TITLE> + * <LINK href="style sheet"> + * additional head content, if specified + * </HEAD> + * * </pre> * * @param indentLevel @@ -189,14 +189,14 @@ public class IntroHTMLGenerator { * Generates the BODY element and its content: * * <pre> - * - * - * <BODY> - * <DIV id="pageId" class="pageClass"> - * page content - * </DIV> - * </BODY> * + * + * <BODY> + * <DIV id="pageId" class="pageClass"> + * page content + * </DIV> + * </BODY> + * * </pre> * * @param indentLevel @@ -272,13 +272,13 @@ public class IntroHTMLGenerator { * Create a div element and its content from an IntroDiv: * * <pre> - * - * - * <div id="attrvalue"> - * <h4><span class="div-label">attrvalue</span><h4> - * any defined divs, links, html, images, text, includes - * </div> * + * + * <div id="attrvalue"> + * <h4><span class="div-label">attrvalue</span><h4> + * any defined divs, links, html, images, text, includes + * </div> + * * </pre> * * @param element @@ -296,10 +296,13 @@ public class IntroHTMLGenerator { divElement.addAttribute(IIntroHTMLConstants.ATTRIBUTE_CLASS, element.getStyleId()); // Create the div label, if specified if (element.getLabel() != null) { - HTMLElement divLabel = generateTextElement(IIntroHTMLConstants.ELEMENT_H4, null, - IIntroHTMLConstants.SPAN_CLASS_DIV_LABEL, element.getLabel(), indentLevel + 1); if (element.isExpandable()) { - String clientId = element.getId()+"-content"; //$NON-NLS-1$ + HTMLElement divLabel = new FormattedHTMLElement(IIntroHTMLConstants.ELEMENT_SPAN, + indentLevel + 2, false); + divLabel.addContent(element.getLabel()); + divLabel.addAttribute(IIntroHTMLConstants.ATTRIBUTE_CLASS, + "section-title");//$NON-NLS-1$ + String clientId = element.getId() + "-content"; //$NON-NLS-1$ String href = "#"; //$NON-NLS-1$ HTMLElement link = new FormattedHTMLElement(IIntroHTMLConstants.ELEMENT_ANCHOR, indentLevel + 1, true); @@ -308,11 +311,23 @@ public class IntroHTMLGenerator { link.addAttribute("onClick", call); //$NON-NLS-1$ link.addContent(divLabel); divElement.addContent(link); - childContainer = generateDivElement(clientId, indentLevel+1); - childContainer.addAttribute("class", "section-body"); //$NON-NLS-1$//$NON-NLS-2$ + String toggleId = element.getId() + "-toggle"; //$NON-NLS-1$ + HTMLElement toggleImage = new FormattedHTMLElement(IIntroHTMLConstants.ELEMENT_IMG, + indentLevel + 2, false); + toggleImage.addAttribute(IIntroHTMLConstants.ATTRIBUTE_ID, toggleId); + toggleImage.addAttribute(IIntroHTMLConstants.ATTRIBUTE_SRC, BundleUtil + .getResolvedResourceLocation(IIntroHTMLConstants.IMAGE_SRC_BLANK, + IIntroConstants.PLUGIN_ID)); + toggleImage.addAttribute(IIntroHTMLConstants.ATTRIBUTE_CLASS, "section-toggle-image"); //$NON-NLS-1$ + link.addContent(toggleImage); + childContainer = generateDivElement(clientId, indentLevel + 1); + childContainer.addAttribute("class", "section-body"); //$NON-NLS-1$//$NON-NLS-2$ divElement.addContent(childContainer); - } else + } else { + HTMLElement divLabel = generateTextElement(IIntroHTMLConstants.ELEMENT_H4, null, + IIntroHTMLConstants.SPAN_CLASS_DIV_LABEL, element.getLabel(), indentLevel + 1); divElement.addContent(divLabel); + } } if (element.getBackgroundImage() != null) { String imageUrl = element.getBackgroundImage(); @@ -340,16 +355,16 @@ public class IntroHTMLGenerator { } return divElement; } - + private void addMixinStyle(HTMLElement element, String mixinStyle) { - if (mixinStyle==null) + if (mixinStyle == null) return; String key = "class"; //$NON-NLS-1$ - String original = (String)element.getElementAttributes().get(key); - if (original==null) + String original = (String) element.getElementAttributes().get(key); + if (original == null) original = mixinStyle; else - original += " "+mixinStyle; //$NON-NLS-1$ + original += " " + mixinStyle; //$NON-NLS-1$ element.addAttribute(key, original); } @@ -357,13 +372,13 @@ public class IntroHTMLGenerator { * Generates an anchor (link) element and its content from an IntroLink: * * <pre> - * - * <A id=linkId class="link" href=linkHref> - * <IMG src="blank.gif"> - * <SPAN class="link-label">linkLabel </SPAN> - * <P><SPAN>text</SPAN></P> - * </A> * + * <A id=linkId class="link" href=linkHref> + * <IMG src="blank.gif"> + * <SPAN class="link-label">linkLabel </SPAN> + * <P><SPAN>text</SPAN></P> + * </A> + * * </pre> * * @param element @@ -426,9 +441,9 @@ public class IntroHTMLGenerator { * Generate an image element from an IntroImage: * * <pre> - * - * <IMG src=imageSrc id=imageId> * + * <IMG src=imageSrc id=imageId> + * * </pre> * * @param element @@ -451,10 +466,10 @@ public class IntroHTMLGenerator { * additional flexibility for CSS designers. * * <pre> - * * - * <P><SPAN>spanContent</SPAN></P> - * + * + * <P><SPAN>spanContent</SPAN></P> + * * </pre> * * @param element @@ -498,12 +513,12 @@ public class IntroHTMLGenerator { * IntroHTML's <code>src</code> attribute is emitted as-is into a div element: * * <pre> - * - * - * <div id="attrvalue" class="attrvalue2"> - * content from file specified in src attribute - * </div> * + * + * <div id="attrvalue" class="attrvalue2"> + * content from file specified in src attribute + * </div> + * * </pre> * * @param element @@ -578,11 +593,11 @@ public class IntroHTMLGenerator { * <code>data</code> attribute is equal to the IntroHTML's <code>src</code> value. * * <pre> - * - * <OBJECT type="text/html" data="attrvalue"> - * alternative text in case the object can not be rendered - * </OBJECT> - * + * + * <OBJECT type="text/html" data="attrvalue"> + * alternative text in case the object can not be rendered + * </OBJECT> + * * </pre> * * @param element @@ -625,9 +640,9 @@ public class IntroHTMLGenerator { * base element * * <pre> - * - * - * <BASE href=baseURL> + * + * + * <BASE href=baseURL> * </pre> * * @param indentLevel @@ -646,9 +661,9 @@ public class IntroHTMLGenerator { * Generates the style element that goes into HEAD: * * <pre> - * - * <style type="text/css">HTML, IMG { border: 0px; } </style> - * + * + * <style type="text/css">HTML, IMG { border: 0px; } </style> + * * </pre> * * @param indentLevel @@ -666,9 +681,9 @@ public class IntroHTMLGenerator { * Generates the title element and its content: * * <pre> - * - * <TITLE>intro title</TITLE> - * + * + * <TITLE>intro title</TITLE> + * * </pre> * * @param title @@ -689,9 +704,9 @@ public class IntroHTMLGenerator { * Generates a link element that refers to a cascading style sheet (CSS): * * <pre> - * - * - * <LINK rel="stylesheet" style="text/css" href="style sheet"> + * + * + * <LINK rel="stylesheet" style="text/css" href="style sheet"> * </pre> * * @param href @@ -714,9 +729,9 @@ public class IntroHTMLGenerator { * Generate an anchor element: * * <pre> - * - * <A id=linkId class=linkClass href=linkHref> </A> - * + * + * <A id=linkId class=linkClass href=linkHref> </A> + * * </pre> * * @param link @@ -742,12 +757,12 @@ public class IntroHTMLGenerator { * Generates a div block that contains a header and span element: * * <pre> - * + * + * + * <DIV id=divId> + * <H><SPAN>spanContent </SPAN> </H> + * </DIV> * - * <DIV id=divId> - * <H><SPAN>spanContent </SPAN> </H> - * </DIV> - * * </pre> * * @param divId @@ -778,9 +793,9 @@ public class IntroHTMLGenerator { * additional flexibility for CSS designers. * * <pre> - * - * <P><SPAN>spanContent</SPAN></P> - * + * + * <P><SPAN>spanContent</SPAN></P> + * * </pre> * * @param type @@ -848,10 +863,10 @@ public class IntroHTMLGenerator { * Generates an IMG element: * * <pre> - * + * + * + * <IMG src=imageSrc alt=altText> * - * <IMG src=imageSrc alt=altText> - * * </pre> * * @param imageSrc @@ -894,10 +909,10 @@ public class IntroHTMLGenerator { * Generate a span element * * <pre> - * - * <SPAN class=spanClass> </SPAN> - * * + * <SPAN class=spanClass> </SPAN> + * + * * </pre> * * @param spanClass @@ -916,8 +931,8 @@ public class IntroHTMLGenerator { * Generate a span element * * <pre> - * - * <iframe src="localPage1.xhtml" frameborder="1" scrolling="auto" longdesc="localPage1.xhtml"> + * + * <iframe src="localPage1.xhtml" frameborder="1" scrolling="auto" longdesc="localPage1.xhtml"> * </pre> * * @param spanClass diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroLaunchBarShortcut.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroLaunchBarShortcut.java index 7ca0953c7..1180e6157 100644 --- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroLaunchBarShortcut.java +++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroLaunchBarShortcut.java @@ -10,6 +10,9 @@ *******************************************************************************/ package org.eclipse.ui.internal.intro.impl.model; +import java.net.MalformedURLException; +import java.net.URL; + import org.eclipse.core.runtime.IConfigurationElement; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.ui.internal.intro.impl.util.ImageUtil; @@ -84,6 +87,17 @@ public class IntroLaunchBarShortcut extends AbstractIntroElement { * @return */ public ImageDescriptor getImageDescriptor() { + String icon = getIcon(); + if (icon!=null) { + try { + URL imageUrl = new URL(icon); + ImageDescriptor desc = ImageDescriptor.createFromURL(imageUrl); + return desc; + } + catch (MalformedURLException e) { + // not a full url + } + } return ImageUtil.createImageDescriptor(getBundle(), getIcon()); } }
\ No newline at end of file diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroModelRoot.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroModelRoot.java index 0991d0e2a..1c9bb976c 100644 --- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroModelRoot.java +++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroModelRoot.java @@ -889,4 +889,9 @@ public class IntroModelRoot extends AbstractIntroContainer { if (configurer==null) return null; return configurer.resolvePath(extensionId, path); } + + + public IntroTheme getTheme() { + return theme; + } }
\ No newline at end of file diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroPartPresentation.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroPartPresentation.java index e9448c524..d44bdab86 100644 --- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroPartPresentation.java +++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroPartPresentation.java @@ -9,6 +9,7 @@ package org.eclipse.ui.internal.intro.impl.model; +import java.util.Map; import java.util.Vector; import org.eclipse.core.runtime.IConfigurationElement; @@ -210,8 +211,11 @@ public class IntroPartPresentation extends AbstractIntroElement { implementation.init(introPart, memento); implementation.createPartControl(parent); IntroModelRoot model = getModelRoot(); - if (model != null && model.getConfigurer() != null) - model.getConfigurer().init(introPart.getIntroSite()); + if (model != null && model.getConfigurer() != null) { + IntroTheme theme = model.getTheme(); + Map properties = theme!=null?theme.getProperties():null; + model.getConfigurer().init(introPart.getIntroSite(), properties); + } if (Log.logInfo) Log.info("Loading Intro UI implementation from: " //$NON-NLS-1$ + ModelLoaderUtil.getLogString(implementationElement, "kind")); //$NON-NLS-1$ 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 c67bb7862..d32780622 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 @@ -1,5 +1,8 @@ package org.eclipse.ui.internal.intro.impl.model; +import java.util.Hashtable; +import java.util.Map; + import org.eclipse.core.runtime.IConfigurationElement; import org.eclipse.ui.internal.intro.impl.model.util.BundleUtil; import org.osgi.framework.Bundle; @@ -10,12 +13,14 @@ public class IntroTheme extends AbstractIntroIdElement { private static final String ATT_PATH = "path"; //$NON-NLS-1$ private String name; private String path; + private Hashtable properties; public IntroTheme(IConfigurationElement element) { super(element); name = element.getAttribute(name); path = element.getAttribute(ATT_PATH); path = BundleUtil.getResolvedResourceLocation(path, getBundle()); + loadProperties(element); } public IntroTheme(Element element, Bundle bundle) { @@ -37,4 +42,22 @@ public class IntroTheme extends AbstractIntroIdElement { public int getType() { return THEME; } + + public Map getProperties() { + return properties; + } + + private void loadProperties(IConfigurationElement element) { + IConfigurationElement [] children = element.getChildren("property"); //$NON-NLS-1$ + if (children.length==0) + return; + properties = new Hashtable(); + for (int i=0; i<children.length; i++) { + IConfigurationElement property = children[i]; + String name = property.getAttribute("name"); //$NON-NLS-1$ + String value = property.getAttribute("value"); //$NON-NLS-1$ + if (name!=null && value!=null) + properties.put(name, value); + } + } } diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/url/IntroURL.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/url/IntroURL.java index 4fbf0f9ff..c23731a3e 100644 --- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/url/IntroURL.java +++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/url/IntroURL.java @@ -40,6 +40,7 @@ import org.eclipse.ui.internal.intro.impl.model.AbstractIntroPage; import org.eclipse.ui.internal.intro.impl.model.IntroLaunchBarElement; import org.eclipse.ui.internal.intro.impl.model.IntroModelRoot; import org.eclipse.ui.internal.intro.impl.model.IntroPartPresentation; +import org.eclipse.ui.internal.intro.impl.model.IntroTheme; import org.eclipse.ui.internal.intro.impl.model.IntroURLAction; import org.eclipse.ui.internal.intro.impl.model.loader.ExtensionPointManager; import org.eclipse.ui.internal.intro.impl.model.loader.ModelLoaderUtil; @@ -641,6 +642,7 @@ public class IntroURL implements IIntroURL { CustomizableIntroPart cpart = (CustomizableIntroPart) intro; IntroModelRoot modelRoot = IntroPlugin.getDefault().getIntroModelRoot(); String pageId = modelRoot.getCurrentPageId(); + IntroTheme theme = modelRoot.getTheme(); Rectangle bounds = cpart.getControl().getBounds(); Rectangle startBounds = Geometry.toDisplay(cpart.getControl() .getParent(), bounds); @@ -653,7 +655,7 @@ public class IntroURL implements IIntroURL { if (launchBarElement==null) return true; IntroLaunchBar launchBar = new IntroLaunchBar(launchBarElement - .getOrientation(), pageId, launchBarElement); + .getOrientation(), pageId, launchBarElement, theme); launchBar.createInActiveWindow(); Rectangle endBounds = Geometry.toDisplay(launchBar.getControl() .getParent(), launchBar.getControl().getBounds()); diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/IntroLaunchBar.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/IntroLaunchBar.java index ab99fd502..9f9e58cc3 100644 --- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/IntroLaunchBar.java +++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/IntroLaunchBar.java @@ -8,6 +8,8 @@ **************************************************************************************************/ package org.eclipse.ui.internal.intro.impl.presentations; +import java.util.Map; + import org.eclipse.jface.action.Action; import org.eclipse.jface.action.IMenuListener; import org.eclipse.jface.action.IMenuManager; @@ -43,6 +45,8 @@ import org.eclipse.ui.internal.intro.impl.IntroPlugin; import org.eclipse.ui.internal.intro.impl.Messages; import org.eclipse.ui.internal.intro.impl.model.IntroLaunchBarElement; import org.eclipse.ui.internal.intro.impl.model.IntroLaunchBarShortcut; +import org.eclipse.ui.internal.intro.impl.model.IntroModelRoot; +import org.eclipse.ui.internal.intro.impl.model.IntroTheme; import org.eclipse.ui.internal.intro.impl.swt.SharedStyleManager; import org.eclipse.ui.internal.intro.impl.util.ImageUtil; import org.eclipse.ui.intro.IIntroPart; @@ -76,6 +80,8 @@ public class IntroLaunchBar implements IWindowTrim { protected boolean simple; private String presentationId; + + private IntroTheme theme; static final int[] TOP_LEFT_CORNER = new int[] { 0, 6, 1, 5, 1, 4, 4, 1, 5, 1, 6, 0 }; @@ -147,11 +153,12 @@ public class IntroLaunchBar implements IWindowTrim { } } - public IntroLaunchBar(int orientation, String lastPageId, IntroLaunchBarElement element) { + public IntroLaunchBar(int orientation, String lastPageId, IntroLaunchBarElement element, IntroTheme theme) { this.orientation = orientation; this.location = element.getLocation(); this.lastPageId = lastPageId; this.element = element; + this.theme = theme; simple = true; presentationId = PlatformUI.getPreferenceStore().getString( @@ -357,16 +364,29 @@ public class IntroLaunchBar implements IWindowTrim { private void computeColors(Display display) { if (element.getBackground() != null) { - RGB r = SharedStyleManager.parseRGB(element.getBackground()); + RGB r = SharedStyleManager.parseRGB(resolveColor(element.getBackground())); if (r != null) bg = new Color(display, r); } if (element.getForeground() != null) { - RGB r = SharedStyleManager.parseRGB(element.getForeground()); + RGB r = SharedStyleManager.parseRGB(resolveColor(element.getForeground())); if (r != null) fg = new Color(display, r); } } + + private String resolveColor(String value) { + if (value.indexOf('$')== -1) + return value; + if (value.charAt(0)=='$' && value.charAt(value.length()-1)=='$' && theme!=null) { + Map properties = theme.getProperties(); + if (properties!=null) { + String key = value.substring(1, value.length()-1); + return (String)properties.get(key); + } + } + return value; + } public Control getControl() { return container; diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageStyleManager.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageStyleManager.java index fc9eb6f22..75b62bc20 100644 --- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageStyleManager.java +++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageStyleManager.java @@ -376,6 +376,14 @@ public class PageStyleManager extends SharedStyleManager { String key = buff.append(".font.fg").toString(); //$NON-NLS-1$ return getColor(toolkit, key); } + + public Color getBackgrond(FormToolkit toolkit, AbstractBaseIntroElement element) { + StringBuffer buff = ModelLoaderUtil.createPathToElementKey(element, true); + if (buff == null) + return null; + String key = buff.append(".bg").toString(); //$NON-NLS-1$ + return getColor(toolkit, key); + } public boolean isBold(IntroText text) { String value = null; diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageWidgetFactory.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageWidgetFactory.java index 280bee1b1..18fc68608 100644 --- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageWidgetFactory.java +++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageWidgetFactory.java @@ -399,6 +399,9 @@ public class PageWidgetFactory { Color fg = styleManager.getColor(toolkit, element); if (fg != null) elementControl.setForeground(fg); + Color bg = styleManager.getBackgrond(toolkit, element); + if (bg != null) + elementControl.setBackground(bg); } diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/intro/config/IntroConfigurer.java b/org.eclipse.ui.intro/src/org/eclipse/ui/intro/config/IntroConfigurer.java index 9f600ddd1..2a572a401 100644 --- a/org.eclipse.ui.intro/src/org/eclipse/ui/intro/config/IntroConfigurer.java +++ b/org.eclipse.ui.intro/src/org/eclipse/ui/intro/config/IntroConfigurer.java @@ -9,6 +9,9 @@ package org.eclipse.ui.intro.config; +import java.util.Map; + +import org.eclipse.ui.internal.intro.impl.IntroPlugin; import org.eclipse.ui.intro.IIntroSite; @@ -22,21 +25,49 @@ import org.eclipse.ui.intro.IIntroSite; */ public abstract class IntroConfigurer { + /** - * The identifier of the named group where the configurer can - * contribute local tool bar actions. + * The identifier of the named group where the configurer can contribute local tool bar actions. * * @see #init(IIntroSite) */ public static final String TB_ADDITIONS = "additions"; //$NON-NLS-1$ + protected Map themeProperties; + protected IIntroSite site; + /** - * Provides the opportunity for the configurer to contribute to - * the action bars. + * Provides the opportunity for the configurer to contribute to the action bars and to fetch + * presentation theme properties. + * * @param site * the intro part's site + * @param themeProperties + * properties of the current theme that can be used by the configurer, or + * <code>null</code> if no theme is currently active or the active theme has no + * properties. + */ + public void init(IIntroSite site, Map themeProperties) { + this.themeProperties = themeProperties; + this.site = site; + } + + /** + * Returns the value of the theme property with a given name. + * + * @param name + * the theme property name + * @return the value of the property or <code>null</code> if property is not found, the theme + * does not have properties or no theme is currently active. */ - public void init(IIntroSite site) { + + protected String getThemeProperty(String name) { + if (themeProperties == null) + return null; + String value = (String)themeProperties.get(name); + if (value!=null) + value = IntroPlugin.getDefault().getIntroModelRoot().resolveVariables(value); + return value; } /** |