我想在eclipse 3.x中使用CSS。 CC的文件是通过org.eclipse.e4.ui.css.swt.theme
扩展定义,并通过这个代码在ApplicationWorkbenchAdvisor
如何在eclipse 3.x RCP中应用CSS样式?
public void initialize(IWorkbenchConfigurer configurer)
{
super.initialize(configurer);
BundleContext context = Activator.getDefault().getBundle().getBundleContext();
ServiceReference serviceRef = context.getServiceReference(IThemeManager.class.getName());
IThemeManager themeManager = (IThemeManager) context.getService(serviceRef);
final IThemeEngine engine = themeManager.getEngineForDisplay(Display.getCurrent());
engine.setTheme("com.mycompany.rcp.test.theme", true);
}
装载它的工作,但也有像这样的许多“泄气访问”警告:Discouraged access: The type 'IThemeEngine' is not API (restriction on required library 'D:\Workspaces\Indu4.0-Oxygen\.metadata\.plugins\org.eclipse.pde.core\.bundle_pool\plugins\org.eclipse.e4.ui.css.swt.theme_0.11.0.v20170312-2302.jar')
有没有更好的在Eclipse 3.x应用程序中处理主题和样式的方法?
hi @paul。我也尝试在eclipse rcp 3.x中添加主题。你能给任何链接跟随? – krezus