Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.text.quicksearch/src/org/eclipse/text/quicksearch/internal/ui/QuickSearchQuickAccessComputer.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/org.eclipse.text.quicksearch/src/org/eclipse/text/quicksearch/internal/ui/QuickSearchQuickAccessComputer.java b/org.eclipse.text.quicksearch/src/org/eclipse/text/quicksearch/internal/ui/QuickSearchQuickAccessComputer.java
index d2c190f85..de6b1d618 100644
--- a/org.eclipse.text.quicksearch/src/org/eclipse/text/quicksearch/internal/ui/QuickSearchQuickAccessComputer.java
+++ b/org.eclipse.text.quicksearch/src/org/eclipse/text/quicksearch/internal/ui/QuickSearchQuickAccessComputer.java
@@ -34,6 +34,7 @@ import org.eclipse.ui.texteditor.ITextEditor;
public class QuickSearchQuickAccessComputer extends QuickTextSearchRequestor implements IQuickAccessComputer, IQuickAccessComputerExtension {
private static final int MAX_ENTRIES = 20;
+ private static final long TIMEOUT = 200;
private PriorityFunction priorities;
public QuickSearchQuickAccessComputer() {
@@ -58,7 +59,7 @@ public class QuickSearchQuickAccessComputer extends QuickTextSearchRequestor imp
searcher.setMaxResults(MAX_ENTRIES);
searcher.setQuery(new QuickTextQuery(query, false), true);
long start = System.currentTimeMillis();
- while (matches.size() < 20 && !searcher.isDone() && System.currentTimeMillis() - start < 3000) {
+ while (matches.size() < 20 && !searcher.isDone() && System.currentTimeMillis() - start < TIMEOUT) {
try {
Thread.sleep(100);
} catch (InterruptedException e) {

Back to the top