new GroupDescription("Update Import statements", new TextEdit[] {importer}));
new GroupDescription(RefactoringCoreMessages.getString("InlineMethodRefactoring.edit.import"), new TextEdit[] {importer}));
	public RefactoringStatus checkInput(IProgressMonitor pm) throws JavaModelException {		pm.beginTask("", 2); //$NON-NLS-1$		fChangeManager= new TextChangeManager();		RefactoringStatus result= new RefactoringStatus();		fSourceProvider.initialize();		fTargetProvider.initialize();		InvocationAnalyzer invocationAnalyzer= new InvocationAnalyzer(fSourceProvider);		ICompilationUnit[] units= fTargetProvider.getAffectedCompilationUnits(new SubProgressMonitor(pm, 1));		result.merge(Checks.validateModifiesFiles(getFilesToBeModified(units)));		if (result.hasFatalError())			return result;		IProgressMonitor sub= new SubProgressMonitor(pm, 1);		sub.beginTask("", units.length * 3); //$NON-NLS-1$		for (int c= 0; c < units.length; c++) {			ICompilationUnit unit= units[c];			sub.subTask(RefactoringCoreMessages.getFormattedString("InlineMethodRefactoring.processing",  unit.getElementName())); //$NON-NLS-1$			CallInliner inliner= null;			try {				boolean added= false;				MultiTextEdit root= new MultiTextEdit();				CompilationUnitChange change= (CompilationUnitChange)fChangeManager.get(unit);				change.setSave(fSaveChanges);				change.setEdit(root);				inliner= new CallInliner(unit, fSourceProvider, fCodeGenerationSettings);				BodyDeclaration[] bodies= fTargetProvider.getAffectedBodyDeclarations(unit, new SubProgressMonitor(pm, 1));				for (int b= 0; b < bodies.length; b++) {					BodyDeclaration body= bodies[b];					inliner.initialize(body);					ASTNode[] invocations= fTargetProvider.getInvocations(body, new SubProgressMonitor(pm, 1));					for (int i= 0; i < invocations.length; i++) {						ASTNode invocation= invocations[i];						result.merge(inliner.initialize(invocation));						if (result.hasFatalError())							break;						RefactoringStatus targetStatus= invocationAnalyzer.perform(unit, invocation, inliner.getTargetNode(), fTargetProvider.getStatusSeverity());						result.merge(targetStatus);						if (result.hasFatalError())							break;						if (result.getSeverity() < fTargetProvider.getStatusSeverity()) {							added= true;							TextEdit edit= inliner.perform();							change.addGroupDescription( 								new GroupDescription(RefactoringCoreMessages.getString("InlineMethodRefactoring.edit.inline"), new TextEdit[] { edit })); //$NON-NLS-1$							root.add(edit);						} else {							fDeleteSource= false;						}					}				}				if (!added) {					fChangeManager.remove(unit);				} else {					ImportEdit importer= inliner.getImportEdit();					if (!importer.isEmpty()) {						root.add(importer);						change.addGroupDescription(							new GroupDescription("Update Import statements", new TextEdit[] {importer}));					}				}			} catch (CoreException e) {				throw new JavaModelException(e);			} finally {				if (inliner != null)					inliner.dispose();			}			sub.worked(1);		}		sub.done();		pm.done();		return result;	}