diff --git a/CHANGELOG.md b/CHANGELOG.md index b6cc12faa..ed123760c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0). ### Fixed - java.lang.NoClassDefFoundError: org/codehaus/plexus/util/StringUtils [#1530](https://github.com/magento/magento2-phpstorm-plugin/pull/1530) +- java.lang.Throwable: Must not start write action from within read action in the other thread - deadlock is coming [#1531](https://github.com/magento/magento2-phpstorm-plugin/pull/1531) ## 5.1.0 diff --git a/src/com/magento/idea/magento2plugin/inspections/php/fix/PhpModuleNameQuickFix.java b/src/com/magento/idea/magento2plugin/inspections/php/fix/PhpModuleNameQuickFix.java index 02b9b4ba5..30a425a80 100644 --- a/src/com/magento/idea/magento2plugin/inspections/php/fix/PhpModuleNameQuickFix.java +++ b/src/com/magento/idea/magento2plugin/inspections/php/fix/PhpModuleNameQuickFix.java @@ -7,7 +7,6 @@ import com.intellij.codeInspection.LocalQuickFix; import com.intellij.codeInspection.ProblemDescriptor; -import com.intellij.openapi.command.WriteCommandAction; import com.intellij.openapi.project.Project; import com.jetbrains.php.lang.psi.elements.StringLiteralExpression; import com.magento.idea.magento2plugin.bundles.InspectionBundle; @@ -42,11 +41,6 @@ public void applyFix( } private void applyFix(final StringLiteralExpression expression) { - WriteCommandAction.writeCommandAction( - expression.getManager().getProject(), - expression.getContainingFile() - ).run(() -> - expression.updateText(expectedModuleName) - ); + expression.updateText(expectedModuleName); } } diff --git a/src/com/magento/idea/magento2plugin/inspections/xml/fix/XmlModuleNameQuickFix.java b/src/com/magento/idea/magento2plugin/inspections/xml/fix/XmlModuleNameQuickFix.java index f575a3efb..bdd023f1e 100644 --- a/src/com/magento/idea/magento2plugin/inspections/xml/fix/XmlModuleNameQuickFix.java +++ b/src/com/magento/idea/magento2plugin/inspections/xml/fix/XmlModuleNameQuickFix.java @@ -7,7 +7,6 @@ import com.intellij.codeInspection.LocalQuickFix; import com.intellij.codeInspection.ProblemDescriptor; -import com.intellij.openapi.command.WriteCommandAction; import com.intellij.openapi.project.Project; import com.intellij.psi.xml.XmlAttribute; import com.intellij.psi.xml.XmlAttributeValue; @@ -42,12 +41,7 @@ public void applyFix( } private void applyFix(final XmlAttributeValue value) { - WriteCommandAction.writeCommandAction( - value.getManager().getProject(), - value.getContainingFile() - ).run(() -> - doFix(value) - ); + doFix(value); } protected void doFix(