private String generateMethodDeclaration(final IDocument document, final Document recoveredDocument,
final ASTNode node, final ASTRewrite rewrite, final CodeGenerationSettings settings,
final MethodDeclaration stub) throws BadLocationException
{
ChildListPropertyDescriptor descriptor = getPropDescriptor(node);
ListRewrite rewriter = rewrite.getListRewrite(node, descriptor);
rewriter.insertFirst(stub, null);
ITrackedNodePosition position = rewrite.track(stub);
rewrite.rewriteAST(recoveredDocument, fJavaProject.getOptions(true)).apply(recoveredDocument);