protected void update(Runnable runnable){
  if (runnable instanceof SafeChange) {
    fireElementStateChanging(fileEditorInput);
  }
  IWorkbench workbench=PlatformUI.getWorkbench();
  IWorkbenchWindow[] windows=workbench.getWorkbenchWindows();
  if (windows != null && windows.length > 0) {
    DBeaverUI.asyncExec(runnable);
  }
 else {
    runnable.run();
  }
}

protected void update ( Runnable runnable ) { if ( runnable instanceof SafeChange ) { fireElementStateChanging ( fileEditorInput ) ; } IWorkbench workbench = PlatformUI . getWorkbench ( ) ; IWorkbenchWindow [ ] windows = workbench . getWorkbenchWindows ( ) ; if ( windows != null && windows . length > 0 ) { DBeaverUI . asyncExec ( runnable ) ; } else { runnable . run ( ) ; } }
posts the update code " behind " the running operation .
