}
private void updateNormalAnnotation(
ICompilationUnit compilationUnit, SingleVariableDeclaration declaration,
Map<String, Object> memberValues) throws JavaModelException, MalformedTreeException, BadLocationException {
NormalAnnotation normalAnnotation =
annotation(declaration, NormalAnnotation.class);
if (normalAnnotation == null) {
return;
}
String source = compilationUnit.getBuffer().getContents();
Document document= new Document(source);
ASTParser parser = ASTParser.newParser(AST.JLS3);
parser.setSource(compilationUnit);
AST ast = normalAnnotation.getAST();
ASTRewrite rewrite = ASTRewrite.create(ast);
maintainValuesProperty(normalAnnotation, memberValues, ast, rewrite);