* Waits until modal dialogs are disposed. Assumes we are on SWT thread
*
* @since 3.0.1.3
*/
public static void waitForModals() {
SWTThread swt = SWTThread.getInstance();
Display display;
if (swt == null) {
display = Display.getDefault();
if (display == null) {
System.err.println("SWT Thread not started yet!");
return;
}
} else {
if (swt.isTerminated()) {
return;
}
display = swt.getDisplay();
}
if (display == null || display.isDisposed()) {
return;
}