void (@NotNull AnActionEvent e) { boolean result; if (GeneralSettings.getInstance().isConfirmExit()) { result = Messages.showYesNoDialog( IdeBundle.message("dialog.message.restart.ide"), IdeBundle.message("dialog.title.restart.ide"), IdeBundle.message("dialog.action.restart.yes"), IdeBundle.message("dialog.action.restart.cancel"), Messages.getWarningIcon() ) == Messages.YES; } else { result = true; } if (result) { final ApplicationEx app = (ApplicationEx)ApplicationManager.getApplication(); app.restart(true); } }