diff options
author | relves | 2006-09-11 00:22:30 +0000 |
---|---|---|
committer | relves | 2006-09-11 00:22:30 +0000 |
commit | 580e36be035f63f453c1772044ae7a3b75030226 (patch) | |
tree | ace35e7361db03b75e7507b85f1535f192cc4093 /org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaSearchEngineTest.java | |
parent | 9b46ff0d517c0c8e053c06fd707fb11e30569a7b (diff) | |
download | org.eclipse.mylyn.tasks-580e36be035f63f453c1772044ae7a3b75030226.tar.gz org.eclipse.mylyn.tasks-580e36be035f63f453c1772044ae7a3b75030226.tar.xz org.eclipse.mylyn.tasks-580e36be035f63f453c1772044ae7a3b75030226.zip |
Progress on: 155279: Split search into headless and ui
https://bugs.eclipse.org/bugs/show_bug.cgi?id=155279
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaSearchEngineTest.java')
-rw-r--r-- | org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaSearchEngineTest.java | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaSearchEngineTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaSearchEngineTest.java index 3eddb2f28..651419792 100644 --- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaSearchEngineTest.java +++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaSearchEngineTest.java @@ -11,7 +11,6 @@ package org.eclipse.mylar.bugzilla.tests; -import java.util.ArrayList; import java.util.List; import junit.framework.TestCase; @@ -21,8 +20,8 @@ import org.eclipse.mylar.internal.bugzilla.core.BugzillaCorePlugin; import org.eclipse.mylar.internal.bugzilla.core.BugzillaRepositoryQuery; import org.eclipse.mylar.internal.bugzilla.core.IBugzillaConstants; import org.eclipse.mylar.tasks.core.AbstractQueryHit; -import org.eclipse.mylar.tasks.core.AbstractQueryHitCollector; import org.eclipse.mylar.tasks.core.AbstractRepositoryConnector; +import org.eclipse.mylar.tasks.core.QueryHitCollector; import org.eclipse.mylar.tasks.core.TaskRepository; import org.eclipse.mylar.tasks.ui.TasksUiPlugin; @@ -86,8 +85,7 @@ public class BugzillaSearchEngineTest extends TestCase { assertEquals(NUM_EXPECTED_HITS, hits.size()); } - private List<AbstractQueryHit> runQuery(String repositoryURL, String SearchString) throws Exception { - final ArrayList<AbstractQueryHit> results = new ArrayList<AbstractQueryHit>(); + private List<AbstractQueryHit> runQuery(String repositoryURL, String SearchString) throws Exception { TaskRepository repository = TasksUiPlugin.getRepositoryManager().getRepository(BugzillaCorePlugin.REPOSITORY_KIND, repositoryURL); assertNotNull(repository); @@ -99,19 +97,12 @@ public class BugzillaSearchEngineTest extends TestCase { AbstractRepositoryConnector connector = (AbstractRepositoryConnector) TasksUiPlugin.getRepositoryManager().getRepositoryConnector(BugzillaCorePlugin.REPOSITORY_KIND); - AbstractQueryHitCollector collector = new AbstractQueryHitCollector(TasksUiPlugin.getTaskListManager().getTaskList()) { - - @Override - public void addMatch(AbstractQueryHit hit) { - results.add(hit); - } - - }; + QueryHitCollector collector = new QueryHitCollector(TasksUiPlugin.getTaskListManager().getTaskList()); connector.performQuery(repositoryQuery, repository, TasksUiPlugin.getDefault().getProxySettings(), new NullProgressMonitor(), collector); //results.addAll(connector.performQuery(repositoryQuery, new NullProgressMonitor(), new MultiStatus(TasksUiPlugin.PLUGIN_ID, IStatus.OK, "Query result", null))); - return results; + return collector.getHits(); } |