void (ActionEvent event) { try { if (myConfigurable.isModified()) { myConfigurable.apply(); mySaveAllOnClose = true; setCancelButtonText(CommonBundle.getCloseButtonText()); } } catch (ConfigurationException e) { if (myProject != null) { Messages.showMessageDialog(myProject, e.getMessage(), e.getTitle(), Messages.getErrorIcon()); } else { Messages.showMessageDialog(getRootPane(), e.getMessage(), e.getTitle(), Messages.getErrorIcon()); } } }