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
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
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskEditorFactory.java1
-rw-r--r--org.eclipse.mylyn.help.ui/doc/new.html1
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskList.java18
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiUtil.java13
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskFormPage.java40
5 files changed, 20 insertions, 53 deletions
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskEditorFactory.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskEditorFactory.java
index 8e91299f5..28dcc3529 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskEditorFactory.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskEditorFactory.java
@@ -56,7 +56,6 @@ public class BugzillaTaskEditorFactory implements ITaskEditorFactory {
BugzillaCorePlugin.REPOSITORY_KIND, bugzillaTask.getRepositoryUrl());
BugzillaTaskEditorInput input = new BugzillaTaskEditorInput(repository, bugzillaTask, true);
return input;
-
}
return null;
}
diff --git a/org.eclipse.mylyn.help.ui/doc/new.html b/org.eclipse.mylyn.help.ui/doc/new.html
index baa3bada6..563db1fa6 100644
--- a/org.eclipse.mylyn.help.ui/doc/new.html
+++ b/org.eclipse.mylyn.help.ui/doc/new.html
@@ -160,6 +160,7 @@ synchronize all tasks.<br>
<li>Conflict state in editor and what it means (incoming & outgoing at same time)</li>
<li>Use 'Clear outgoing' to discard unsubmitted changes</li>
<li>Drag URLs to create repository tasks</li>
+<li>Hyperlinks in bug editor, repository must be set on project</li>
</ul>
<hr>
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) {
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiUtil.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiUtil.java
index a8af657f4..ffc5b2119 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiUtil.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiUtil.java
@@ -137,21 +137,10 @@ public class TasksUiUtil {
boolean opened = false;
ITask task = null;
if (taskId != null) {
- // String handle = AbstractRepositoryTask.getHandle(repositoryUrl,
- // taskId);
task = TasksUiPlugin.getTaskListManager().getTaskList().getTask(repositoryUrl, taskId);
}
if (task == null) {
- // search for it
- for (ITask currTask : TasksUiPlugin.getTaskListManager().getTaskList().getAllTasks()) {
- if (currTask instanceof AbstractRepositoryTask) {
- String currUrl = ((AbstractRepositoryTask) currTask).getTaskUrl();
- if (currUrl != null && !currUrl.equals("") && currUrl.equals(fullUrl)) {
- task = currTask;
- break;
- }
- }
- }
+ task = TasksUiPlugin.getTaskListManager().getTaskList().getRepositoryTask(fullUrl);
}
if (task != null) {
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskFormPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskFormPage.java
index 2206b9067..30cb2f5a4 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskFormPage.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskFormPage.java
@@ -234,46 +234,6 @@ public class TaskFormPage extends FormPage {
return false;
}
- // protected Text addTextBox(Composite composite, String text, int style) {
- // if (actionContributor == null) {
- // actionContributor = ((TaskEditor) getEditor()).getContributor();
- // }
- //
- // final Text textBox =
- // this.getManagedForm().getToolkit().createText(composite, text);
- // textBox.addFocusListener(new FocusListener() {
- //
- // public void focusGained(FocusEvent e) {
- //
- // //
- // actionContributor.registerGlobalHandlers(getEditorSite().getActionBars());
- //
- // actionContributor.updateSelectableActions(null);
- //
- // }
- //
- // public void focusLost(FocusEvent e) {
- // textBox.setSelection(0, 0);
- // //
- // actionContributor.unregisterGlobalHandlers(getEditorSite().getActionBars());
- //
- // }
- // });
- //
- // textBox.addKeyListener(new KeyListener() {
- //
- // public void keyPressed(KeyEvent e) {
- // // ignore
- //
- // }
- //
- // public void keyReleased(KeyEvent e) {
- // actionContributor.updateSelectableActions(null);
- // }
- // });
- // return textBox;
- // }
-
/**
* Text viewer generally used for displaying non-editable text. No
* annotation model or spell checking support. Supports cut/copy/paste/etc..

Back to the top