tags:

views:

1815

answers:

1

How to change the color of Eclipse RCP view title bar?

+2  A: 

You can change the color with this is possible with the org.eclipse.ui.themes Extension-Point.

Here's an example snippet

   <extension
         point="org.eclipse.ui.themes">
      <theme
            id="de.spiritlink.custom.ui.theme"
            name="Custom Theme">
         <colorOverride
               id="org.eclipse.ui.workbench.ACTIVE_TAB_BG_END"
               value="255,0,0">
         </colorOverride>
         <colorOverride
               id="org.eclipse.ui.workbench.ACTIVE_TAB_BG_START"
               value="0,255,0">
         </colorOverride>
      </theme>
   </extension>

Setting the theme programmatically with IThemeManager, which is an object that contains references to usable ITheme objects and maintains a reference to the currently active theme. This theme will be used by the workbench to decorate tab folders and other controls where possible:

PlatformUI.getWorkbench().getThemeManager().setCurrentTheme("myThemeID");

Other details in thoses articles:

VonC