ASTRewrite rewriter= new ASTRewrite(root);
	public RefactoringStatus checkInput(IProgressMonitor pm) throws JavaModelException {		try {			RefactoringStatus result= new RefactoringStatus();			fChangeManager.clear();			pm.beginTask(NO_NAME, 11);			pm.setTaskName(RefactoringCoreMessages.getString("SelfEncapsulateField.checking_preconditions")); //$NON-NLS-1$			result.merge(checkMethodNames());			pm.worked(1);			if (result.hasFatalError())				return result;			pm.setTaskName(RefactoringCoreMessages.getString("SelfEncapsulateField.searching_for_cunits")); //$NON-NLS-1$			ICompilationUnit[] affectedCUs= RefactoringSearchEngine.findAffectedCompilationUnits(				new SubProgressMonitor(pm, 5), RefactoringScopeFactory.create(fField),				SearchEngine.createSearchPattern(fField, IJavaSearchConstants.REFERENCES));						result.merge(Checks.validateModifiesFiles(ResourceUtil.getFiles(affectedCUs)));			checkInHierarchy(result);			if (result.hasFatalError())				return result;							pm.setTaskName(RefactoringCoreMessages.getString("SelfEncapsulateField.analyzing"));	 //$NON-NLS-1$			IProgressMonitor sub= new SubProgressMonitor(pm, 5);			sub.beginTask(NO_NAME, affectedCUs.length);			IVariableBinding fieldIdentifier= fFieldDeclaration.resolveBinding();			ITypeBinding declaringClass= 				((TypeDeclaration)ASTNodes.getParent(fFieldDeclaration, TypeDeclaration.class)).resolveBinding();			ICompilationUnit owner= fField.getCompilationUnit();			for (int i= 0; i < affectedCUs.length; i++) {				ICompilationUnit unit= affectedCUs[i];				sub.subTask(unit.getElementName());				CompilationUnit root= null;				if (owner.equals(unit)) {					root= fRoot;				} else {					root= AST.parseCompilationUnit(unit, true);				}				checkCompileErrors(result, root, unit);				ASTRewrite rewriter= new ASTRewrite(root);				AccessAnalyzer analyzer= new AccessAnalyzer(this, unit, fieldIdentifier, declaringClass, rewriter);				root.accept(analyzer);				result.merge(analyzer.getStatus());				if (!fSetterMustReturnValue) 					fSetterMustReturnValue= analyzer.getSetterMustReturnValue();				if (result.hasFatalError()) {					fChangeManager.clear();					break;				}				List descriptions= new ArrayList(analyzer.getGroupDescriptions());				if (owner.equals(unit)) {					descriptions.addAll(addGetterSetterChanges(root, rewriter));				}				createEdits(unit, rewriter, descriptions);				sub.worked(1);			}			if (result.hasFatalError())				return result;			sub.done();			return result;		} catch (JavaModelException e){			throw e;		} catch (CoreException e) {			throw new JavaModelException(e);		}	}