Skip to content

Commit fd84c1e

Browse files
author
Vitaliy Boyko
committed
1306: Must not start write action from within read action in the other thread - fix
1 parent 5df4284 commit fd84c1e

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

src/com/magento/idea/magento2plugin/inspections/php/fix/PhpModuleNameQuickFix.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
import com.intellij.codeInspection.LocalQuickFix;
99
import com.intellij.codeInspection.ProblemDescriptor;
10-
import com.intellij.openapi.command.WriteCommandAction;
1110
import com.intellij.openapi.project.Project;
1211
import com.jetbrains.php.lang.psi.elements.StringLiteralExpression;
1312
import com.magento.idea.magento2plugin.bundles.InspectionBundle;
@@ -42,11 +41,6 @@ public void applyFix(
4241
}
4342

4443
private void applyFix(final StringLiteralExpression expression) {
45-
WriteCommandAction.writeCommandAction(
46-
expression.getManager().getProject(),
47-
expression.getContainingFile()
48-
).run(() ->
49-
expression.updateText(expectedModuleName)
50-
);
44+
expression.updateText(expectedModuleName);
5145
}
5246
}

src/com/magento/idea/magento2plugin/inspections/xml/fix/XmlModuleNameQuickFix.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
import com.intellij.codeInspection.LocalQuickFix;
99
import com.intellij.codeInspection.ProblemDescriptor;
10-
import com.intellij.openapi.command.WriteCommandAction;
1110
import com.intellij.openapi.project.Project;
1211
import com.intellij.psi.xml.XmlAttribute;
1312
import com.intellij.psi.xml.XmlAttributeValue;
@@ -42,12 +41,7 @@ public void applyFix(
4241
}
4342

4443
private void applyFix(final XmlAttributeValue value) {
45-
WriteCommandAction.writeCommandAction(
46-
value.getManager().getProject(),
47-
value.getContainingFile()
48-
).run(() ->
49-
doFix(value)
50-
);
44+
doFix(value);
5145
}
5246

5347
protected void doFix(

0 commit comments

Comments
 (0)