public static void runInUI(@Nullable Shell shell, @NotNull Runnable runnable) { final Display display = shell == null || shell.isDisposed() ? Display.getDefault() : shell.getDisplay(); if (display.getThread() != Thread.currentThread()) { display.syncExec(runnable); } else { runnable.run(); } }
public void updatePaneActionHandlers(Runnable runnable) { clearPaneActionHandlers(); runnable.run(); updateActionBars(); }