diff options
author | Manoj Palat | 2017-04-21 09:50:08 +0000 |
---|---|---|
committer | Manoj Palat | 2017-04-21 09:50:08 +0000 |
commit | ff9698f664fadd62325b86c1541d7575aabf84c8 (patch) | |
tree | e3767d86293e4c32b67c8c6c2771d989383892da | |
parent | fb83e192eb209845dd3c5db3419f68ebf23f2cef (diff) | |
download | eclipse.jdt.core-ff9698f664fadd62325b86c1541d7575aabf84c8.tar.gz eclipse.jdt.core-ff9698f664fadd62325b86c1541d7575aabf84c8.tar.xz eclipse.jdt.core-ff9698f664fadd62325b86c1541d7575aabf84c8.zip |
Revert "Bug 515504 - rebuildIndexshould erase the new index db if it is disabled"I20170422-2000I20170422-0300I20170421-2000
This reverts commit fb83e192eb209845dd3c5db3419f68ebf23f2cef.
-rw-r--r-- | org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/nd/indexer/Indexer.java | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/nd/indexer/Indexer.java b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/nd/indexer/Indexer.java index 44a20be277..a175a360e9 100644 --- a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/nd/indexer/Indexer.java +++ b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/nd/indexer/Indexer.java @@ -1046,24 +1046,18 @@ public final class Indexer { } public void rebuildIndex(IProgressMonitor monitor) throws CoreException { + if (!JavaIndex.isEnabled()) { + return; + } SubMonitor subMonitor = SubMonitor.convert(monitor, 100); - this.rescanJob.cancel(); - try { - this.rescanJob.join(0, subMonitor.split(1)); - } catch (InterruptedException e) { - // Nothing to do. - } this.nd.acquireWriteLock(subMonitor.split(1)); try { this.nd.clear(subMonitor.split(2)); } finally { this.nd.releaseWriteLock(); } - if (!JavaIndex.isEnabled()) { - return; - } - rescan(subMonitor.split(97)); + rescan(subMonitor.split(98)); } public void requestRebuildIndex() { |