use of org.whole.lang.e4.ui.jobs.FunctionRunnable in project whole by wholeplatform.
the class AbstractModelTextAction method calculateEnabled.
protected boolean calculateEnabled(IBindingManager bm) {
IEntityPartViewer viewer = (IEntityPartViewer) bm.wGetValue("viewer");
if (!Tools.TEXTUAL.isActive(viewer) || !(ModelObserver.getObserver(bm.wGet("focusEntity"), viewer.getEditPartRegistry()) instanceof ITextualEntityPart))
return false;
IEclipseContext context = (IEclipseContext) bm.wGetValue("eclipse#eclipseContext");
ISynchronizableRunnable runnable = new FunctionRunnable(context, bm, getText(), getEnablementUri());
IEntity result = runnable.syncExec(3000).getResult();
return result != null && result.wBooleanValue();
}
Aggregations