Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Correct way to access IWorkbenchThemeConstants
Correct way to access IWorkbenchThemeConstants [message #699838] Fri, 22 July 2011 08:15
Martin Robertson is currently offline Martin Robertson
Messages: 3
Registered: July 2011
Junior Member
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?
Previous Topic:Problem with Spring Remote (RMI) and RCP application
Next Topic:Default Cut/Copy/Paste/Rename/DeleteCommands disabled
Goto Forum:
  


Current Time: Tue Jul 22 11:50:17 EDT 2014

Powered by FUDForum. Page generated in 0.05426 seconds