Package com.intellij.psi

Examples of com.intellij.psi.XmlRecursiveElementVisitor


    private MarkupWicketIdHierarchy(@NotNull final XmlFile xmlFile) {
        this.wicketIdPathMap = new HashMap<String, MarkupWicketIdItem>();
        this.root = new MarkupWicketIdItem();
        this.wicketIdPathMap.put("", root);

        xmlFile.accept(new XmlRecursiveElementVisitor() {
            private StringBuilder sb = new StringBuilder();
            private MarkupWicketIdItem current = root;

            @Override
            public void visitElement(PsiElement element) {
View Full Code Here


    return Collections.<PsiElement>singletonList(psiFile);
  }

  private static List<PsiElement> findDartRootsInXml(XmlFile xmlFile) {
    final List<PsiElement> result = new ArrayList<PsiElement>();
    xmlFile.acceptChildren(new XmlRecursiveElementVisitor() {
      @Override
      public void visitElement(PsiElement element) {
        if (element instanceof DartEmbeddedContent) {
          result.add(element);
          return;
View Full Code Here

  }

  private static FileIncludeInfo[] getIncludeInfos(@NotNull final XmlFile xmlFile) {
    final List<FileIncludeInfo> result = new ArrayList<FileIncludeInfo>();

    xmlFile.acceptChildren(new XmlRecursiveElementVisitor() {
      @Override
      public void visitXmlTag(XmlTag tag) {
        final String path = "link".equalsIgnoreCase(tag.getName()) ? getPathRelativeToPackageRoot(tag.getAttributeValue("href")) :
                            "script".equalsIgnoreCase(tag.getName()) ? getPathRelativeToPackageRoot(tag.getAttributeValue("src")) : null;
        if (!StringUtil.isEmptyOrSpaces(path)) {
View Full Code Here

    }
  }

  public static void processTemplates(final PsiFile psiFile, final Processor<XmlAttribute> processor) {
    if (psiFile instanceof XmlFile) {
      psiFile.accept(new XmlRecursiveElementVisitor() {
        @Override
        public void visitXmlTag(XmlTag tag) {
          if (HtmlUtil.isScriptTag(tag) && "text/ng-template".equals(tag.getAttributeValue("type"))) {
            final XmlAttribute id = tag.getAttribute("id");
            if (id != null) {
View Full Code Here

TOP

Related Classes of com.intellij.psi.XmlRecursiveElementVisitor

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.