Package fr.adrienbrault.idea.symfony2plugin.util

Examples of fr.adrienbrault.idea.symfony2plugin.util.RegexPsiElementFilter


    private PsiElement[] getSets(PsiElement psiElement) {
        String funcName = psiElement.getText();
        for(TwigSet twigSet: TwigUtil.getSetDeclaration(psiElement.getContainingFile())) {
           if(twigSet.getName().equals(funcName)) {
               return PsiTreeUtil.collectElements(psiElement.getContainingFile(), new RegexPsiElementFilter(
                   TwigTagWithFileReference.class,
                   "\\{%\\s?set\\s?" + Pattern.quote(funcName) + "\\s?.*")
               );
           }
        }
View Full Code Here


                final String macroName = twigMacro.getOriginalName() == null ? funcName : twigMacro.getOriginalName();

                PsiFile psiFile = TwigHelper.getTemplateFileByName(psiElement.getProject(), twigMacro.getTemplate());

                if(psiFile != null) {
                    return PsiTreeUtil.collectElements(psiFile, new RegexPsiElementFilter(
                        TwigElementTypes.MACRO_TAG,
                        "\\{%\\s?macro\\s?" + Pattern.quote(macroName) + "\\s?\\(.*%}")
                    );
                }

View Full Code Here

TOP

Related Classes of fr.adrienbrault.idea.symfony2plugin.util.RegexPsiElementFilter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.