Package com.sun.javadoc

Examples of com.sun.javadoc.SeeTag


                continue;
            }

            if (tag.name().equals("@link"))
            {
                SeeTag seeTag = (SeeTag) tag;

                String label = seeTag.label();
                if (label != null && !label.equals(""))
                {
                    builder.append(label);
                    continue;
                }

                if (seeTag.referencedClassName() != null)
                    builder.append(seeTag.referencedClassName());

                if (seeTag.referencedMemberName() != null)
                {
                    builder.append("#");
                    builder.append(seeTag.referencedMemberName());
                }
            }
        }

        String text = builder.toString();
View Full Code Here


                    continue;
                }

                if (tag.name().equals("@link"))
                {
                    SeeTag seeTag = (SeeTag) tag;

                    String label = seeTag.label();
                    if (label != null && !label.equals(""))
                    {
                        builder.append(label);
                        continue;
                    }

                    if (seeTag.referencedClassName() != null)
                        builder.append(seeTag.referencedClassName());

                    if (seeTag.referencedMemberName() != null)
                    {
                        builder.append("#");
                        builder.append(seeTag.referencedMemberName());
                    }

                    continue;
                }
            }
View Full Code Here

                    continue;
                }

                if (tag.name().equals("@link"))
                {
                    SeeTag seeTag = (SeeTag) tag;

                    String label = seeTag.label();
                    if (label != null && !label.equals(""))
                    {
                        builder.append(label);
                        continue;
                    }

                    if (seeTag.referencedClassName() != null)
                        builder.append(seeTag.referencedClassName());

                    if (seeTag.referencedMemberName() != null)
                    {
                        builder.append("#");
                        builder.append(seeTag.referencedMemberName());
                    }

                    continue;
                }
            }
View Full Code Here

                continue;
            }

            if (tag.name().equals("@link"))
            {
                SeeTag seeTag = (SeeTag) tag;

                String label = seeTag.label();
                if (label != null && !label.equals(""))
                {
                    builder.append(StringEscapeUtils.escapeHtml(label));
                    continue;
                }

                if (seeTag.referencedClassName() != null)
                    builder.append(StringEscapeUtils.escapeHtml(seeTag.referencedClassName()));

                if (seeTag.referencedMemberName() != null)
                {
                    builder.append("#");
                    builder.append(StringEscapeUtils.escapeHtml(seeTag.referencedMemberName()));
                }
            }
            else if (tag.name().equals("@code"))
            {
                builder.append("<code>");
View Full Code Here

     * @param tags the array of Tag to print
     */
    private void printInlineTags(Tag[] tags, ClassDoc classDoc) {
        for (int i = 0; i < tags.length; i++) {
            if ((tags[i] instanceof SeeTag) && tags[i].name().equals("@link")) {
              SeeTag seeTag = (SeeTag) tags[i];
              boolean sameClass = seeTag.referencedClass() == classDoc;
              String fullClassName = seeTag.referencedClassName();
              String memberName = seeTag.referencedMemberName();

              String className = fullClassName.substring(fullClassName.lastIndexOf('.') + 1);
              List<String> nameParts = new ArrayList<String>();
              if (!sameClass) {
                nameParts.add(className);
View Full Code Here

                continue;
            }

            if (tag.name().equals("@link"))
            {
                SeeTag seeTag = (SeeTag) tag;

                String label = seeTag.label();
                if (label != null && !label.equals(""))
                {
                    builder.append(label);
                    continue;
                }

                if (seeTag.referencedClassName() != null)
                    builder.append(seeTag.referencedClassName());

                if (seeTag.referencedMemberName() != null)
                {
                    builder.append("#");
                    builder.append(seeTag.referencedMemberName());
                }
            }
        }

        String text = builder.toString();
View Full Code Here

        // should do this, but it does not.
        StringBuffer documentation = new StringBuffer();
        Tag tag[] = programElementDoc.inlineTags();
        for (int i = 0; i < tag.length; i++) {
            if (tag[i] instanceof SeeTag) {
                SeeTag seeTag = (SeeTag) tag[i];
                documentation.append("<a href=\"");
                // The dot separated class or package name, if any.
                String classOrPackageName = null;
                boolean isIncluded = false;
                if (seeTag.referencedPackage() != null) {
                    classOrPackageName = seeTag.referencedPackage().toString();
                    isIncluded = seeTag.referencedPackage().isIncluded();
                }
                if (seeTag.referencedClass() != null) {
                    classOrPackageName = seeTag.referencedClass()
                            .qualifiedName();
                    isIncluded = seeTag.referencedClass().isIncluded();
                }

                // {@link ...} tags usually have a null label.
                String target = seeTag.label();
                if (target == null || target.length() == 0) {
                    target = seeTag.referencedMemberName();
                    if (target == null || target.length() == 0) {
                        target = seeTag.referencedClassName();
                    }
                }
                if (classOrPackageName != null) {
                    if (target != null && target.indexOf("(") != -1) {
                        // The target has a paren, so can't be a port or
                        // parameter, so link to the html instead of the .xml.

                        isIncluded = false;
                    }

                    // If the .xml file is not included in the output,
                    // then link to the .html file
                    documentation.append(_relativizePath(_outputDirectory,
                            classOrPackageName, programElementDoc, isIncluded));
                }
                if (seeTag.referencedMember() != null) {
                    documentation
                            .append("#" + seeTag.referencedMember().name());
                }
                documentation.append("\">" + target + "</a>");
            } else {
                documentation.append(tag[i].text());
            }
View Full Code Here

                    }
                    if ("@link".equals(inlineTag.name())) {
                        if (LOG.isLoggable(Level.FINE)) {
                            LOG.fine("Have link: " + print(inlineTag));
                        }
                        final SeeTag linkTag = (SeeTag) inlineTag;
                        return getSerializedLinkFromTag(linkTag);
                    } else if (!isEmpty(inlineTag.text())) {
                        return inlineTag.text();
                    }
                }
View Full Code Here

                continue;
            }

            if (tag.name().equals("@link"))
            {
                SeeTag seeTag = (SeeTag) tag;

                String label = seeTag.label();
                if (label != null && !label.equals(""))
                {
                    builder.append(label);
                    continue;
                }

                if (seeTag.referencedClassName() != null)
                    builder.append(seeTag.referencedClassName());

                if (seeTag.referencedMemberName() != null)
                {
                    builder.append("#");
                    builder.append(seeTag.referencedMemberName());
                }
            }
            else if (tag.name().equals("@code"))
            {
                builder.append("<code>");
View Full Code Here

    }

    private void renderSeeTag(PegdownDoclet doclet, StringBuilder tagBlock, PsiDocTag docTag) {
        final String seeText = toString(docTag, false);
        if ( seeText.startsWith("\"") ) {
            SeeTag tag = new SeeTag() {
                @Override
                public String label() {
                    return null;
                }
                @Override
View Full Code Here

TOP

Related Classes of com.sun.javadoc.SeeTag

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.