Package com.intellij.psi.search

Examples of com.intellij.psi.search.PsiElementProcessor


            for (XmlTag goalTag : goals) {
                final String goalName = goalTag.getAttributeValue("name");
                if (!regGoalName.equals(goalName))
                    continue;

                PsiTreeUtil.processElements(goalTag, new PsiElementProcessor() {
                    public boolean execute(final PsiElement element) {
                        if (!(element instanceof XmlTag))
                            return true;

                        final XmlTag tag = (XmlTag) element;
View Full Code Here


    @Nullable
    public static CssRulesetList findFirstCssRulesetList(@NotNull PsiFile file)
    {
        final Ref<CssRulesetList> ref = new Ref<CssRulesetList>();
        PsiTreeUtil.processElements(file, new PsiElementProcessor()
        {
            public boolean execute(PsiElement element)
            {
                if (element instanceof CssRulesetList)
                {
View Full Code Here

    @Nullable
    private static CssTermList resolveTermList(@NotNull CssTermList termList)
    {
        final Ref<CssTermList> result = new Ref<CssTermList>(null);
        PsiTreeUtil.processElements(termList, new PsiElementProcessor()
        {
            public boolean execute(@NotNull PsiElement psiElement)
            {
                if (psiElement instanceof CssTerm)
                {
View Full Code Here

                }
            }
        }
        if (isDynamicCssLanguage(block) && ProjectSettings.getInstance(block.getProject()).isResolveMixins())
        {
            return PsiTreeUtil.processElements(block, new PsiElementProcessor()
            {
                public boolean execute(@NotNull PsiElement element)
                {
                    PsiReference[] references = getFromElementAndMyProviders(element);
                    for (PsiReference reference : references)
View Full Code Here

      if (attrs != null) {
        result.add(new FoldingDescriptor(attrs, attrs.getTextRange()));
      }
    }
    if (!quick) {
      PsiTreeUtil.processElements(file, new PsiElementProcessor() {
        @Override
        public boolean execute(@NotNull PsiElement element) {
          if (element.getNode().getElementType() == BnfParserDefinition.BNF_BLOCK_COMMENT) {
            result.add(new FoldingDescriptor(element, element.getTextRange()));
          }
View Full Code Here

                if(!(psiFile instanceof TwigFile)) {
                    return map;
                }

                PsiTreeUtil.processElements(psiFile, new PsiElementProcessor() {

                    @Override
                    public boolean execute(@NotNull PsiElement psiElement) {

                        // {% macro "foo"( %}
View Full Code Here

            @Override
            public boolean process(VirtualFile virtualFile) {

                PsiFile psiFile = PsiManager.getInstance(project).findFile(virtualFile);
                if(psiFile != null) {
                    PsiTreeUtil.processElements(psiFile, new PsiElementProcessor() {
                        public boolean execute(@NotNull PsiElement psiElement) {

                            if(getTwigMacroNameKnownPattern(name).accepts(psiElement)) {
                                targets.add(psiElement);
                            }
View Full Code Here

    for (ErlangFunction function : file.getFunctions()) {
      result.add(new FoldingDescriptor(function, function.getTextRange()));
    }

    if (!quick) {
      PsiTreeUtil.processElements(file, new PsiElementProcessor() {
        @Override
        public boolean execute(@NotNull PsiElement element) {
          if (ErlangParserDefinition.COMMENTS.contains(element.getNode().getElementType()) && element.getTextRange().getLength() > 2) {
            result.add(new FoldingDescriptor(element, element.getTextRange()));
          }
View Full Code Here

            result.add((ClDef) psi);
          }
        }
      }
    } else {
      PsiTreeUtil.processElements(this, new PsiElementProcessor() {
        public boolean execute(@NotNull PsiElement element) {
          if (element instanceof ClDef) {
            result.add((ClDef) element);
          }
          return true;
View Full Code Here

TOP

Related Classes of com.intellij.psi.search.PsiElementProcessor

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.