use of org.eclipse.e4.ui.css.swt.engine.CSSSWTEngineImpl in project eclipse.platform.ui by eclipse-platform.
the class ViewCSSTest method setUp.
@BeforeEach
public void setUp() {
display = Display.getDefault();
engine = new CSSSWTEngineImpl(display);
}
use of org.eclipse.e4.ui.css.swt.engine.CSSSWTEngineImpl in project eclipse.pde by eclipse-pde.
the class CssSpyPart method getCSSEngine.
/**
* @return the CSS engine governing the argument, or null if none
*/
public static CSSEngine getCSSEngine(Object o) {
CSSEngine engine = null;
if (o instanceof CSSStylableElement) {
CSSStylableElement element = (CSSStylableElement) o;
engine = WidgetElement.getEngine((Widget) element.getNativeWidget());
}
if (engine == null && o instanceof Widget) {
if (((Widget) o).isDisposed()) {
return null;
}
engine = WidgetElement.getEngine((Widget) o);
}
if (engine == null && Display.getCurrent() != null) {
engine = new CSSSWTEngineImpl(Display.getCurrent());
}
return engine;
}
Aggregations