Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2007-02-10 00:14:08 -0500
committermkersten2007-02-10 00:14:08 -0500
commit92fe8cfe25f29d9d1e4fc20d277cfd64ccd974ea (patch)
treeeffe02a4dd88f8a712827a579f03599babf79341 /org.eclipse.mylyn.bugzilla.ui
parent3ee272a24ffae8d7f061a43228926c30551af8ff (diff)
downloadorg.eclipse.mylyn.tasks-92fe8cfe25f29d9d1e4fc20d277cfd64ccd974ea.tar.gz
org.eclipse.mylyn.tasks-92fe8cfe25f29d9d1e4fc20d277cfd64ccd974ea.tar.xz
org.eclipse.mylyn.tasks-92fe8cfe25f29d9d1e4fc20d277cfd64ccd974ea.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/BugzillaHyperLink.java4
-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/OfflineView.java12
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java4
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskExternalizer.java53
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/NewBugzillaTaskWizard.java4
6 files changed, 38 insertions, 41 deletions
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaHyperLink.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaHyperLink.java
index bf28e01ce..d7787cfdb 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaHyperLink.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaHyperLink.java
@@ -21,7 +21,7 @@ import org.eclipse.mylar.tasks.ui.TasksUiUtil;
*/
public class BugzillaHyperLink implements IHyperlink {
- private static final String SHOW_BUG_CGI = "/show_bug.cgi?id=";
+ private static final String SHOW_BUG_CGI = "/show_bug.cgi?taskId=";
private IRegion region;
@@ -57,7 +57,7 @@ public class BugzillaHyperLink implements IHyperlink {
TasksUiUtil.openRepositoryTask(repositoryUrl, id, repositoryUrl + IBugzillaConstants.URL_GET_SHOW_BUG
+ id);
// OpenBugzillaReportJob job = new
- // OpenBugzillaReportJob(repository.getUrl(), id);
+ // OpenBugzillaReportJob(repository.getUrl(), taskId);
// IProgressService service =
// PlatformUI.getWorkbench().getProgressService();
// try {
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 1bf47f9f5..fef8c8740 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
@@ -48,7 +48,7 @@ public class BugzillaUiPlugin extends AbstractUIPlugin {
public static final String EDITOR_PAGE_CONTEXT = BugzillaUiPlugin.PLUGIN_ID + ".bugzillaEditorContext";
// The is's for hit markers used in the label provider and sorters
- public static final String HIT_MARKER_ATTR_ID = "id";
+ public static final String HIT_MARKER_ATTR_ID = "taskId";
public static final String HIT_MARKER_ATTR_REPOSITORY = "repository";
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/OfflineView.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/OfflineView.java
index a4c0b0244..4ecd5c60e 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/OfflineView.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/OfflineView.java
@@ -354,8 +354,8 @@
// if (descriptors.length > 0) {
// int[] objList = new int[descriptors.length];
// for (int nX = 0; nX < descriptors.length; nX++) {
-// String id = descriptors[nX].getID();
-// objList[nX] = BugzillaPlugin.getDefault().getOfflineReports().find(Integer.valueOf(id).intValue());
+// String taskId = descriptors[nX].getID();
+// objList[nX] = BugzillaPlugin.getDefault().getOfflineReports().find(Integer.valueOf(taskId).intValue());
// }
// table.setSelection(objList);
// }
@@ -382,9 +382,9 @@
// Object o = itr.next();
// if (o instanceof IBugzillaBug) {
// IBugzillaBug entry = (IBugzillaBug) o;
-// Integer id = entry.getId();
+// Integer taskId = entry.getId();
// if (!entry.isLocallyCreated()) {
-// Ids.add(id);
+// Ids.add(taskId);
// }
// }
// }
@@ -490,14 +490,14 @@
// // If this bug has not been saved offline before, add it to the
// // file.
// else {
-// // If there is already an offline report with the same id,
+// // If there is already an offline report with the same taskId,
// // don't save this report.
// // int index = -1;
// // if ((index = file.find(bug.getId())) >= 0) {
// // removeReport(getOfflineBugs().get(index));
// // MessageDialog.openInformation(null, "Bug's Id is already
// // used.", "There is already a bug saved offline with an
-// // identical id.");
+// // identical taskId.");
// // return;
// // }
// try {
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java
index abe7481d1..1009e0072 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java
@@ -262,7 +262,7 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
// Info text
label = new Label(group, SWT.LEFT);
- label.setText("Summary/id contains: ");
+ label.setText("Summary/taskId contains: ");
gd = new GridData(GridData.BEGINNING);
gd.horizontalSpan = 1;
label.setLayoutData(gd);
@@ -1242,7 +1242,7 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
// --------------- Configuration handling --------------
- // Dialog store id constants
+ // Dialog store taskId constants
protected final static String PAGE_NAME = "BugzillaSearchPage"; //$NON-NLS-1$
private static final String STORE_PRODUCT_ID = PAGE_NAME + ".PRODUCT";
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 b5716745e..1d2f098df 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,7 +14,6 @@ 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.AbstractTaskContainer;
import org.eclipse.mylar.tasks.core.DelegatingTaskExternalizer;
@@ -108,23 +107,23 @@ public class BugzillaTaskExternalizer extends DelegatingTaskExternalizer {
public ITask readTask(Node node, 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 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);
- String repositoryUrl = RepositoryTaskHandleUtil.getRepositoryUrl(handle);
- String taskId = RepositoryTaskHandleUtil.getTaskId(handle);
-
- BugzillaTask task = new BugzillaTask(repositoryUrl, taskId, label, false);
+ BugzillaTask task = new BugzillaTask(null, null, null, false);
super.readTaskInfo(task, taskList, element, parent, category);
return task;
@@ -139,23 +138,21 @@ public class BugzillaTaskExternalizer extends DelegatingTaskExternalizer {
public void readQueryHit(Node node, TaskList taskList, AbstractRepositoryQuery query)
throws TaskExternalizationException {
Element element = (Element) node;
- String handle;
- String status;
- if (element.hasAttribute(KEY_HANDLE)) {
- handle = element.getAttribute(KEY_HANDLE);
- } else {
- throw new TaskExternalizationException("Handle not stored for bug report");
- }
-
- status = STATUS_NEW;
+// 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);
if (status.equals(VAL_TRUE)) {
status = STATUS_RESO;
}
}
- BugzillaQueryHit hit = new BugzillaQueryHit(taskList, "", "", query.getRepositoryUrl(), RepositoryTaskHandleUtil
- .getTaskId(handle), null, status);
+ BugzillaQueryHit hit = new BugzillaQueryHit(taskList, "", "", query.getRepositoryUrl(), null, null, status);
readQueryHitInfo(hit, taskList, query, element);
}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/NewBugzillaTaskWizard.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/NewBugzillaTaskWizard.java
index 46c836bcd..6d2eb04a9 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/NewBugzillaTaskWizard.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/NewBugzillaTaskWizard.java
@@ -130,13 +130,13 @@ public class NewBugzillaTaskWizard extends Wizard implements INewWizard {
// }
// } catch (NumberFormatException nfe) {
// MessageDialog.openError(null, IBugzillaConstants.TITLE_MESSAGE_DIALOG,
-// "Could not create bug id, no valid id");
+// "Could not create bug taskId, no valid taskId");
// return false;
// }
// // if (!validId) {
// // MessageDialog.openError(null,
// // IBugzillaConstants.TITLE_MESSAGE_DIALOG,
-// // "Could not create bug id, no valid id");
+// // "Could not create bug taskId, no valid taskId");
// // return false;
// // }
//

Back to the top