8000 plugin breaks the context menu in the Project view #575, #525 · Koc/idea-php-symfony2-plugin@7bcb643 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7bcb643

Browse files
committed
plugin breaks the context menu in the Project view Haehnchen#575, Haehnchen#525
1 parent 6ec7423 commit 7bcb643

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/fr/adrienbrault/idea/symfony2plugin/action/ServiceActionUtil.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,12 @@ public static void buildFile(AnActionEvent event, final Project project, String
6262
return;
6363
}
6464

65-
final PsiDirectory initialBaseDir = view.getOrChooseDirectory();
65+
PsiDirectory[] directories = view.getDirectories();
66+
if(directories.length == 0) {
67+
return;
68+
}
69+
70+
final PsiDirectory initialBaseDir = directories[0];
6671
if (initialBaseDir == null) {
6772
return;
6873
}

src/fr/adrienbrault/idea/symfony2plugin/action/bundle/BundleClassGeneratorUtil.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,12 @@ public static PsiDirectory getBundleDirContext(@NotNull AnActionEvent event) {
6161
return null;
6262
}
6363

64-
final PsiDirectory initialBaseDir = view.getOrChooseDirectory();
64+
PsiDirectory[] directories = view.getDirectories();
65+
if(directories.length == 0) {
66+
return null;
67+
}
68+
69+
final PsiDirectory initialBaseDir = directories[0];
6570
if (initialBaseDir == null) {
6671
return null;
6772
}

0 commit comments

Comments
 (0)
0