Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2007-02-09 23:06:01 -0500
committermkersten2007-02-09 23:06:01 -0500
commit3ee272a24ffae8d7f061a43228926c30551af8ff (patch)
treecaeb9ad6f1896660f772ae4496832143bc36fef9 /org.eclipse.mylyn.bugzilla.ui
parentbd1f40843527e1fd3132384836706208e43ee143 (diff)
downloadorg.eclipse.mylyn.tasks-3ee272a24ffae8d7f061a43228926c30551af8ff.tar.gz
org.eclipse.mylyn.tasks-3ee272a24ffae8d7f061a43228926c30551af8ff.tar.xz
org.eclipse.mylyn.tasks-3ee272a24ffae8d7f061a43228926c30551af8ff.zip
NEW - bug 149624: [api] AbstractRepositoryTask repositoryUrl and task id should not be derived from handleIdentifier
https://bugs.eclipse.org/bugs/show_bug.cgi?id=149624
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.ui')
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditor.java4
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskEditorInput.java2
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskExternalizer.java12
3 files changed, 10 insertions, 8 deletions
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditor.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditor.java
index ec1265c3b..5dbaa5ef2 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditor.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditor.java
@@ -26,7 +26,6 @@ import org.eclipse.mylar.internal.bugzilla.core.BugzillaCorePlugin;
import org.eclipse.mylar.internal.bugzilla.core.BugzillaReportElement;
import org.eclipse.mylar.internal.bugzilla.core.IBugzillaConstants;
import org.eclipse.mylar.internal.tasks.ui.TaskListColorsAndFonts;
-import org.eclipse.mylar.tasks.core.AbstractRepositoryTask;
import org.eclipse.mylar.tasks.core.ITask;
import org.eclipse.mylar.tasks.core.RepositoryTaskAttribute;
import org.eclipse.mylar.tasks.core.TaskComment;
@@ -284,8 +283,7 @@ public class BugzillaTaskEditor extends AbstractRepositoryTaskEditor {
for (String bugNumber : values.split(",")) {
final String bugId = bugNumber.trim();
Hyperlink hyperlink = toolkit.createHyperlink(hyperlinksComposite, bugId, SWT.NONE);
- final ITask task = TasksUiPlugin.getTaskListManager().getTaskList().getTask(
- AbstractRepositoryTask.getHandle(repository.getUrl(), bugId));
+ final ITask task = TasksUiPlugin.getTaskListManager().getTaskList().getTask(repository.getUrl(), bugId);
if (task != null) {
hyperlink.setToolTipText(task.getSummary());
}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskEditorInput.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskEditorInput.java
index 4d18dd231..33d49b9a2 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskEditorInput.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskEditorInput.java
@@ -35,7 +35,7 @@ public class BugzillaTaskEditorInput extends RepositoryTaskEditorInput {
private BugzillaTask bugTask;
public BugzillaTaskEditorInput(TaskRepository repository, BugzillaTask bugTask, boolean offline) {
- super(repository, bugTask.getHandleIdentifier(), bugTask.getUrl());
+ super(repository, bugTask.getHandleIdentifier(), bugTask.getTaskUrl());
this.bugTask = bugTask;
updateOptions(getTaskData());
updateOptions(getOldTaskData());
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskExternalizer.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskExternalizer.java
index 90765b928..b5716745e 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskExternalizer.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskExternalizer.java
@@ -14,8 +14,8 @@ package org.eclipse.mylar.internal.bugzilla.ui.tasklist;
import org.eclipse.mylar.internal.bugzilla.core.BugzillaQueryHit;
import org.eclipse.mylar.internal.bugzilla.core.BugzillaRepositoryQuery;
import org.eclipse.mylar.internal.bugzilla.core.BugzillaTask;
+import org.eclipse.mylar.internal.tasks.core.RepositoryTaskHandleUtil;
import org.eclipse.mylar.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylar.tasks.core.AbstractRepositoryTask;
import org.eclipse.mylar.tasks.core.AbstractTaskContainer;
import org.eclipse.mylar.tasks.core.DelegatingTaskExternalizer;
import org.eclipse.mylar.tasks.core.ITask;
@@ -120,9 +120,13 @@ public class BugzillaTaskExternalizer extends DelegatingTaskExternalizer {
} else {
throw new TaskExternalizationException("Description not stored for bug report");
}
- BugzillaTask task = new BugzillaTask(handle, label, false);
+
+ String repositoryUrl = RepositoryTaskHandleUtil.getRepositoryUrl(handle);
+ String taskId = RepositoryTaskHandleUtil.getTaskId(handle);
+
+ BugzillaTask task = new BugzillaTask(repositoryUrl, taskId, label, false);
super.readTaskInfo(task, taskList, element, parent, category);
-
+
return task;
}
@@ -150,7 +154,7 @@ public class BugzillaTaskExternalizer extends DelegatingTaskExternalizer {
status = STATUS_RESO;
}
}
- BugzillaQueryHit hit = new BugzillaQueryHit(taskList, "", "", query.getRepositoryUrl(), AbstractRepositoryTask
+ BugzillaQueryHit hit = new BugzillaQueryHit(taskList, "", "", query.getRepositoryUrl(), RepositoryTaskHandleUtil
.getTaskId(handle), null, status);
readQueryHitInfo(hit, taskList, query, element);
}

Back to the top