if (selectedExpression.getParent() instanceof ExpressionStatement) return RefactoringStatus.createFatalErrorStatus(RefactoringCoreMessages.getString("ExtractTempRefactoring.statements")); pm.worked(1);
	private RefactoringStatus checkSelection(IProgressMonitor pm) throws JavaModelException {		try{			pm.beginTask("", 9); //$NON-NLS-1$				Expression selectedExpression= getSelectedExpression();						if (selectedExpression == null){				String message= RefactoringCoreMessages.getString("ExtractTempRefactoring.select_expression");//$NON-NLS-1$				return CodeRefactoringUtil.checkMethodSyntaxErrors(fSelectionStart, fSelectionLength, fCompilationUnitNode, fCu, message);			}				pm.worked(1);						if (selectedExpression.getStartPosition() != fSelectionStart){ 				int length= selectedExpression.getStartPosition() - fSelectionStart;				if (length >= 0 && ! "".equals(fCu.getBuffer().getText(fSelectionStart, length).trim())) //$NON-NLS-1$					return RefactoringStatus.createFatalErrorStatus(RefactoringCoreMessages.getString("ExtractTempRefactoring.begining")); //$NON-NLS-1$			}			pm.worked(1);						if (isUsedInExplicitConstructorCall())				return RefactoringStatus.createFatalErrorStatus(RefactoringCoreMessages.getString("ExtractTempRefactoring.explicit_constructor")); //$NON-NLS-1$			pm.worked(1);										if (getSelectedMethodNode() == null)				return RefactoringStatus.createFatalErrorStatus(RefactoringCoreMessages.getString("ExtractTempRefactoring.expression_in_method"));			 //$NON-NLS-1$			pm.worked(1);										if (selectedExpression.getParent() instanceof ExpressionStatement)				return RefactoringStatus.createFatalErrorStatus(RefactoringCoreMessages.getString("ExtractTempRefactoring.statements")); //$NON-NLS-1$			pm.worked(1);										if (selectedExpression instanceof Name && selectedExpression.getParent() instanceof ClassInstanceCreation)				return RefactoringStatus.createFatalErrorStatus(RefactoringCoreMessages.getString("ExtractTempRefactoring.name_in_new")); //$NON-NLS-1$			pm.worked(1);										RefactoringStatus result= new RefactoringStatus();			result.merge(checkExpression());			if (result.hasFatalError())				return result;			pm.worked(1);						result.merge(checkExpressionBinding());							if (result.hasFatalError())				return result;							pm.worked(1);						return result;		} finally{			pm.done();		}			}