bndtools.jareditor.internal.utils.SWTConcurrencyUtil Maven / Gradle / Ivy
package bndtools.jareditor.internal.utils;
import org.eclipse.swt.widgets.Display;
public class SWTConcurrencyUtil {
public static void execForDisplay(Display display, Runnable op) {
if (display != null && !display.isDisposed()) {
if (display.getThread() == Thread.currentThread()) {
op.run();
} else {
display.asyncExec(op);
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy