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 File: JavadocConverter.java    From j2objc with 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 #2
Source File: Checker.java    From openjdk-jdk8u-backup with 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 File: Checker.java    From TencentKona-8 with 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 File: JavadocFormatter.java    From openjdk-jdk9 with 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 #5
Source File: Checker.java    From openjdk-jdk9 with 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 #6
Source File: Checker.java    From hottub with 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 File: VeryPretty.java    From netbeans with 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 #8
Source File: ImmutableDocTreeTranslator.java    From netbeans with 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 #9
Source File: Checker.java    From openjdk-8-source with 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 File: Checker.java    From openjdk-8 with 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 File: Checker.java    From openjdk-jdk8u with 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 File: Checker.java    From jdk8u60 with 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 #13
Source File: ReferenceTest.java    From hottub with 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 File: ReferenceTest.java    From openjdk-8-source with 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 File: ReferenceTest.java    From openjdk-jdk9 with 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 File: ReferenceTest.java    From openjdk-8 with 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 #17
Source File: ReferenceTest.java    From openjdk-jdk8u-backup with 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 #18
Source File: RefactoringVisitor.java    From netbeans with Apache License 2.0 4 votes vote down vote up
@Override
public DocTree visitLink(LinkTree node, Element p) {
    return instance.visitLink(node, p);
}
 
Example #19
Source File: Analyzer.java    From netbeans with 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 #20
Source File: RefactoringVisitor.java    From netbeans with 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 #21
Source File: RefactoringVisitor.java    From netbeans with 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 #22
Source File: TreeFactory.java    From netbeans with 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 #23
Source File: TreeFactory.java    From netbeans with 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 #24
Source File: ImmutableDocTreeTranslator.java    From netbeans with Apache License 2.0 4 votes vote down vote up
@Override
public DocTree visitLink(LinkTree tree, Object p) {
    return rewriteChildren(tree);
}
 
Example #25
Source File: ReferenceTest.java    From openjdk-jdk8u with 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 File: ReferenceTest.java    From jdk8u60 with 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 File: ReferenceTest.java    From TencentKona-8 with 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 File: TreeMaker.java    From netbeans with Apache License 2.0 2 votes vote down vote up
/**Creates the DocTree's LinkTree for {@code @linkplain}.
 * 
 * @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 LinkPlain(ReferenceTree ref, List<? extends DocTree> label) {
    return delegate.LinkPlain(ref, label);
}
 
Example #29
Source File: DocTreeFactory.java    From openjdk-jdk9 with GNU General Public License v2.0 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 #30
Source File: DocTreeFactory.java    From openjdk-jdk9 with GNU General Public License v2.0 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);