Package org.eclipse.jdt.core.dom

Examples of org.eclipse.jdt.core.dom.Javadoc


        });
    }
   
    @SuppressWarnings("unchecked")
    protected boolean isDeprecated(MethodDeclaration method) {
        Javadoc doc = method.getJavadoc();
        if (doc != null) {
            Iterator<TagElement> elements = doc.tags().iterator();
            while (elements.hasNext()) {
                TagElement element = elements.next();
                if (element.getTagName() != null && element.getTagName().equals(TagElement.TAG_DEPRECATED)) {
                    return true;
                }
View Full Code Here


     *
     * @param text comment text
     */
    public void addSourceComment(String text) {
        if (m_class instanceof AbstractTypeDeclaration) {
            Javadoc javadoc = getAST().newJavadoc();
            TextElement element = getAST().newTextElement();
            element.setText(text);
            TagElement tag = getAST().newTagElement();
            tag.fragments().add(element);
            javadoc.tags().add(tag);
            ((AbstractTypeDeclaration)m_class).setJavadoc(javadoc);
        } else {
            throw new IllegalStateException("Internal error - cannot add JavaDoc to non-class type");
        }
    }
View Full Code Here

     * @param doc documentation text, or <code>null</code> if none
     * @param decl
     */
    public void addJavaDoc(String doc, BodyDeclaration decl) {
        if (doc != null) {
            Javadoc javadoc = getAST().newJavadoc();
            TextElement element = getAST().newTextElement();
            element.setText(doc);
            TagElement tag = getAST().newTagElement();
            tag.fragments().add(element);
            javadoc.tags().add(tag);
            decl.setJavadoc(javadoc);
        }
    }
View Full Code Here

            TextElement element = ast.newTextElement();
            element.setText(text);
            TagElement tag = ast.newTagElement();
            tag.setTagName(name);
            tag.fragments().add(element);
            Javadoc javadoc = m_declaration.getJavadoc();
            if (javadoc == null) {
                javadoc = ast.newJavadoc();
                m_declaration.setJavadoc(javadoc);
            }
            javadoc.tags().add(tag);
        }
    }
View Full Code Here

                .newPackageDeclaration();
            packageDeclaration.setName(ast.newSimpleName(pkg
                .getElementName()));
            unit.setPackage(packageDeclaration);
            TypeDeclaration type = ast.newTypeDeclaration();
            Javadoc comment = ast.newJavadoc();
            TagElement tag = ast.newTagElement();
            TextElement text = ast.newTextElement();
            text.setText("Generated class for method "
                + methodDec.getName());
            tag.fragments().add(text);
            comment.tags().add(tag);
            type.setJavadoc(comment);
            type.setInterface(false);
            type.modifiers()
                .add(ast.newModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD));
            type.setName(ast.newSimpleName(className));
View Full Code Here

    if (defaultPackage) {
      // remove existing package statement
      PackageDeclaration pkg = astCU.getPackage();
      if (pkg != null) {
        int pkgStart;
        Javadoc javadoc = pkg.getJavadoc();
        if (javadoc != null) {
          pkgStart = javadoc.getStartPosition() + javadoc.getLength() + 1;
        } else {
          pkgStart = pkg.getStartPosition();
        }
        int extendedStart = astCU.getExtendedStartPosition(pkg);
        if (pkgStart != extendedStart) {
View Full Code Here

            // Remove throws
            aMethod.thrownExceptions().clear();

            // Remove @gwt tags
            Javadoc jdoc = aMethod.getJavadoc();
            if (jdoc != null) {
              List tags = jdoc.tags();
              List tagsToRemove = new ArrayList();
              for (Iterator itTags = tags.iterator(); itTags.hasNext();) {
                TagElement tag = (TagElement) itTags.next();
                if (tag.toString().contains("@gwt")) {
                  tagsToRemove.add(tag);
View Full Code Here

           
            // Remove throws
            aMethod.thrownExceptions().clear();
           
            // Remove @gwt tags
                        Javadoc jdoc = aMethod.getJavadoc();
                        if(jdoc != null) {
                          List tags =  jdoc.tags();
                          List tagsToRemove = new ArrayList();
                          for(Iterator itTags = tags.iterator(); itTags.hasNext();) {
                              TagElement tag = (TagElement) itTags.next();
                              if (tag.toString().contains("@gwt")) {
                                  tagsToRemove.add(tag);
View Full Code Here

           
            // Remove throws
            aMethod.thrownExceptions().clear();
           
            // Remove @gwt tags
                        Javadoc jdoc = aMethod.getJavadoc();
                        if(jdoc != null) {
                          List tags =  jdoc.tags();
                          List tagsToRemove = new ArrayList();
                          for(Iterator itTags = tags.iterator(); itTags.hasNext();) {
                              TagElement tag = (TagElement) itTags.next();
                              if (tag.toString().contains("@gwt")) {
                                  tagsToRemove.add(tag);
View Full Code Here

    // Remove throws
    aMethod.thrownExceptions().clear();

    // Remove @gwt tags
    Javadoc jdoc = aMethod.getJavadoc();
    if (jdoc != null) {
      List tags = jdoc.tags();
      List tagsToRemove = new ArrayList();
      for (Iterator itTags = tags.iterator(); itTags.hasNext();) {
        TagElement tag = (TagElement) itTags.next();
        if (tag.toString().contains("@gwt")) {
          tagsToRemove.add(tag);
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.core.dom.Javadoc

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.