From 85f4eb275a80294c6c19c02c6d593dfcab04e6e9 Mon Sep 17 00:00:00 2001 From: "Anna.Kozlova" Date: Fri, 17 Feb 2017 16:43:56 +0100 Subject: [PATCH] EA-97135 - assert: NoSwingUnderWriteAction.lambda$watchForEvents$ --- .../typeMigration/ui/TypeMigrationDialog.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/java/java-impl/src/com/intellij/refactoring/typeMigration/ui/TypeMigrationDialog.java b/java/java-impl/src/com/intellij/refactoring/typeMigration/ui/TypeMigrationDialog.java index b4733c2238a7..4fcf4acd998d 100644 --- a/java/java-impl/src/com/intellij/refactoring/typeMigration/ui/TypeMigrationDialog.java +++ b/java/java-impl/src/com/intellij/refactoring/typeMigration/ui/TypeMigrationDialog.java @@ -27,6 +27,7 @@ import com.intellij.openapi.options.ConfigurationException; import com.intellij.openapi.project.Project; import com.intellij.openapi.ui.DialogWrapper; import com.intellij.openapi.ui.LabeledComponent; +import com.intellij.openapi.ui.Messages; import com.intellij.openapi.util.Disposer; import com.intellij.pom.java.LanguageLevel; import com.intellij.psi.*; @@ -85,13 +86,12 @@ public abstract class TypeMigrationDialog extends RefactoringDialog { setTitle(REFACTORING_NAME); } - @Override - protected void canRun() throws ConfigurationException { - if (myScopeChooserCombo.getSelectedScope() == null) throw new ConfigurationException("Scope is not chosen"); - } - @Override protected void doAction() { + if (myScopeChooserCombo.getSelectedScope() == null) { + Messages.showErrorDialog("Scope is not chosen", "Error"); + return; + } FindSettings.getInstance().setDefaultScopeName(myScopeChooserCombo.getSelectedScopeName()); if (myRules == null) { myRules = new TypeMigrationRules();