type migration: start rename method in read action
authorDmitry Batkovich <dmitry.batkovich@jetbrains.com>
Tue, 16 Aug 2016 07:24:03 +0000 (10:24 +0300)
committerDmitry Batkovich <dmitry.batkovich@jetbrains.com>
Tue, 16 Aug 2016 07:24:03 +0000 (10:24 +0300)
java/java-impl/src/com/intellij/refactoring/typeMigration/TypeMigrationLabeler.java

index a5bfa290b327f3a42eb62a56863ca06e72d0b7ab..73c312e0791f101a007a6d038ac29f661d2394fa 100644 (file)
@@ -339,7 +339,7 @@ public class TypeMigrationLabeler {
         if (usageInfo instanceof OverridenUsageInfo) {
           final String migrationName = ((OverridenUsageInfo)usageInfo).getMigrateMethodName();
           if (migrationName != null) {
-            new RenameProcessor(project, element, migrationName, false, false).run();
+            ApplicationManager.getApplication().invokeLater(() -> new RenameProcessor(project, element, migrationName, false, false).run());
           }
         }
       }