com.sun.source.doctree.UnknownInlineTagTree Java Examples

The following examples show how to use com.sun.source.doctree.UnknownInlineTagTree. 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: Taglet.java    From sis with Apache License 2.0 5 votes vote down vote up
/**
 * Returns the text contained in the given inline tag.
 */
static String text(final DocTree tag) {
    for (final DocTree node : ((UnknownInlineTagTree) tag).getContent()) {
        if (node.getKind() == DocTree.Kind.TEXT) {
            return ((TextTree) node).getBody().trim();
        }
    }
    return "";
}
 
Example #2
Source File: ImmutableDocTreeTranslator.java    From netbeans with Apache License 2.0 5 votes vote down vote up
protected final UnknownInlineTagTree rewriteChildren(UnknownInlineTagTree tree) {
    UnknownInlineTagTree value = tree;
    List<? extends DocTree> content = translateDoc(tree.getContent());
    if (content != tree.getContent()) {
        value = make.UnknownInlineTag(((DCTree.DCUnknownInlineTag) tree).name, tree.getContent());
    }
    return value;
}
 
Example #3
Source File: VeryPretty.java    From netbeans with Apache License 2.0 5 votes vote down vote up
@Override
public Void visitUnknownInlineTag(UnknownInlineTagTree node, Void p) {
    print("{");
    print("@");
    print(node.getTagName());
    print(" ");
    for (DocTree docTree : node.getContent()) {
        doAccept((DCTree)docTree);
    }
    print("}");
    return null;
}
 
Example #4
Source File: ExtLink.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public String toString(List<? extends DocTree> tags, Element elem) {

    if (tags.isEmpty())
        return "";

    DocTree tag = tags.get(0);
    if (tag.getKind() != UNKNOWN_INLINE_TAG)
        return "";

    UnknownInlineTagTree uitree = (UnknownInlineTagTree) tag;
    if (uitree.getContent().isEmpty())
        return "";

    String tagText = uitree.getContent().get(0).toString();
    Matcher m = TAG_PATTERN.matcher(tagText);
    if (!m.find())
        return "";

    StringBuilder sb = new StringBuilder("<a href=\"");
    sb.append(URL)
      .append(m.group("name"))
      .append("\">")
      .append(m.group("desc"))
      .append("</a>");

    return sb.toString();
}
 
Example #5
Source File: RefactoringVisitor.java    From netbeans with Apache License 2.0 4 votes vote down vote up
@Override
public DocTree visitUnknownInlineTag(UnknownInlineTagTree node, Element p) {
    return instance.visitUnknownInlineTag(node, p);
}
 
Example #6
Source File: Checker.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public Void visitUnknownInlineTag(UnknownInlineTagTree tree, Void ignore) {
    checkUnknownTag(tree, tree.getTagName());
    return super.visitUnknownInlineTag(tree, ignore);
}
 
Example #7
Source File: Checker.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
@Override
public Void visitUnknownInlineTag(UnknownInlineTagTree tree, Void ignore) {
    checkUnknownTag(tree, tree.getTagName());
    return super.visitUnknownInlineTag(tree, ignore);
}
 
Example #8
Source File: Checker.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
@Override
public Void visitUnknownInlineTag(UnknownInlineTagTree tree, Void ignore) {
    checkUnknownTag(tree, tree.getTagName());
    return super.visitUnknownInlineTag(tree, ignore);
}
 
Example #9
Source File: Checker.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
@Override @DefinedBy(Api.COMPILER_TREE)
public Void visitUnknownInlineTag(UnknownInlineTagTree tree, Void ignore) {
    checkUnknownTag(tree, tree.getTagName());
    return super.visitUnknownInlineTag(tree, ignore);
}
 
Example #10
Source File: Checker.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
@Override
public Void visitUnknownInlineTag(UnknownInlineTagTree tree, Void ignore) {
    checkUnknownTag(tree, tree.getTagName());
    return super.visitUnknownInlineTag(tree, ignore);
}
 
Example #11
Source File: Analyzer.java    From netbeans with Apache License 2.0 4 votes vote down vote up
@Override
public Void visitUnknownInlineTag(UnknownInlineTagTree node, List<ErrorDescription> errors) {
    return super.visitUnknownInlineTag(node, errors);
}
 
Example #12
Source File: RefactoringVisitor.java    From netbeans with Apache License 2.0 4 votes vote down vote up
public DocTree visitUnknownInlineTag(UnknownInlineTagTree node, Element p, Void ignore) {
    return super.visitUnknownInlineTag(node, p);
}
 
Example #13
Source File: Checker.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public Void visitUnknownInlineTag(UnknownInlineTagTree tree, Void ignore) {
    checkUnknownTag(tree, tree.getTagName());
    return super.visitUnknownInlineTag(tree, ignore);
}
 
Example #14
Source File: RefactoringVisitor.java    From netbeans with Apache License 2.0 4 votes vote down vote up
/**
 * @since 1.47
 */
@Override
public DocTree visitUnknownInlineTag(UnknownInlineTagTree node, Element p) {
    return docScanner.visitUnknownInlineTag(node, p, null);
}
 
Example #15
Source File: TreeFactory.java    From netbeans with Apache License 2.0 4 votes vote down vote up
public UnknownInlineTagTree UnknownInlineTag(CharSequence name, List<? extends DocTree> content) {
    return docMake.at(NOPOS).newUnknownInlineTagTree(names.fromString(name.toString()), content);
}
 
Example #16
Source File: ImmutableDocTreeTranslator.java    From netbeans with Apache License 2.0 4 votes vote down vote up
@Override
public DocTree visitUnknownInlineTag(UnknownInlineTagTree tree, Object p) {
    return rewriteChildren(tree);
}
 
Example #17
Source File: Checker.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
@Override
public Void visitUnknownInlineTag(UnknownInlineTagTree tree, Void ignore) {
    checkUnknownTag(tree, tree.getTagName());
    return super.visitUnknownInlineTag(tree, ignore);
}
 
Example #18
Source File: Checker.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public Void visitUnknownInlineTag(UnknownInlineTagTree tree, Void ignore) {
    checkUnknownTag(tree, tree.getTagName());
    return super.visitUnknownInlineTag(tree, ignore);
}
 
Example #19
Source File: DocTreeFactory.java    From openjdk-jdk9 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Create a new {@code UnknownInlineTagTree} object, to represent an unrecognized inline tag.
 * @param name the name of the inline tag
 * @param content the content
 * @return an {@code UnknownInlineTagTree} object
 */
UnknownInlineTagTree newUnknownInlineTagTree(Name name, List<? extends DocTree> content);
 
Example #20
Source File: TreeMaker.java    From netbeans with Apache License 2.0 2 votes vote down vote up
/**Creates the DocTree's UnknownInlineTagTree.
 * 
 * @param name the tag's name
 * @param content the tag's content
 * @return newly created UnknownInlineTagTree
 * @since 0.124
 */
public UnknownInlineTagTree UnknownInlineTag(CharSequence name, List<? extends DocTree> content) {
    return delegate.UnknownInlineTag(name, content);
}
 
Example #21
Source File: DocTreeFactory.java    From lua-for-android with BSD 3-Clause "New" or "Revised" License 2 votes vote down vote up
/**
 * Create a new {@code UnknownInlineTagTree} object, to represent an unrecognized inline tag.
 * @param name the name of the inline tag
 * @param content the content
 * @return an {@code UnknownInlineTagTree} object
 */
UnknownInlineTagTree newUnknownInlineTagTree(Name name, List<? extends DocTree> content);