Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2007-02-13 18:09:30 -0500
committermkersten2007-02-13 18:09:30 -0500
commit5f274da8f43c3ef71b33938ef7d219e1ee11efd4 (patch)
tree3611f409e28863495c5f007df20c243609694098 /org.eclipse.mylyn.bugzilla.ui
parent5ddc687e18141108ae52812ee74cd067db340e66 (diff)
downloadorg.eclipse.mylyn.tasks-5f274da8f43c3ef71b33938ef7d219e1ee11efd4.tar.gz
org.eclipse.mylyn.tasks-5f274da8f43c3ef71b33938ef7d219e1ee11efd4.tar.xz
org.eclipse.mylyn.tasks-5f274da8f43c3ef71b33938ef7d219e1ee11efd4.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/BugzillaUiPlugin.java2
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/NewBugzillaTaskEditor.java2
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskExternalizer.java56
3 files changed, 9 insertions, 51 deletions
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiPlugin.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiPlugin.java
index fef8c8740..90fd68688 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiPlugin.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiPlugin.java
@@ -54,7 +54,7 @@ public class BugzillaUiPlugin extends AbstractUIPlugin {
public static final String HIT_MARKER_ATTR_HREF = "href";
- public static final String HIT_MARKER_ATTR_DESC = "description";
+ public static final String HIT_MARKER_ATTR_DESC = "summary";
public static final String HIT_MARKER_ATTR_LABEL = "label";
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/NewBugzillaTaskEditor.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/NewBugzillaTaskEditor.java
index c819235d0..d23c9826f 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/NewBugzillaTaskEditor.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/NewBugzillaTaskEditor.java
@@ -117,7 +117,7 @@ public class NewBugzillaTaskEditor extends AbstractNewRepositoryTaskEditor {
summaryText.setFocus();
return;
} else if (descriptionTextViewer.getTextWidget().getText().equals("")) {
- MessageDialog.openInformation(this.getSite().getShell(), "Submit Error", "Please proved a detailed description with new reports");
+ MessageDialog.openInformation(this.getSite().getShell(), "Submit Error", "Please proved a detailed summary with new reports");
descriptionTextViewer.getTextWidget().setFocus();
return;
}
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 1d2f098df..e04a710bc 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,6 +14,7 @@ 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.tasks.core.AbstractQueryHit;
import org.eclipse.mylar.tasks.core.AbstractRepositoryQuery;
import org.eclipse.mylar.tasks.core.AbstractTaskContainer;
import org.eclipse.mylar.tasks.core.DelegatingTaskExternalizer;
@@ -22,7 +23,6 @@ import org.eclipse.mylar.tasks.core.TaskExternalizationException;
import org.eclipse.mylar.tasks.core.TaskList;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
/**
* @author Mik Kersten
@@ -60,7 +60,6 @@ public class BugzillaTaskExternalizer extends DelegatingTaskExternalizer {
@Override
public AbstractRepositoryQuery readQuery(Node node, TaskList taskList) throws TaskExternalizationException {
- boolean hasCaughtException = false;
Element element = (Element) node;
BugzillaRepositoryQuery query = new BugzillaRepositoryQuery(element.getAttribute(KEY_REPOSITORY_URL), element
.getAttribute(KEY_QUERY_STRING), element.getAttribute(KEY_NAME), element
@@ -71,21 +70,7 @@ public class BugzillaTaskExternalizer extends DelegatingTaskExternalizer {
if (element.getAttribute(KEY_LAST_REFRESH) != null && !element.getAttribute(KEY_LAST_REFRESH).equals("")) {
query.setLastRefreshTimeStamp(element.getAttribute(KEY_LAST_REFRESH));
}
-
- NodeList list = node.getChildNodes();
- for (int i = 0; i < list.getLength(); i++) {
- Node child = list.item(i);
- try {
- readQueryHit(child, taskList, query);
- } catch (TaskExternalizationException e) {
- hasCaughtException = true;
- }
- }
- if (hasCaughtException) {
- throw new TaskExternalizationException("Failed to load all tasks");
- } else {
- return query;
- }
+ return query;
}
@Override
@@ -104,28 +89,9 @@ public class BugzillaTaskExternalizer extends DelegatingTaskExternalizer {
}
@Override
- public ITask readTask(Node node, TaskList taskList, AbstractTaskContainer category, ITask parent)
+ public ITask createTask(String repositoryUrl, String taskId, String summary, Element element, TaskList taskList, AbstractTaskContainer category, ITask parent)
throws TaskExternalizationException {
- Element element = (Element) node;
-// String handle;
-// String label;
-// if (element.hasAttribute(KEY_HANDLE)) {
-// handle = element.getAttribute(KEY_HANDLE);
-// } else {
-// throw new TaskExternalizationException("Handle not stored for bug report");
-// }
-// if (element.hasAttribute(KEY_LABEL)) {
-// label = element.getAttribute(KEY_LABEL);
-// } else {
-// throw new TaskExternalizationException("Description not stored for bug report");
-// }
-//
-// String repositoryUrl = RepositoryTaskHandleUtil.getRepositoryUrl(handle);
-// String taskId = RepositoryTaskHandleUtil.getTaskId(handle);
-
- BugzillaTask task = new BugzillaTask(null, null, null, false);
- super.readTaskInfo(task, taskList, element, parent, category);
-
+ BugzillaTask task = new BugzillaTask(repositoryUrl, taskId, summary, false);
return task;
}
@@ -135,16 +101,8 @@ public class BugzillaTaskExternalizer extends DelegatingTaskExternalizer {
}
@Override
- public void readQueryHit(Node node, TaskList taskList, AbstractRepositoryQuery query)
+ public AbstractQueryHit createQueryHit(String repositoryUrl, String taskId, String summary, Element element, TaskList taskList, AbstractRepositoryQuery query)
throws TaskExternalizationException {
- Element element = (Element) node;
-// String handle;
-// if (element.hasAttribute(KEY_HANDLE)) {
-// handle = element.getAttribute(KEY_HANDLE);
-// } else {
-// throw new TaskExternalizationException("Handle not stored for bug report");
-// }
-
String status = STATUS_NEW;
if (element.hasAttribute(KEY_COMPLETE)) {
status = element.getAttribute(KEY_COMPLETE);
@@ -152,8 +110,8 @@ public class BugzillaTaskExternalizer extends DelegatingTaskExternalizer {
status = STATUS_RESO;
}
}
- BugzillaQueryHit hit = new BugzillaQueryHit(taskList, "", "", query.getRepositoryUrl(), null, null, status);
- readQueryHitInfo(hit, taskList, query, element);
+ BugzillaQueryHit hit = new BugzillaQueryHit(taskList, summary, "", repositoryUrl, taskId, null, status);
+ return hit;
}
@Override

Back to the top