Examples of Javadoc


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

                .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

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

    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

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

            // 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

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

           
            // 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

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

           
            // 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

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

    // 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

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

     *
     *  @param node The AST node.
     *  @return Whether its children should be further visited.
     */
    public boolean visit(TypeDeclaration node) {
        Javadoc javadoc = node.getJavadoc();

        if (javadoc != null) {
            javadoc.accept(this);
        }

        _output(_indent);

        _outputModifiers(node.modifiers());
View Full Code Here

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

            annotationCollection.add(newAnnotation);
          }
        }

        // Get the javadoc.
        final Javadoc originalJavadoc = originalFieldDeclaration
            .getJavadoc();
        final Javadoc newJavadoc = (Javadoc) ASTNode.copySubtree(ast,
            originalJavadoc);

        final EnumConstantDeclaration constDecl = createNewEnumConstantDeclarataion(
            ast, ast.newSimpleName(constantField.getElementName()),
            newJavadoc, annotationCollection);
View Full Code Here

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

            returnType = methodDeclaration.getReturnType2();
            methodDeclaration.setReturnType2(ast.newPrimitiveType(PrimitiveType.VOID));
          }
          // process JavaDoc
          {
            Javadoc javadoc = methodDeclaration.getJavadoc();
            if (javadoc != null) {
              List<TagElement> tags = DomGenerics.tags(javadoc);
              for (Iterator<TagElement> tagIter = tags.iterator(); tagIter.hasNext();) {
                TagElement tag = tagIter.next();
                if ("@gwt.typeArgs".equals(tag.getTagName())) {
View Full Code Here

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

  private static void removeAnnotations(TypeDeclaration serviceType,
      String source,
      MultiTextEdit edits) {
    int typePos = serviceType.getStartPosition();
    {
      Javadoc javadoc = serviceType.getJavadoc();
      if (javadoc != null) {
        typePos = javadoc.getStartPosition() + javadoc.getLength();
        while (Character.isWhitespace(source.charAt(typePos))) {
          typePos++;
        }
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.