Skip to content

Commit 872153c

Browse files
author
Vitaliy Boyko
committed
Fix for CreateAPluginAction accessible from the wrong context
1 parent a6c066f commit 872153c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/com/magento/idea/magento2plugin/actions/generation/CreateAPluginAction.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,19 @@ public void update(AnActionEvent event) {
4545
PsiFile psiFile = pair.getFirst();
4646
PhpClass phpClass = pair.getSecond();
4747
if (phpClass == null || psiFile == null) {
48+
this.setStatus(event, false);
4849
return;
4950
}
5051
targetClass = phpClass;
5152
if (!(psiFile instanceof PhpFile) || phpClass.isFinal() || this.targetMethod == null) {
5253
this.setStatus(event, false);
5354
return;
5455
}
55-
} else {
56-
this.setStatus(event, false);
56+
this.setStatus(event, true);
5757
return;
5858
}
59-
this.setStatus(event, true);
59+
60+
this.setStatus(event, false);
6061
}
6162

6263
private void setStatus(AnActionEvent event, boolean status) {

0 commit comments

Comments
 (0)