Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-ui-dev] M9 theme roundup


There have been some recent changes and additions to the theme API.  They are as follows:
  • The org.eclipse.ui.IThemePreview interface has been moved into the org.eclipse.ui.themes package.  This is a breaking change from previous Integration/Milestone builds.  I'm not aware of anyone other than platform UI utilizing this interface at the moment but heads up has been given.
  • The contents of 'current theme' are pushed into the JFace registries on current theme change (via IThemeManger.setCurrentTheme()).  This allows JFace code to piggypack on the themes API without actually pushing the theme code into JFace.  Please see https://bugs.eclipse.org/bugs/show_bug.cgi?id=56484 for more details.  This has the added benefit of making themes much easier to work with.  Instead of going through the theme manager to get the color/font registries of the current theme, you may now (continue) to simply access and listen to the JFace registries.  Clients who want to make use of specific themes may still do so via IWorkbench.getThemeManager().getTheme().blah().
  • IThemeManager.DEFAULT_THEME has been given a meaningful value.  As such, ITheme.getId() and ITheme.getLabel() are now guarenteed not to be null.
  • Platform specific color/font definitions.  You may now assign values for your fonts and colors on a per-platform basis.  Example:  
    <colorDefinition
        id="com.xyz.Forground"
        categoryId="com.xyz.ThemeCategory"
        label="XYZ Foreground Color"
        value="COLOR_BLACK">
         <!-- white should be used on GTK -->
         <colorValue
          value="COLOR_WHITE"
          os="linux"
          ws="gtk"/>
   </colorDefinition>
Please see the theme schema for further details of this feature. (http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.ui/schema/themes.exsd)
  • The colors and fonts preference page now utilizes a tree viewer as opposed to a combo/list pair for navigation.
  • the themeElementCategory element of the themes extension point may now have a parent element.  This allows categories to be better organized.
  • Test suites have been added.  Yes yes.  About time.

Back to the top