ASTParser p= ASTParser.newParser(AST.JLS3); p.setSource(newCuSource.toCharArray()); p.setUnitName(fCu.getElementName()); p.setProject(fCu.getJavaProject()); p.setCompilerOptions(RefactoringASTParser.getCompilerOptions(fCu)); CompilationUnit newCUNode= (CompilationUnit) p.createAST(null);
CompilationUnit newCUNode= new RefactoringASTParser(AST.JLS3).parse(newCuSource, fCu, true, null);
	private void checkNewSource(TextChange change, RefactoringStatus result) throws CoreException {		String newCuSource= change.getPreviewContent(new NullProgressMonitor());		ASTParser p= ASTParser.newParser(AST.JLS3);		p.setSource(newCuSource.toCharArray());		p.setUnitName(fCu.getElementName());		p.setProject(fCu.getJavaProject());		p.setCompilerOptions(RefactoringASTParser.getCompilerOptions(fCu));		CompilationUnit newCUNode= (CompilationUnit) p.createAST(null);		IProblem[] newProblems= RefactoringAnalyzeUtil.getIntroducedCompileProblems(newCUNode, fCompilationUnitNode);		for (int i= 0; i < newProblems.length; i++) {			IProblem problem= newProblems[i];			if (problem.isError())				result.addEntry(JavaRefactorings.createStatusEntry(problem, newCuSource));		}	}