Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2006-11-01 21:10:14 -0500
committermkersten2006-11-01 21:10:14 -0500
commit2e099055aec2c710cb3393b17db51e4d4d82fc54 (patch)
tree57f5a2e3d1d9cfd209a7772b36b7692692850534 /org.eclipse.mylyn.trac.core/src
parent0d356e5e218f4cf123c36259d32e455349e4e5ea (diff)
downloadorg.eclipse.mylyn.tasks-2e099055aec2c710cb3393b17db51e4d4d82fc54.tar.gz
org.eclipse.mylyn.tasks-2e099055aec2c710cb3393b17db51e4d4d82fc54.tar.xz
org.eclipse.mylyn.tasks-2e099055aec2c710cb3393b17db51e4d4d82fc54.zip
NEW - bug 162651: support search integration for JIRA
https://bugs.eclipse.org/bugs/show_bug.cgi?id=162651
Diffstat (limited to 'org.eclipse.mylyn.trac.core/src')
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracQueryHit.java42
1 files changed, 7 insertions, 35 deletions
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracQueryHit.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracQueryHit.java
index 261312ed8..7e7e7946e 100644
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracQueryHit.java
+++ b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracQueryHit.java
@@ -13,7 +13,6 @@ package org.eclipse.mylar.internal.trac.core;
import org.eclipse.mylar.tasks.core.AbstractQueryHit;
import org.eclipse.mylar.tasks.core.AbstractRepositoryTask;
-import org.eclipse.mylar.tasks.core.ITask;
import org.eclipse.mylar.tasks.core.TaskList;
/**
@@ -21,41 +20,21 @@ import org.eclipse.mylar.tasks.core.TaskList;
*/
public class TracQueryHit extends AbstractQueryHit {
- private TracTask task;
-
private boolean completed;
- private TaskList taskList;
-
public TracQueryHit(TaskList taskList, String repositoryUrl, String description, String id) {
- super(repositoryUrl, description, id);
-
- this.taskList = taskList;
+ super(taskList, repositoryUrl, description, id);
}
public TracQueryHit(TaskList taskList, String handle) {
- super(AbstractRepositoryTask.getRepositoryUrl(handle), "", AbstractRepositoryTask.getTaskId(handle));
-
- this.taskList = taskList;
+ super(taskList, AbstractRepositoryTask.getRepositoryUrl(handle), "", AbstractRepositoryTask.getTaskId(handle));
}
- @Override
- public AbstractRepositoryTask getCorrespondingTask() {
- return task;
- }
-
- @Override
- public AbstractRepositoryTask getOrCreateCorrespondingTask() {
- ITask existingTask = taskList.getTask(getHandleIdentifier());
- if (existingTask instanceof TracTask) {
- this.task = (TracTask) existingTask;
- } else {
- this.task = new TracTask(getHandleIdentifier(), getDescription(), true);
- task.setCompleted(completed);
- task.setPriority(priority);
- taskList.addTask(task);
- }
- return task;
+ protected AbstractRepositoryTask createTask() {
+ TracTask newTask = new TracTask(getHandleIdentifier(), getDescription(), true);
+ newTask.setCompleted(completed);
+ newTask.setPriority(priority);
+ return newTask;
}
@Override
@@ -63,13 +42,6 @@ public class TracQueryHit extends AbstractQueryHit {
return (task != null) ? task.isCompleted() : completed;
}
- @Override
- public void setCorrespondingTask(AbstractRepositoryTask task) {
- if (task instanceof TracTask) {
- this.task = (TracTask) task;
- }
- }
-
public String getUrl() {
return getRepositoryUrl() + ITracClient.TICKET_URL + getId();
}

Back to the top