com.sun.source.doctree.LinkTree Java Examples

The following examples show how to use com.sun.source.doctree.LinkTree. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source Project: TencentKona-8   Author: Tencent   File: Checker.java    License: GNU General Public License v2.0 5 votes vote down vote up
@Override
public Void visitLink(LinkTree tree, Void ignore) {
    markEnclosingTag(Flag.HAS_INLINE_TAG);
    // simulate inline context on tag stack
    HtmlTag t = (tree.getKind() == DocTree.Kind.LINK)
            ? HtmlTag.CODE : HtmlTag.SPAN;
    tagStack.push(new TagStackItem(tree, t));
    try {
        return super.visitLink(tree, ignore);
    } finally {
        tagStack.pop();
    }
}
 
Example #2
Source Project: jdk8u60   Author: chenghanpeng   File: Checker.java    License: GNU General Public License v2.0 5 votes vote down vote up
@Override
public Void visitLink(LinkTree tree, Void ignore) {
    markEnclosingTag(Flag.HAS_INLINE_TAG);
    // simulate inline context on tag stack
    HtmlTag t = (tree.getKind() == DocTree.Kind.LINK)
            ? HtmlTag.CODE : HtmlTag.SPAN;
    tagStack.push(new TagStackItem(tree, t));
    try {
        return super.visitLink(tree, ignore);
    } finally {
        tagStack.pop();
    }
}
 
Example #3
Source Project: openjdk-jdk8u   Author: AdoptOpenJDK   File: Checker.java    License: GNU General Public License v2.0 5 votes vote down vote up
@Override
public Void visitLink(LinkTree tree, Void ignore) {
    markEnclosingTag(Flag.HAS_INLINE_TAG);
    // simulate inline context on tag stack
    HtmlTag t = (tree.getKind() == DocTree.Kind.LINK)
            ? HtmlTag.CODE : HtmlTag.SPAN;
    tagStack.push(new TagStackItem(tree, t));
    try {
        return super.visitLink(tree, ignore);
    } finally {
        tagStack.pop();
    }
}
 
Example #4
Source Project: netbeans   Author: apache   File: ImmutableDocTreeTranslator.java    License: Apache License 2.0 5 votes vote down vote up
protected final LinkTree rewriteChildren(LinkTree tree) {
    LinkTree value = tree;
    List<? extends DocTree> label = translateDoc(tree.getLabel());
    ReferenceTree ref = (ReferenceTree) translate(tree.getReference());
    if (label != tree.getLabel() || ref != tree.getReference()) {
        value = make.Link(ref, label);
    }
    return value;
}
 
Example #5
Source Project: netbeans   Author: apache   File: VeryPretty.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public Void visitLink(LinkTree node, Void p) {
    print("{");
    printTagName(node);
    print(" ");
    doAccept((DCTree)node.getReference());
    if (!node.getLabel().isEmpty()) {
        print(" ");
        for (DocTree docTree : node.getLabel()) {
            doAccept((DCTree)docTree);
        }
    }
    print("}");
    return null;
}
 
Example #6
Source Project: openjdk-jdk8u-backup   Author: AdoptOpenJDK   File: Checker.java    License: GNU General Public License v2.0 5 votes vote down vote up
@Override
public Void visitLink(LinkTree tree, Void ignore) {
    markEnclosingTag(Flag.HAS_INLINE_TAG);
    // simulate inline context on tag stack
    HtmlTag t = (tree.getKind() == DocTree.Kind.LINK)
            ? HtmlTag.CODE : HtmlTag.SPAN;
    tagStack.push(new TagStackItem(tree, t));
    try {
        return super.visitLink(tree, ignore);
    } finally {
        tagStack.pop();
    }
}
 
Example #7
Source Project: openjdk-jdk9   Author: AdoptOpenJDK   File: JavadocFormatter.java    License: GNU General Public License v2.0 5 votes vote down vote up
@Override @DefinedBy(Api.COMPILER_TREE)
public Object visitLink(LinkTree node, Object p) {
    if (!node.getLabel().isEmpty()) {
        scan(node.getLabel(), p);
    } else {
        result.append(node.getReference().getSignature());
    }
    return null;
}
 
Example #8
Source Project: openjdk-jdk9   Author: AdoptOpenJDK   File: Checker.java    License: GNU General Public License v2.0 5 votes vote down vote up
@Override @DefinedBy(Api.COMPILER_TREE)
public Void visitLink(LinkTree tree, Void ignore) {
    markEnclosingTag(Flag.HAS_INLINE_TAG);
    // simulate inline context on tag stack
    HtmlTag t = (tree.getKind() == DocTree.Kind.LINK)
            ? HtmlTag.CODE : HtmlTag.SPAN;
    tagStack.push(new TagStackItem(tree, t));
    try {
        return super.visitLink(tree, ignore);
    } finally {
        tagStack.pop();
    }
}
 
Example #9
Source Project: hottub   Author: dsrg-uoft   File: Checker.java    License: GNU General Public License v2.0 5 votes vote down vote up
@Override
public Void visitLink(LinkTree tree, Void ignore) {
    markEnclosingTag(Flag.HAS_INLINE_TAG);
    // simulate inline context on tag stack
    HtmlTag t = (tree.getKind() == DocTree.Kind.LINK)
            ? HtmlTag.CODE : HtmlTag.SPAN;
    tagStack.push(new TagStackItem(tree, t));
    try {
        return super.visitLink(tree, ignore);
    } finally {
        tagStack.pop();
    }
}
 
Example #10
Source Project: openjdk-8-source   Author: keerath   File: Checker.java    License: GNU General Public License v2.0 5 votes vote down vote up
@Override
public Void visitLink(LinkTree tree, Void ignore) {
    markEnclosingTag(Flag.HAS_INLINE_TAG);
    // simulate inline context on tag stack
    HtmlTag t = (tree.getKind() == DocTree.Kind.LINK)
            ? HtmlTag.CODE : HtmlTag.SPAN;
    tagStack.push(new TagStackItem(tree, t));
    try {
        return super.visitLink(tree, ignore);
    } finally {
        tagStack.pop();
    }
}
 
Example #11
Source Project: openjdk-8   Author: bpupadhyaya   File: Checker.java    License: GNU General Public License v2.0 5 votes vote down vote up
@Override
public Void visitLink(LinkTree tree, Void ignore) {
    markEnclosingTag(Flag.HAS_INLINE_TAG);
    // simulate inline context on tag stack
    HtmlTag t = (tree.getKind() == DocTree.Kind.LINK)
            ? HtmlTag.CODE : HtmlTag.SPAN;
    tagStack.push(new TagStackItem(tree, t));
    try {
        return super.visitLink(tree, ignore);
    } finally {
        tagStack.pop();
    }
}
 
Example #12
Source Project: j2objc   Author: google   File: JavadocConverter.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public Void visitLink(LinkTree node, TagElement tag) {
  TagElement newTag = new TagElement().setTagKind(TagKind.parse("@" + node.getTagName()));
  setPos(node, newTag);
  if (node.getLabel().isEmpty()) {
    scan(node.getReference(), newTag);
  } else {
    scan(node.getLabel(), newTag);
  }
  tag.addFragment(newTag);
  return null;
}
 
Example #13
Source Project: TencentKona-8   Author: Tencent   File: ReferenceTest.java    License: GNU General Public License v2.0 4 votes vote down vote up
@Override
public Void visitLink(LinkTree tree, Void ignore) {
    checkReference(tree.getReference(), tree.getLabel());
    return null;
}
 
Example #14
Source Project: jdk8u60   Author: chenghanpeng   File: ReferenceTest.java    License: GNU General Public License v2.0 4 votes vote down vote up
@Override
public Void visitLink(LinkTree tree, Void ignore) {
    checkReference(tree.getReference(), tree.getLabel());
    return null;
}
 
Example #15
Source Project: openjdk-jdk8u   Author: AdoptOpenJDK   File: ReferenceTest.java    License: GNU General Public License v2.0 4 votes vote down vote up
@Override
public Void visitLink(LinkTree tree, Void ignore) {
    checkReference(tree.getReference(), tree.getLabel());
    return null;
}
 
Example #16
Source Project: netbeans   Author: apache   File: ImmutableDocTreeTranslator.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public DocTree visitLink(LinkTree tree, Object p) {
    return rewriteChildren(tree);
}
 
Example #17
Source Project: netbeans   Author: apache   File: TreeFactory.java    License: Apache License 2.0 4 votes vote down vote up
public LinkTree Link(ReferenceTree ref, List<? extends DocTree> label) {
    return docMake.at(NOPOS).newLinkTree(ref, label);
}
 
Example #18
Source Project: netbeans   Author: apache   File: TreeFactory.java    License: Apache License 2.0 4 votes vote down vote up
public LinkTree LinkPlain(ReferenceTree ref, List<? extends DocTree> label) {
    return docMake.at(NOPOS).newLinkPlainTree(ref, label);
}
 
Example #19
Source Project: netbeans   Author: apache   File: RefactoringVisitor.java    License: Apache License 2.0 4 votes vote down vote up
/**
 * @since 1.47
 */
@Override
public DocTree visitLink(LinkTree node, Element p) {
    return docScanner.visitLink(node, p, null);
}
 
Example #20
Source Project: netbeans   Author: apache   File: RefactoringVisitor.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public DocTree visitLink(LinkTree node, Element p) {
    return instance.visitLink(node, p);
}
 
Example #21
Source Project: netbeans   Author: apache   File: RefactoringVisitor.java    License: Apache License 2.0 4 votes vote down vote up
public DocTree visitLink(LinkTree node, Element p, Void ignore) {
    return super.visitLink(node, p);
}
 
Example #22
Source Project: netbeans   Author: apache   File: Analyzer.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public Void visitLink(LinkTree node, List<ErrorDescription> errors) {
    return super.visitLink(node, errors);
}
 
Example #23
Source Project: openjdk-jdk8u-backup   Author: AdoptOpenJDK   File: ReferenceTest.java    License: GNU General Public License v2.0 4 votes vote down vote up
@Override
public Void visitLink(LinkTree tree, Void ignore) {
    checkReference(tree.getReference(), tree.getLabel());
    return null;
}
 
Example #24
Source Project: openjdk-jdk9   Author: AdoptOpenJDK   File: ReferenceTest.java    License: GNU General Public License v2.0 4 votes vote down vote up
@Override
public Void visitLink(LinkTree tree, Void ignore) {
    checkReference(tree.getReference(), tree.getLabel());
    return null;
}
 
Example #25
Source Project: hottub   Author: dsrg-uoft   File: ReferenceTest.java    License: GNU General Public License v2.0 4 votes vote down vote up
@Override
public Void visitLink(LinkTree tree, Void ignore) {
    checkReference(tree.getReference(), tree.getLabel());
    return null;
}
 
Example #26
Source Project: openjdk-8-source   Author: keerath   File: ReferenceTest.java    License: GNU General Public License v2.0 4 votes vote down vote up
@Override
public Void visitLink(LinkTree tree, Void ignore) {
    checkReference(tree.getReference(), tree.getLabel());
    return null;
}
 
Example #27
Source Project: openjdk-8   Author: bpupadhyaya   File: ReferenceTest.java    License: GNU General Public License v2.0 4 votes vote down vote up
@Override
public Void visitLink(LinkTree tree, Void ignore) {
    checkReference(tree.getReference(), tree.getLabel());
    return null;
}
 
Example #28
Source Project: lua-for-android   Author: qtiuto   File: DocTreeFactory.java    License: BSD 3-Clause "New" or "Revised" License 2 votes vote down vote up
/**
 * Create a new {@code LinkTree} object, to represent a {@code {@link } } tag.
 * @param ref the API element being referenced
 * @param label an optional label for the link
 * @return a {@code LinkTree} object
 */
LinkTree newLinkTree(ReferenceTree ref, List<? extends DocTree> label);
 
Example #29
Source Project: lua-for-android   Author: qtiuto   File: DocTreeFactory.java    License: BSD 3-Clause "New" or "Revised" License 2 votes vote down vote up
/**
 * Create a new {@code LinkPlainTree} object, to represent a {@code {@linkplain } } tag.
 * @param ref the API element being referenced
 * @param label an optional label for the link
 * @return a {@code LinkPlainTree} object
 */
LinkTree newLinkPlainTree(ReferenceTree ref, List<? extends DocTree> label);
 
Example #30
Source Project: netbeans   Author: apache   File: TreeMaker.java    License: Apache License 2.0 2 votes vote down vote up
/**Creates the DocTree's LinkTree.
 * 
 * @param ref the reference linked by the {@code @link}
 * @param label the optional description of the reference
 * @return newly created LinkTree
 * @since 0.124
 */
public LinkTree Link(ReferenceTree ref, List<? extends DocTree> label) {
    return delegate.Link(ref, label);
}