Bug 118897 ASTParser resolves bindings without request
I20051130-1215 ASTParser resolves bindings without request when certain conditions hold, although setResolveBindings(true) has not been called. The following extract from internalCreateAST(IProgressMonitor) looks suspicios: if (this.rawSource != null) { needToResolveBindings = this.unitName != null && this.project != null && this.compilerOptions != null; ... I would not expect to get bindings unless I explicitly requested them. This can be a serious performance hit for clients that only need lightweight ASTs.
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/TypeRulesTest.java
return allTests();
		} else {
			TestSuite suite= new TestSuite();
			suite.addTest(new TypeRulesTest("test1"));
			return new ProjectTestSetup(suite);
		}	
	}
	protected void setUp() throws Exception {
		Hashtable options= TestOptions.getDefaultOptions();
		options.put(JavaCore.COMPILER_PB_NO_EFFECT_ASSIGNMENT, JavaCore.IGNORE);
		options.put(JavaCore.COMPILER_PB_UNNECESSARY_TYPE_CHECK, JavaCore.IGNORE);
		options.put(JavaCore.COMPILER_PB_UNUSED_LOCAL, JavaCore.IGNORE);
		options.put(JavaCore.COMPILER_PB_UNCHECKED_TYPE_OPERATION, JavaCore.IGNORE);
		JavaCore.setOptions(options);
		
		fJProject1= ProjectTestSetup.getProject();
		fSourceFolder= JavaProjectHelper.addSourceContainer(fJProject1, "src");
	}
	protected void tearDown() throws Exception {
		JavaProjectHelper.clear(fJProject1, ProjectTestSetup.getDefaultClasspath());
	}
	
	
	private VariableDeclarationFragment[] createVariables() throws JavaModelException {
		IPackageFragment pack1= fSourceFolder.createPackageFragment("test1", false, null);
		StringBuffer buf= new StringBuffer();
		buf.append("package test1;\n");
		buf.append("import java.util.Vector;\n");
		buf.append("import java.util.Collection;\n");
		buf.append("import java.io.Serializable;\n");