}
try{
NullProgressMonitor monitor = new NullProgressMonitor();
Refactor refactor = createRefactoring(commandLine);
Refactoring refactoring = refactor.refactoring;
RefactoringStatus status = refactoring.checkAllConditions(
new SubProgressMonitor(monitor, 4));
int stopSeverity = RefactoringCore.getConditionCheckingFailedSeverity();
if (status.getSeverity() >= stopSeverity) {
throw new RefactorException(status);
}
Change change = refactoring.createChange(new SubProgressMonitor(monitor, 2));
change.initializeValidationData(new SubProgressMonitor(monitor, 1));
// preview
if (commandLine.hasOption(PREVIEW_OPTION)){
// preview a specific file