File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/fr/adrienbrault/idea/symfony2plugin/templating/util Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -84,24 +84,25 @@ public static String getControllerMethodShortcut(Method method) {
8484 return shortcutName + ".html.twig" ;
8585 }
8686
87+ @ NotNull
8788 public static Map <String , PsiElement > getTemplateAnnotationFiles (PhpDocTag phpDocTag ) {
8889
8990 // @TODO: @Template(template="templatename")
9091 // Also replace "Matcher" with annotation psi elements; now possible
9192 // Wait for "annotation plugin" update; to not implement whole stuff here again?
9293
94+ Map <String , PsiElement > templateFiles = new HashMap <String , PsiElement >();
95+
9396 // find template name on annotation parameter
9497 // @Template("templatename")
9598 PhpPsiElement phpDocAttrList = phpDocTag .getFirstPsiChild ();
9699 if (phpDocAttrList == null ) {
97- return null ;
100+ return templateFiles ;
98101 }
99102
100103 String tagValue = phpDocAttrList .getText ();
101104 Matcher matcher = Pattern .compile ("\\ (\" (.*)\" " ).matcher (tagValue );
102105
103- Map <String , PsiElement > templateFiles = new HashMap <String , PsiElement >();
104-
105106 if (matcher .find ()) {
106107 // @TODO: only one should possible; refactor getTemplatePsiElements
107108 PsiElement [] psiElement = TwigHelper .getTemplatePsiElements (phpDocTag .getProject (), matcher .group (1 ));
You can’t perform that action at this time.
0 commit comments