/** * Generate Javadoc for Interface. * * @param clazz * Classifier * @param ast * JDT AST tree * @param td * AbstractTypeDeclaration */ public void generateClassJavadoc(Classifier clazz, AST ast, AbstractTypeDeclaration td) { EList<Comment> comments = clazz.getOwnedComments(); for (Comment comment : comments) { Javadoc javadoc = ast.newJavadoc(); generateJavadoc(ast, comment, javadoc); td.setJavadoc(javadoc); } }
/** * Set source comment for this class. * * @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"); } }
String typeComment= CodeGeneration.getTypeComment(cu, typeName, delim); if (typeComment != null) typeDecl.setJavadoc((Javadoc) rewrite.createStringPlaceholder(typeComment, ASTNode.JAVADOC));
String typeComment= CodeGeneration.getTypeComment(cu, typeName, delim); if (typeComment != null) typeDecl.setJavadoc((Javadoc) rewrite.createStringPlaceholder(typeComment, ASTNode.JAVADOC));