Shell firstShellWithStyle = Utils.findFirstShellWithStyle(SWT.APPLICATION_MODAL);
if (firstShellWithStyle != null && firstShellWithStyle != this) {
// ok, there's a window with application_modal set, which on OSX will mean
// that if we open our window, it will be on top, but users won't be able
// to interact with it. So, wait until the modal window goes away..
firstShellWithStyle.addDisposeListener(new DisposeListener() {
public void widgetDisposed(DisposeEvent e) {
// wait for dispose to complete, then run open again to check for
// any new application modal shells to wait for
Utils.execSWTThreadLater(0, new AERunnable() {
public void runSupport() {