From 62c28f024ad465c3b654629d0c584f818b091069 Mon Sep 17 00:00:00 2001 From: Dmitry Avdeev Date: Fri, 30 Dec 2016 18:54:28 +0300 Subject: [PATCH] fixing maven test - missed writable check --- .../idea/maven/dom/intentions/ChooseFileIntentionAction.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/maven/src/main/java/org/jetbrains/idea/maven/dom/intentions/ChooseFileIntentionAction.java b/plugins/maven/src/main/java/org/jetbrains/idea/maven/dom/intentions/ChooseFileIntentionAction.java index 4698d645a36b..cd5210ebcd8c 100644 --- a/plugins/maven/src/main/java/org/jetbrains/idea/maven/dom/intentions/ChooseFileIntentionAction.java +++ b/plugins/maven/src/main/java/org/jetbrains/idea/maven/dom/intentions/ChooseFileIntentionAction.java @@ -15,6 +15,7 @@ */ package org.jetbrains.idea.maven.dom.intentions; +import com.intellij.codeInsight.FileModificationService; import com.intellij.codeInsight.intention.IntentionAction; import com.intellij.openapi.application.Result; import com.intellij.openapi.command.WriteCommandAction; @@ -82,6 +83,7 @@ public class ChooseFileIntentionAction implements IntentionAction { if (selectedFile == null) return; if (dep != null) { + if (!FileModificationService.getInstance().prepareFileForWrite(file)) return; new WriteCommandAction(project) { protected void run(@NotNull Result result) throws Throwable { dep.getSystemPath().setValue(selectedFile);