|Correct way to access IWorkbenchThemeConstants [message #699838]
||Fri, 22 July 2011 12:15
| Martin Robertson
Registered: July 2011
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?
Powered by FUDForum
. Page generated in 0.11660 seconds