Skip to main content

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 12:15
Martin Robertson is currently offline Martin RobertsonFriend
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();

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: Fri Dec 03 08:25:49 GMT 2021

Powered by FUDForum. Page generated in 24.00843 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top