Community
Participate
Working Groups
Sometimes, elements are not reachable in a meaningful way, so, this is a request to make it possible to set the id of some element and ask it to be restyled. I.e.: something as: public class Styling { /** * Sets the css id for some widget and asks the theme engine to restyle it (and optionally its * children too). * * @param widget the control which we want to style * @param id the id we want to set (which can later be referred in CSS -- for instance, setting * the id as MyClassId, it's possible to style the widget later on through * #MyClassId). * @param applyToChildren whether the style should be reapplied to children. */ public static void setCssId(Object widget, String id, boolean applyToChildren) { IStylingEngine engine= PlatformUI.getWorkbench().getActiveWorkbenchWindow().getService(IStylingEngine.class); if (engine != null) { engine.setId(widget, id); IThemeEngine themeEngine= (IThemeEngine) Display.getDefault().getData( "org.eclipse.e4.ui.css.swt.theme"); //$NON-NLS-1$ themeEngine.applyStyles(widget, applyToChildren); } } } in a project which has a public API (the css theming plugins currently don't have a public API, so, it may be needed to create a project for this, or at least, make a part of it API). This is a pre-requisite for https://bugs.eclipse.org/bugs/show_bug.cgi?id=465666
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.