Lines 953-958
Link Here
|
953 |
// project does not exist -> ignore |
953 |
// project does not exist -> ignore |
954 |
continue; |
954 |
continue; |
955 |
} |
955 |
} |
|
|
956 |
boolean hasChainedJar = false; |
956 |
for (int j = 0; j < entries.length; j++){ |
957 |
for (int j = 0; j < entries.length; j++){ |
957 |
if (entries[j].getEntryKind() == IClasspathEntry.CPE_LIBRARY) { |
958 |
if (entries[j].getEntryKind() == IClasspathEntry.CPE_LIBRARY) { |
958 |
IPath entryPath = entries[j].getPath(); |
959 |
IPath entryPath = entries[j].getPath(); |
Lines 1022-1028
Link Here
|
1022 |
System.out.println("- External JAR ADDED, affecting root: "+root.getElementName()); //$NON-NLS-1$ |
1023 |
System.out.println("- External JAR ADDED, affecting root: "+root.getElementName()); //$NON-NLS-1$ |
1023 |
} |
1024 |
} |
1024 |
elementAdded(root, null, null); |
1025 |
elementAdded(root, null, null); |
1025 |
javaProject.resetResolvedClasspath(); // in case it contains a chained jar |
1026 |
hasChainedJar |= !this.manager.isNonChainingJar(entryPath); |
1026 |
this.state.addClasspathValidation(javaProject); // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=185733 |
1027 |
this.state.addClasspathValidation(javaProject); // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=185733 |
1027 |
hasDelta = true; |
1028 |
hasDelta = true; |
1028 |
} else if (status == EXTERNAL_JAR_CHANGED) { |
1029 |
} else if (status == EXTERNAL_JAR_CHANGED) { |
Lines 1031-1037
Link Here
|
1031 |
System.out.println("- External JAR CHANGED, affecting root: "+root.getElementName()); //$NON-NLS-1$ |
1032 |
System.out.println("- External JAR CHANGED, affecting root: "+root.getElementName()); //$NON-NLS-1$ |
1032 |
} |
1033 |
} |
1033 |
contentChanged(root); |
1034 |
contentChanged(root); |
1034 |
javaProject.resetResolvedClasspath(); // in case it contains a chained jar |
1035 |
hasChainedJar |= !this.manager.isNonChainingJar(entryPath); |
1035 |
hasDelta = true; |
1036 |
hasDelta = true; |
1036 |
} else if (status == EXTERNAL_JAR_REMOVED) { |
1037 |
} else if (status == EXTERNAL_JAR_REMOVED) { |
1037 |
PackageFragmentRoot root = (PackageFragmentRoot) javaProject.getPackageFragmentRoot(entryPath.toString()); |
1038 |
PackageFragmentRoot root = (PackageFragmentRoot) javaProject.getPackageFragmentRoot(entryPath.toString()); |
Lines 1039-1051
Link Here
|
1039 |
System.out.println("- External JAR REMOVED, affecting root: "+root.getElementName()); //$NON-NLS-1$ |
1040 |
System.out.println("- External JAR REMOVED, affecting root: "+root.getElementName()); //$NON-NLS-1$ |
1040 |
} |
1041 |
} |
1041 |
elementRemoved(root, null, null); |
1042 |
elementRemoved(root, null, null); |
1042 |
javaProject.resetResolvedClasspath(); // in case it contains a chained jar |
1043 |
hasChainedJar |= !this.manager.isNonChainingJar(entryPath); |
1043 |
this.state.addClasspathValidation(javaProject); // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=185733 |
1044 |
this.state.addClasspathValidation(javaProject); // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=185733 |
1044 |
hasDelta = true; |
1045 |
hasDelta = true; |
1045 |
} |
1046 |
} |
1046 |
} |
1047 |
} |
1047 |
} |
1048 |
} |
1048 |
} |
1049 |
} |
|
|
1050 |
|
1051 |
if (hasChainedJar) { |
1052 |
javaProject.resetResolvedClasspath(); |
1053 |
} |
1049 |
} |
1054 |
} |
1050 |
// ensure the external file cache is reset so that if a .jar file is deleted but no longer on the classpath, it won't appear as changed next time it is added |
1055 |
// ensure the external file cache is reset so that if a .jar file is deleted but no longer on the classpath, it won't appear as changed next time it is added |
1051 |
JavaModel.flushExternalFileCache(); |
1056 |
JavaModel.flushExternalFileCache(); |