Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManoj Palat2017-06-12 15:01:20 +0000
committerManoj Palat2017-06-12 15:01:20 +0000
commit1c9be7804c5f24d8d2857bf04bda58d61ad462eb (patch)
treee7413ef66213dce71d7cdf427080ed9795b5c9a9
parent34337e2078da6ee9eff6d9ed3144e9836eec04f2 (diff)
downloadeclipse.jdt.core-1c9be7804c5f24d8d2857bf04bda58d61ad462eb.tar.gz
eclipse.jdt.core-1c9be7804c5f24d8d2857bf04bda58d61ad462eb.tar.xz
eclipse.jdt.core-1c9be7804c5f24d8d2857bf04bda58d61ad462eb.zip
systems, must exit eclipse to force file handle close, to allow deletion of files.
-rw-r--r--org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/SourceIndexer.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/SourceIndexer.java b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/SourceIndexer.java
index e7b287534b..774ea9130f 100644
--- a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/SourceIndexer.java
+++ b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/SourceIndexer.java
@@ -157,7 +157,7 @@ public class SourceIndexer extends AbstractIndexer implements ITypeRequestor, Su
this.basicParser.reportOnlyOneSyntaxError = true;
this.basicParser.scanner.taskTags = null;
this.cud = this.basicParser.parse(this.compilationUnit, new CompilationResult(this.compilationUnit, 0, 0, this.options.maxProblemsPerUnit));
-
+ JavaModelManager.getJavaModelManager().cacheZipFiles(this); // use model only for caching
// Use a non model name environment to avoid locks, monitors and such.
INameEnvironment nameEnvironment = IndexBasedJavaSearchEnvironment.create(Collections.singletonList((IJavaProject)javaProject), JavaModelManager.getJavaModelManager().getWorkingCopies(DefaultWorkingCopyOwner.PRIMARY, true/*add primary WCs*/));
this.lookupEnvironment = new LookupEnvironment(this, this.options, problemReporter, nameEnvironment);
@@ -170,6 +170,8 @@ public class SourceIndexer extends AbstractIndexer implements ITypeRequestor, Su
if (JobManager.VERBOSE) {
e.printStackTrace();
}
+ } finally {
+ JavaModelManager.getJavaModelManager().flushZipFiles(this);
}
}

Back to the top