Lines 28-33
Link Here
|
28 |
import org.eclipse.jdt.core.IPackageFragmentRoot; |
28 |
import org.eclipse.jdt.core.IPackageFragmentRoot; |
29 |
import org.eclipse.jdt.core.JavaModelException; |
29 |
import org.eclipse.jdt.core.JavaModelException; |
30 |
import org.eclipse.jdt.internal.compiler.util.ObjectVector; |
30 |
import org.eclipse.jdt.internal.compiler.util.ObjectVector; |
|
|
31 |
import org.eclipse.jdt.internal.core.DeltaProcessor.RootInfo; |
31 |
import org.eclipse.jdt.internal.core.JavaModelManager.PerProjectInfo; |
32 |
import org.eclipse.jdt.internal.core.JavaModelManager.PerProjectInfo; |
32 |
import org.eclipse.jdt.internal.core.search.indexing.IndexManager; |
33 |
import org.eclipse.jdt.internal.core.search.indexing.IndexManager; |
33 |
import org.eclipse.jdt.internal.core.util.Util; |
34 |
import org.eclipse.jdt.internal.core.util.Util; |
Lines 304-316
Link Here
|
304 |
result |= HAS_LIBRARY_CHANGE; |
305 |
result |= HAS_LIBRARY_CHANGE; |
305 |
} |
306 |
} |
306 |
|
307 |
|
307 |
PackageFragmentRoot[] pkgFragmentRoots = null; |
308 |
IPackageFragmentRoot[] pkgFragmentRoots = null; |
308 |
if (removedRoots != null) { |
309 |
if (removedRoots != null) { |
309 |
PackageFragmentRoot oldRoot = (PackageFragmentRoot) removedRoots.get(this.oldResolvedClasspath[i].getPath()); |
310 |
PackageFragmentRoot oldRoot = (PackageFragmentRoot) removedRoots.get(this.oldResolvedClasspath[i].getPath()); |
310 |
if (oldRoot != null) { // use old root if any (could be none if entry wasn't bound) |
311 |
if (oldRoot != null) { // use old root if any (could be none if entry wasn't bound) |
311 |
pkgFragmentRoots = new PackageFragmentRoot[] { oldRoot }; |
312 |
pkgFragmentRoots = new PackageFragmentRoot[] { oldRoot }; |
312 |
} |
313 |
} |
313 |
} |
314 |
} |
|
|
315 |
else { |
316 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=335986 |
317 |
// When removedRoots doesn't have the package fragment roots, recover them from the cache |
318 |
RootInfo rootInfo = (RootInfo)state.oldRoots.get(this.oldResolvedClasspath[i].getPath()); |
319 |
if (rootInfo != null && rootInfo.cache != null) { |
320 |
IPackageFragmentRoot oldRoot = rootInfo.cache; |
321 |
pkgFragmentRoots = new IPackageFragmentRoot[] { oldRoot }; |
322 |
} |
323 |
} |
314 |
if (pkgFragmentRoots == null) { |
324 |
if (pkgFragmentRoots == null) { |
315 |
try { |
325 |
try { |
316 |
ObjectVector accumulatedRoots = new ObjectVector(); |
326 |
ObjectVector accumulatedRoots = new ObjectVector(); |