CompilationUnit newRoot= AST.parseCompilationUnit(getCompilationUnit(), true); newTypeDecl= newRoot.findDeclaringNode(fSenderBinding.getKey());
astRoot= AST.parseCompilationUnit(getCompilationUnit(), true); newTypeDecl= astRoot.findDeclaringNode(fSenderBinding.getKey());
	protected ASTRewrite getRewrite() throws CoreException {				CompilationUnit astRoot= ASTResolving.findParentCompilationUnit(fNode);		ASTNode typeDecl= astRoot.findDeclaringNode(fSenderBinding);		ASTNode newTypeDecl= null;		if (typeDecl != null) {			fIsInDifferentCU= false;			newTypeDecl= typeDecl;		} else {			fIsInDifferentCU= true;			CompilationUnit newRoot= AST.parseCompilationUnit(getCompilationUnit(), true);			newTypeDecl= newRoot.findDeclaringNode(fSenderBinding.getKey());		}		if (newTypeDecl != null) {			ASTRewrite rewrite= new ASTRewrite(newTypeDecl);						List members;			if (fSenderBinding.isAnonymous()) {				members= ((AnonymousClassDeclaration) newTypeDecl).bodyDeclarations();			} else {				members= ((TypeDeclaration) newTypeDecl).bodyDeclarations();			}			MethodDeclaration newStub= getStub(rewrite, newTypeDecl);						if (isConstructor()) {				members.add(findConstructorInsertIndex(members), newStub);			} else if (!fIsInDifferentCU) {				members.add(findMethodInsertIndex(members, fNode.getStartPosition()), newStub);			} else {				members.add(newStub);			}			rewrite.markAsInserted(newStub);			fSelectionDescription= new GroupDescription("sel"); //$NON-NLS-1$			GroupDescription link1= new GroupDescription("link1"); //$NON-NLS-1$			GroupDescription link2= new GroupDescription("link2"); //$NON-NLS-1$			GroupDescription link3= new GroupDescription("link3"); //$NON-NLS-1$			fLinkedPositions.add(link1);			fLinkedPositions.add(link2);			fLinkedPositions.add(link3);						rewrite.markAsTracked(newStub.getName(), link2); //$NON-NLS-1$\			if (!newStub.isConstructor()) {				rewrite.markAsTracked(newStub.getReturnType(), link1); //$NON-NLS-1$\			}					if (!fIsInDifferentCU) {				rewrite.markAsTracked(fNode, fSelectionDescription);				Name invocationName= getInvocationName();				if (invocationName != null) {					rewrite.markAsTracked(invocationName, link3); //$NON-NLS-1$\				}			}						return rewrite;		}		return null;	}