Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-dev] how to replace the Javadoc in MethodDeclaration?

we know that from MethodDeclaration m,we can get Javadoc d = m.getJavadoc();now I construct a new javadoc,so i want to replace the old

public void replaceJavadoc(ICompilationUnit unit,Javadoc newDoc) {
  // can't use m.setJavadoc(newDoc) although it indeed have this method
}

it's easy to get MethodDeclaration from ICompilationUnit,also we can get CompilationUnit,ASTRewrite,but i can't figure out how to implement this


Back to the top