void () { if (myPrepareSuccessfulSwingThreadCallback != null) { // make sure that dialog is closed in swing thread try { ApplicationManager.getApplication().invokeAndWait(myPrepareSuccessfulSwingThreadCallback); } catch (RuntimeException e) { LOG.error(e); } } }