public static boolean hasStyle(final Widget w, final int style) { if ((w == null) || w.isDisposed()) return false; return UIThreadRunnable.syncExec( w.getDisplay(), new BoolResult() { public boolean run() { return (w.getStyle() & style) != 0; } }); }
public static String getText(final Object w) { if ((w instanceof Widget) && !((Widget) w).isDisposed()) { final Widget widget = (Widget) w; return UIThreadRunnable.syncExec( widget.getDisplay(), new StringResult() { public String run() { Object returnV = ReflectionUtil.invokeMethod("getText", widget); return (String) returnV; } }); } return null; }