Skip to content

Commit b8008cd

Browse files
authored
Merge pull request Haehnchen#1219 from cedricziel/create-command-fix
Adjust resource path for bundle file creation
2 parents a17714c + 4b6c480 commit b8008cd

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/main/java/fr/adrienbrault/idea/symfony2plugin/action/bundle/NewBundleCommandAction.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,7 @@ protected void run(@NotNull Result result) throws Throwable {
5050
return;
5151
}
5252

53-
if(bundleFile != null) {
54-
new OpenFileDescriptor(getProject(), bundleFile.getContainingFile().getVirtualFile(), 0).navigate(true);
55-
}
53+
new OpenFileDescriptor(getProject(), bundleFile.getContainingFile().getVirtualFile(), 0).navigate(true);
5654
}
5755

5856
@Override

src/main/java/fr/adrienbrault/idea/symfony2plugin/util/psi/PhpBundleFileFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public static PsiElement createBundleFile(@NotNull PhpClass bundleClass, @NotNul
6969
throw new Exception("File already exists");
7070
}
7171

72-
String COMPILER_TEMPLATE = "/resources/fileTemplates/" + template + ".php";
72+
String COMPILER_TEMPLATE = "/fileTemplates/" + template + ".php";
7373
String fileTemplateContent = getFileTemplateContent(COMPILER_TEMPLATE);
7474
if(fileTemplateContent == null) {
7575
throw new Exception("Template content error");
@@ -154,7 +154,7 @@ public static PsiElement createCompilerPass(@NotNull PhpClass bundleClass, @NotN
154154
groupStatement.addRangeBefore(methodReference, semicolon, groupStatement.getLastChild());
155155
}
156156

157-
String COMPILER_TEMPLATE = "/resources/fileTemplates/compiler_pass.php";
157+
String COMPILER_TEMPLATE = "/fileTemplates/compiler_pass.php";
158158
String fileTemplateContent = getFileTemplateContent(COMPILER_TEMPLATE);
159159
if(fileTemplateContent == null) {
160160
throw new Exception("Template content error");

0 commit comments

Comments
 (0)