Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2007-06-23 03:22:49 +0000
committermkersten2007-06-23 03:22:49 +0000
commit9672fd2b3025710361027bc641db39101543461d (patch)
tree0ae41b4d065ee1efe8084ca3aaa66938592c21e6
parent18c33e896b68521c9117927ef433c98b841699d2 (diff)
downloadorg.eclipse.mylyn.tasks-9672fd2b3025710361027bc641db39101543461d.tar.gz
org.eclipse.mylyn.tasks-9672fd2b3025710361027bc641db39101543461d.tar.xz
org.eclipse.mylyn.tasks-9672fd2b3025710361027bc641db39101543461d.zip
REOPENED - bug 149624: [api] AbstractRepositoryTask repositoryUrl and task id should not be derived from handleIdentifier
https://bugs.eclipse.org/bugs/show_bug.cgi?id=149624
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/RepositoryTaskHandleUtil.java7
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AttachmentJobTest.java6
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/DelegatingTaskExternalizer.java3
3 files changed, 6 insertions, 10 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/RepositoryTaskHandleUtil.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/RepositoryTaskHandleUtil.java
index 133233ec8..7c4132627 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/RepositoryTaskHandleUtil.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/RepositoryTaskHandleUtil.java
@@ -23,9 +23,9 @@ public class RepositoryTaskHandleUtil {
public static String getHandle(String repositoryUrl, String taskId) {
if (repositoryUrl == null) {
return MISSING_REPOSITORY + HANDLE_DELIM + taskId;
-// } else if (taskId.contains(HANDLE_DELIM)) {
-// throw new RuntimeException("invalid handle for task, can not contain: " + HANDLE_DELIM + ", was: "
-// + taskId);
+ } else if (taskId.contains(HANDLE_DELIM)) {
+ throw new RuntimeException("invalid handle for task, can not contain: " + HANDLE_DELIM + ", was: "
+ + taskId);
} else {
return repositoryUrl + HANDLE_DELIM + taskId;
}
@@ -40,7 +40,6 @@ public class RepositoryTaskHandleUtil {
return url;
}
- // @Deprecated
public static String getTaskId(String taskHandle) {
int index = taskHandle.lastIndexOf(HANDLE_DELIM);
if (index != -1) {
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AttachmentJobTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AttachmentJobTest.java
index deeedb4fc..7bb867ed2 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AttachmentJobTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AttachmentJobTest.java
@@ -14,9 +14,9 @@ import java.io.RandomAccessFile;
import junit.framework.TestCase;
import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.internal.monitor.core.util.StatusManager;
import org.eclipse.mylyn.internal.tasks.ui.actions.CopyAttachmentToClipboardJob;
import org.eclipse.mylyn.internal.tasks.ui.actions.DownloadAttachmentJob;
+import org.eclipse.mylyn.monitor.core.StatusHandler;
import org.eclipse.mylyn.tasks.core.RepositoryAttachment;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.core.TaskRepositoryManager;
@@ -64,7 +64,7 @@ public class AttachmentJobTest extends TestCase {
manager.addRepositoryConnector(connector);
statusHandler = new MockStatusHandler();
- StatusManager.addStatusHandler(statusHandler);
+ StatusHandler.addStatusHandler(statusHandler);
attachment = new RepositoryAttachment(null);
attachment.setRepositoryKind(repository.getConnectorKind());
@@ -74,7 +74,7 @@ public class AttachmentJobTest extends TestCase {
@Override
protected void tearDown() throws Exception {
if (statusHandler != null) {
- StatusManager.removeStatusHandler(statusHandler);
+ StatusHandler.removeStatusHandler(statusHandler);
}
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/DelegatingTaskExternalizer.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/DelegatingTaskExternalizer.java
index 6b5d504b6..44f6f191b 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/DelegatingTaskExternalizer.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/DelegatingTaskExternalizer.java
@@ -327,9 +327,6 @@ final class DelegatingTaskExternalizer {
}
}
- /**
- * First tries to use a delegate externalizer to read, if none available, reads itself.
- */
public final AbstractTask readTask(Node node, TaskList taskList, AbstractTaskCategory category, AbstractTask parent)
throws TaskExternalizationException {
AbstractTask task = null;

Back to the top