File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/main/java/fr/adrienbrault/idea/symfony2plugin/intentions/yaml Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 1
1
package fr .adrienbrault .idea .symfony2plugin .intentions .yaml ;
2
2
3
3
import com .intellij .codeInspection .*;
4
+ import com .intellij .openapi .command .WriteCommandAction ;
4
5
import com .intellij .openapi .project .Project ;
5
6
import com .intellij .psi .PsiElement ;
6
7
import com .intellij .psi .PsiElementVisitor ;
@@ -131,9 +132,13 @@ public String getFamilyName() {
131
132
public void applyFix (@ NotNull Project project , @ NotNull ProblemDescriptor problemDescriptor ) {
132
133
final PsiElement serviceKeyValue = problemDescriptor .getPsiElement ().getParent ();
133
134
134
- if (serviceKeyValue instanceof YAMLKeyValue ) {
135
- ServiceActionUtil . fixServiceArgument (( YAMLKeyValue ) serviceKeyValue ) ;
135
+ if (!( serviceKeyValue instanceof YAMLKeyValue ) ) {
136
+ return ;
136
137
}
138
+
139
+ WriteCommandAction .writeCommandAction (project ).withName ("Service Update" ).run (() -> {
140
+ ServiceActionUtil .fixServiceArgument ((YAMLKeyValue ) serviceKeyValue );
141
+ });
137
142
}
138
143
}
139
144
}
You can’t perform that action at this time.
0 commit comments