Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2007-02-15 15:18:20 -0500
committermkersten2007-02-15 15:18:20 -0500
commit13ef0b17f2952dd3a47f14346de1f089f0fe0445 (patch)
treec27e8a6c984c9f76c67721ceec84f0a8c947eb24 /org.eclipse.mylyn.tasks.core
parentdf47ea78dd8e6fc1db7a84b14413486858cefc1b (diff)
downloadorg.eclipse.mylyn.tasks-13ef0b17f2952dd3a47f14346de1f089f0fe0445.tar.gz
org.eclipse.mylyn.tasks-13ef0b17f2952dd3a47f14346de1f089f0fe0445.tar.xz
org.eclipse.mylyn.tasks-13ef0b17f2952dd3a47f14346de1f089f0fe0445.zip
NEW - bug 166174: invalid handle for task, can not contain: -, was: MNGECLIPSE-9
https://bugs.eclipse.org/bugs/show_bug.cgi?id=166174
Diffstat (limited to 'org.eclipse.mylyn.tasks.core')
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskList.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskList.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskList.java
index ec45b606f..4c742051a 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskList.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskList.java
@@ -407,6 +407,24 @@ public class TaskList {
}
}
+ /**
+ * Searches for a task whose URL matches
+ *
+ * @return first task with a matching URL.
+ * @since 2.0
+ */
+ public AbstractRepositoryTask getRepositoryTask(String taskUrl) {
+ for (ITask currTask : tasks.values()) {
+ if (currTask instanceof AbstractRepositoryTask) {
+ String currUrl = ((AbstractRepositoryTask) currTask).getTaskUrl();
+ if (currUrl != null && !currUrl.equals("") && currUrl.equals(taskUrl)) {
+ return (AbstractRepositoryTask)currTask;
+ }
+ }
+ }
+ return null;
+ }
+
public AbstractTaskContainer getContainerForHandle(String categoryHandle) {
for (AbstractTaskContainer cat : categories.values()) {
if (cat instanceof AbstractTaskContainer) {

Back to the top