maven: write action is unnecessary in some quick fixes appcode/171.1009 clion/171.1008 dbe/171.1011
authorpeter <peter@jetbrains.com>
Wed, 16 Nov 2016 08:47:40 +0000 (09:47 +0100)
committerpeter <peter@jetbrains.com>
Wed, 16 Nov 2016 08:47:40 +0000 (09:47 +0100)
plugins/maven/src/main/java/org/jetbrains/idea/maven/dom/annotator/MavenDomAnnotator.java
plugins/maven/src/main/java/org/jetbrains/idea/maven/dom/converters/MavenArtifactCoordinatesConverter.java
plugins/maven/src/main/java/org/jetbrains/idea/maven/utils/library/RepositoryAddLibraryAction.java

index d671b9efde2c4ff14b0d23f66f536f48fcddb777..dbdaca6a63993079468454ffa532966143fc641e 100644 (file)
@@ -85,6 +85,11 @@ public class MavenDomAnnotator implements DomElementsAnnotator {
       return MavenDomBundle.message("inspection.group");
     }
 
+    @Override
+    public boolean startInWriteAction() {
+      return false;
+    }
+
     public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {
       new OpenFileDescriptor(project, myFile).navigate(true);
     }
index 52cf0a8a140c4ebfcef733b56cf421791914d27c..d5d2666a1aac81fee9921037039f305521f993f0 100644 (file)
@@ -18,7 +18,6 @@ package org.jetbrains.idea.maven.dom.converters;
 import com.intellij.codeInspection.LocalQuickFix;
 import com.intellij.codeInspection.ProblemDescriptor;
 import com.intellij.openapi.project.Project;
-import com.intellij.openapi.util.Computable;
 import com.intellij.openapi.util.RecursionManager;
 import com.intellij.openapi.util.text.StringUtil;
 import com.intellij.openapi.vfs.LocalFileSystem;
@@ -166,6 +165,11 @@ public abstract class MavenArtifactCoordinatesConverter extends ResolvingConvert
       return MavenDomBundle.message("fix.update.indices");
     }
 
+    @Override
+    public boolean startInWriteAction() {
+      return false;
+    }
+
     public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {
       MavenProjectIndicesManager.getInstance(project).scheduleUpdateAll();
     }
index 58cbc221ffe52fa42f01113239ffb67bd1059ad3..b3af071286e71c573bb0f93a83c1ed77e19c3fd8 100644 (file)
@@ -35,6 +35,11 @@ public class RepositoryAddLibraryAction extends IntentionAndQuickFixAction {
     return ProjectBundle.message("maven.library.family.name");
   }
 
+  @Override
+  public boolean startInWriteAction() {
+    return false;
+  }
+
   @Override
   public void applyFix(@NotNull Project project, PsiFile file, @Nullable Editor editor) {
     addLibraryToModule(libraryDescription, module);