public void rewriteAST(CompilationUnitRewrite cuRewrite, List textEditGroups) throws CoreException { rewriteAST(cuRewrite, textEditGroups, new ArrayList());
public void rewriteAST(CompilationUnitRewrite cuRewrite, List textEditGroups, LinkedProposalModel positionGroups) throws CoreException { final ASTRewrite rewrite= cuRewrite.getASTRewrite(); VariableDeclarationFragment fragment= null; for (int i= 0; i < fNodes.length; i++) { final ASTNode node= fNodes[i];  final AST ast= node.getAST();  fragment= ast.newVariableDeclarationFragment(); fragment.setName(ast.newSimpleName(NAME_FIELD));  final FieldDeclaration declaration= ast.newFieldDeclaration(fragment); declaration.setType(ast.newPrimitiveType(PrimitiveType.LONG)); declaration.modifiers().addAll(ASTNodeFactory.newModifiers(ast, Modifier.PRIVATE | Modifier.STATIC | Modifier.FINAL));  if (!addInitializer(fragment, node)) continue;  if (fragment.getInitializer() != null) {  final TextEditGroup editGroup= createTextEditGroup(FixMessages.SerialVersion_group_description); textEditGroups.add(editGroup);  if (node instanceof AbstractTypeDeclaration) rewrite.getListRewrite(node, ((AbstractTypeDeclaration) node).getBodyDeclarationsProperty()).insertAt(declaration, 0, editGroup); else if (node instanceof AnonymousClassDeclaration) rewrite.getListRewrite(node, AnonymousClassDeclaration.BODY_DECLARATIONS_PROPERTY).insertAt(declaration, 0, editGroup); else if (node instanceof ParameterizedType) { final ParameterizedType type= (ParameterizedType) node; final ASTNode parent= type.getParent(); if (parent instanceof ClassInstanceCreation) { final ClassInstanceCreation creation= (ClassInstanceCreation) parent; final AnonymousClassDeclaration anonymous= creation.getAnonymousClassDeclaration(); if (anonymous != null) rewrite.getListRewrite(anonymous, AnonymousClassDeclaration.BODY_DECLARATIONS_PROPERTY).insertAt(declaration, 0, editGroup); } } else Assert.isTrue(false);  addLinkedPositions(rewrite, fragment, positionGroups); }  final String comment= CodeGeneration.getFieldComment(fUnit, declaration.getType().toString(), NAME_FIELD, StubUtility.getLineDelimiterUsed(fUnit)); if (comment != null && comment.length() > 0) { final Javadoc doc= (Javadoc) rewrite.createStringPlaceholder(comment, ASTNode.JAVADOC); declaration.setJavadoc(doc); } } if (fragment == null) return;  positionGroups.setEndPosition(rewrite.track(fragment));
	public void rewriteAST(CompilationUnitRewrite cuRewrite, List textEditGroups) throws CoreException {		rewriteAST(cuRewrite, textEditGroups, new ArrayList());	}