我想在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