Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-ui-dev] Correct way to access IWorkbenchThemeConstants

I have asked this on StackOverflow (http://stackoverflow.com/questions/6649756/how-to-correctly-style-borders-of-a-ctabitem) but I still haven't managed to resolve it. 

You can see screenshots of my tabbed UI here: http://mchr3k.github.com/org.intrace/eclipse.html

Is there anyone on the Eclipse UI team who could help me?

On 12 Jul 2011, at 16:06, Martin Hare Robertson <mchr3k@xxxxxxxxx> wrote:

> I am writing an Eclipse plugin which includes a tabbed UI. I would like to apply the correct colours to my CTabFolder object to match the current Eclipse theme. 
> 
> I have come up with the following code fragment to get the correct colour object.
> 
> IWorkbench workBench = PlatformUI.getWorkbench();
> ITheme theme = workBench.getThemeManager().getCurrentTheme();
> ColorRegistry colreg = theme.getColorRegistry();
> 
> @SuppressWarnings("restriction")
> Color c1 = colreg.get(IWorkbenchThemeConstants.ACTIVE_TAB_BG_START);
> 
> However, this causes a compiler warning as IWorkbenchThemeConstants is in an internal package. Is there a public way to access this colour information?


Back to the top