Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrelves2007-06-22 15:41:14 -0400
committerrelves2007-06-22 15:41:14 -0400
commit29176824f4d2ded21745569b2ba6c973031626f0 (patch)
tree6373e2e88b471c23d20199f08af6d384e8206c58 /org.eclipse.mylyn.tasks.core
parentf93f376d5acd6297e0048574dfff7ff480dbc2bc (diff)
downloadorg.eclipse.mylyn.tasks-29176824f4d2ded21745569b2ba6c973031626f0.tar.gz
org.eclipse.mylyn.tasks-29176824f4d2ded21745569b2ba6c973031626f0.tar.xz
org.eclipse.mylyn.tasks-29176824f4d2ded21745569b2ba6c973031626f0.zip
NEW - bug 193876: query synchronization is missing hits
https://bugs.eclipse.org/bugs/show_bug.cgi?id=193876
Diffstat (limited to 'org.eclipse.mylyn.tasks.core')
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskCollector.java6
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/QueryHitCollector.java9
2 files changed, 12 insertions, 3 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskCollector.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskCollector.java
index 2aad2db65..a950c22b7 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskCollector.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskCollector.java
@@ -11,12 +11,18 @@
package org.eclipse.mylyn.tasks.core;
+import java.util.Set;
+
import org.eclipse.core.runtime.CoreException;
+/**
+ * @author Rob Elves
+ */
public interface ITaskCollector {
void accept(AbstractTask task);
void accept(RepositoryTaskData taskData) throws CoreException;
+ public Set<AbstractTask> getTaskHits();
}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/QueryHitCollector.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/QueryHitCollector.java
index d1134a538..b22fba5e1 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/QueryHitCollector.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/QueryHitCollector.java
@@ -41,8 +41,9 @@ public class QueryHitCollector implements ITaskCollector {
if (task == null) {
throw new IllegalArgumentException();
}
-
- taskResults.add(task);
+ if (taskResults.size() < MAX_HITS) {
+ taskResults.add(task);
+ }
}
public void accept(RepositoryTaskData taskData) throws CoreException {
@@ -51,7 +52,9 @@ public class QueryHitCollector implements ITaskCollector {
}
AbstractTask task = taskFactory.createTask(taskData, new NullProgressMonitor());
- taskResults.add(task);
+ if (taskResults.size() < MAX_HITS) {
+ taskResults.add(task);
+ }
}
public Set<AbstractTask> getTaskHits() {

Back to the top