pm.setTaskName("Building constraints system...");  ASTParser parser= ASTParser.newParser(AST.JLS3); parser.setCompilerOptions(RefactoringASTParser.getCompilerOptions(project)); parser.setResolveBindings(true); parser.setProject(project); parser.createASTs(cus, new String[0], new ASTRequestor() { public void acceptAST(CompilationUnit ast, ICompilationUnit source) { pm.subTask(source.getElementName()); if (DEBUG) System.out.println("ASTRequestor#acceptAST(" + source.getElementName() + ")"); ast.setProperty(RefactoringASTParser.SOURCE_PROPERTY, source); ast.accept(unitCollector);  fTypeConstraintFactory.newCu(); fProcessedCus.add(source); } public void acceptBinding(IBinding binding, String bindingKey) { if (DEBUG) System.out.println("ASTRequestor#acceptBinding(" + binding.getName() + ")"); } }, new SubProgressMonitor(pm, 1)); pm.done();
	private void analyzeInCompilerLoop(IJavaProject project, IJavaSearchScope searchScope, SearchPattern pattern, IProgressMonitor pm, RefactoringStatus result) throws JavaModelException {		//TODO: disabled until jdt.core has been tagged//		pm.beginTask("", 2); //$NON-NLS-1$//		final ICompilationUnit[] cus= RefactoringSearchEngine.findAffectedCompilationUnits(pattern, searchScope, new SubProgressMonitor(pm, 1), result);//		//TODO: creation of bindings in ContainerMethods should be in loop.//		//Problem: must be completed before loop starts.//		final AugmentRawContClConstraintCreator unitCollector= new AugmentRawContClConstraintCreator(fTypeConstraintFactory);//		String[] containerKeys= getContainerKeys(unitCollector.getTCModel());//		//		ASTParser parser= ASTParser.newParser(AST.JLS3);//		parser.setCompilerOptions(RefactoringASTParser.getCompilerOptions(project));//		parser.setResolveBindings(true);//		parser.setProject(project);//		parser.createASTs(cus, containerKeys, new ASTRequestor() {//			public void acceptAST(CompilationUnit ast, ICompilationUnit source) {//				if (DEBUG)//					System.out.println("ASTRequestor#acceptAST(" + source.getElementName() + ")"); //$NON-NLS-1$ //$NON-NLS-2$//				ast.setProperty(RefactoringASTParser.SOURCE_PROPERTY, source);//				ast.accept(unitCollector);//				//TODO: add required methods/cus to "toscan" list//				fTypeConstraintFactory.newCu();//				fProcessedCus.add(source);//			}//			public void acceptBinding(IBinding binding, String bindingKey) {//				if (DEBUG)//					System.out.println("ASTRequestor#acceptBinding(" + binding.getName() + ")"); //$NON-NLS-1$ //$NON-NLS-2$//			}//		}, new SubProgressMonitor(pm, 1));////		parser.createASTs(new ASTRequestor() {////////			public void acceptAST(ASTNode node) {////				CompilationUnit unitAST= (CompilationUnit) node;////				//TODO: Hack only works for single CU:////				ICompilationUnit cu= cus[0]; unitAST.setProperty(RefactoringASTParser.SOURCE_PROPERTY, cu);////				unitAST.accept(unitCollector);//////				ITypeConstraint2[] unitConstraints= fTypeConstraintFactory.getNewTypeConstraints();////				//TODO: add required methods/cus to "toscan" list////				fProcessedCus.add(cu);////////			}////////			public ICompilationUnit[] getSources() {////				//TODO: Hack only works for single CU:////				return new ICompilationUnit[] { cus[0] };////			}////////			public void acceptBinding(IBinding binding, String bindingKey) {////				// TODO Auto-generated method stub////				////			}////		}, new SubProgressMonitor(pm, 1));//		pm.done();	}