APT - Patch from Jess Garms 02/16/2006
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/BatchASTCreationTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/BatchASTCreationTests.java
index 78d2ec0..88d52d2 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/BatchASTCreationTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/BatchASTCreationTests.java
@@ -1571,8 +1571,11 @@
 	/*
 	 * Ensures that unrequested compilation units are not resolved
 	 * (regression test for bug 114935 ASTParser.createASTs parses more CUs then required)
+	 * 
+	 * jgarms@bea.com: Disabled for APT branch, as unrequested compilation units
+	 * can be used later. This is a regression from 3.1.1
 	 */
-	public void test070() throws CoreException {
+	public void DISABLED_test070() throws CoreException {
 		MarkerInfo[] markerInfos = createMarkerInfos(new String[] {
 			"/P/p1/X.java",
 			"package p1;\n" +
diff --git a/org.eclipse.jdt.core/META-INF/MANIFEST.MF b/org.eclipse.jdt.core/META-INF/MANIFEST.MF
index 3a14c92..d8d4cdd 100644
--- a/org.eclipse.jdt.core/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.core/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jdt.core; singleton:=true
-Bundle-Version: 3.1.2.apt02
+Bundle-Version: 3.1.2.apt03
 Bundle-ClassPath: .
 Bundle-Activator: org.eclipse.jdt.core.JavaCore
 Bundle-Vendor: %providerName
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java
index ffdb2d6..5694793 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java
@@ -670,8 +670,21 @@
 					// no need to keep resolving if no more ASTs and no more binding keys are needed
 					// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=114935
 					// cleanup remaining units
+					
+					// jgarms: eagerly cleaning up the compilation units
+					// causes NPEs later for CompilationParticipants,
+					// as the scope is null.
+					// For now turn off this cleanup.
+					
 					for (; i < this.totalUnits; i++) {
-						this.unitsToProcess[i].cleanUp();
+						// In order to have constants resolved,
+						// we need to resolve these units
+						unit = this.unitsToProcess[i];
+						if (unit.scope != null) {
+							unit.scope.faultInTypes();
+						}
+						unit.resolve();
+					//	this.unitsToProcess[i].cleanUp();
 						this.unitsToProcess[i] = null;
 					}
 					break;
diff --git a/org.eclipse.jdt.core/scripts/exportplugin.xml b/org.eclipse.jdt.core/scripts/exportplugin.xml
index 58a7318..8897eae 100644
--- a/org.eclipse.jdt.core/scripts/exportplugin.xml
+++ b/org.eclipse.jdt.core/scripts/exportplugin.xml
@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
 <!-- build script to create a plugin from ${plugin} -->
-<project name="${plugin}" default="export plug-in [_3.1.2.apt02]" basedir=".."> 
+<project name="${plugin}" default="export plug-in [_3.1.2.apt03]" basedir=".."> 
 
-<target name="export plug-in [_3.1.2.apt02]">
+<target name="export plug-in [_3.1.2.apt03]">
 	<antcall target="zz_internal_export">
-		<param name="jdt_core_version" value="3.1.2.apt02"/>
+		<param name="jdt_core_version" value="3.1.2.apt03"/>
 	</antcall>
 </target>