Lines 10-21
Link Here
|
10 |
*******************************************************************************/ |
10 |
*******************************************************************************/ |
11 |
package org.eclipse.jdt.internal.core; |
11 |
package org.eclipse.jdt.internal.core; |
12 |
|
12 |
|
|
|
13 |
import java.io.File; |
14 |
import java.net.URI; |
13 |
import java.util.ArrayList; |
15 |
import java.util.ArrayList; |
14 |
import java.util.HashMap; |
16 |
import java.util.HashMap; |
15 |
import java.util.HashSet; |
17 |
import java.util.HashSet; |
16 |
import java.util.Iterator; |
18 |
import java.util.Iterator; |
17 |
import java.util.Map; |
19 |
import java.util.Map; |
18 |
|
20 |
|
|
|
21 |
import org.eclipse.core.filesystem.EFS; |
22 |
import org.eclipse.core.filesystem.IFileStore; |
19 |
import org.eclipse.core.resources.IFolder; |
23 |
import org.eclipse.core.resources.IFolder; |
20 |
import org.eclipse.core.resources.IResource; |
24 |
import org.eclipse.core.resources.IResource; |
21 |
import org.eclipse.core.resources.IWorkspace; |
25 |
import org.eclipse.core.resources.IWorkspace; |
Lines 261-266
Link Here
|
261 |
|
265 |
|
262 |
delta.changed(this.project, IJavaElementDelta.F_RESOLVED_CLASSPATH_CHANGED); |
266 |
delta.changed(this.project, IJavaElementDelta.F_RESOLVED_CLASSPATH_CHANGED); |
263 |
result |= HAS_DELTA; |
267 |
result |= HAS_DELTA; |
|
|
268 |
|
269 |
state.addForRefresh(this.project); // ensure external jars are refreshed for this project (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=212769 ) |
264 |
|
270 |
|
265 |
Map removedRoots = null; |
271 |
Map removedRoots = null; |
266 |
IPackageFragmentRoot[] roots = null; |
272 |
IPackageFragmentRoot[] roots = null; |
Lines 314-319
Link Here
|
314 |
} |
320 |
} |
315 |
} |
321 |
} |
316 |
addClasspathDeltas(delta, pkgFragmentRoots, IJavaElementDelta.F_REMOVED_FROM_CLASSPATH); |
322 |
addClasspathDeltas(delta, pkgFragmentRoots, IJavaElementDelta.F_REMOVED_FROM_CLASSPATH); |
|
|
323 |
|
324 |
// remember timestamp of jars that were removed (in case they are added as external jar in the same operation) |
325 |
for (int j = 0, length = pkgFragmentRoots.length; j < length; j++) { |
326 |
IPackageFragmentRoot root = pkgFragmentRoots[j]; |
327 |
if (root.isArchive() && !root.isExternal()) { |
328 |
URI location = root.getResource().getLocationURI(); |
329 |
File file = null; |
330 |
try { |
331 |
IFileStore fileStore = EFS.getStore(location); |
332 |
file = fileStore.toLocalFile(EFS.NONE, null); |
333 |
} catch (CoreException e) { |
334 |
// continue |
335 |
} |
336 |
if (file == null) |
337 |
continue; |
338 |
long timeStamp = DeltaProcessor.getTimeStamp(file); |
339 |
IPath externalPath = new org.eclipse.core.runtime.Path(file.getAbsolutePath()); |
340 |
state.getExternalLibTimeStamps().put(externalPath, new Long(timeStamp)); |
341 |
} |
342 |
} |
317 |
} else { |
343 |
} else { |
318 |
// remote project changes |
344 |
// remote project changes |
319 |
if (this.oldResolvedClasspath[i].getEntryKind() == IClasspathEntry.CPE_PROJECT) { |
345 |
if (this.oldResolvedClasspath[i].getEntryKind() == IClasspathEntry.CPE_PROJECT) { |