### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: compiler/org/eclipse/jdt/internal/compiler/Compiler.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/Compiler.java,v retrieving revision 1.117 diff -u -r1.117 Compiler.java --- compiler/org/eclipse/jdt/internal/compiler/Compiler.java 16 Nov 2010 14:08:54 -0000 1.117 +++ compiler/org/eclipse/jdt/internal/compiler/Compiler.java 22 Feb 2011 17:56:55 -0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2010 IBM Corporation and others. + * Copyright (c) 2000, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -352,6 +352,9 @@ ICompilationUnit sourceUnit, CompilationUnitDeclaration parsedUnit) { + if (this.unitsToProcess == null) + return; // not collecting units + // append the unit to the list of ones to process later on int size = this.unitsToProcess.length; if (this.totalUnits == size) @@ -876,8 +879,18 @@ // build and record parsed units this.parseThreshold = 0; // will request a full parse beginToCompile(new ICompilationUnit[] { sourceUnit }); - // process all units (some more could be injected in the loop by the lookup environment) - unit = this.unitsToProcess[0]; + // find the right unit from what was injected via accept(ICompilationUnit,..): + for (int i=0; i