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);
}