Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2008-03-15 03:28:32 -0400
committerspingel2008-03-15 03:28:32 -0400
commit5f4f9043eeffca01936ef0804d6d4abfb1b54223 (patch)
treeb37f5a10e563444750904184ed08032c2c5b7269
parent4582d73a3976408542f6d518df44e640ffc996cd (diff)
downloadorg.eclipse.mylyn.tasks-5f4f9043eeffca01936ef0804d6d4abfb1b54223.tar.gz
org.eclipse.mylyn.tasks-5f4f9043eeffca01936ef0804d6d4abfb1b54223.tar.xz
org.eclipse.mylyn.tasks-5f4f9043eeffca01936ef0804d6d4abfb1b54223.zip
NEW - bug 164037: [api] improve task editor input hierarchy
https://bugs.eclipse.org/bugs/show_bug.cgi?id=164037
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractRepositoryQuery.java1
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTask.java2
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryTaskData.java2
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepositoryManager.java7
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/OpenRepositoryTaskJob.java10
5 files changed, 16 insertions, 6 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractRepositoryQuery.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractRepositoryQuery.java
index ce66df477..ea34d8b42 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractRepositoryQuery.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractRepositoryQuery.java
@@ -28,6 +28,7 @@ public abstract class AbstractRepositoryQuery extends AbstractTaskContainer {
protected IStatus status = null;
+ // API 3.0 rename to getConnectorKind()
public abstract String getRepositoryKind();
public AbstractRepositoryQuery(String description) {
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTask.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTask.java
index 5b0938700..f80a6cc79 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTask.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTask.java
@@ -217,7 +217,6 @@ public abstract class AbstractTask extends AbstractTaskContainer {
*/
public abstract boolean isLocal();
- // API-3.0 rename to getRepositoryKind()
public abstract String getConnectorKind();
public String getLastReadTimeStamp() {
@@ -329,6 +328,7 @@ public abstract class AbstractTask extends AbstractTaskContainer {
@Override
public int hashCode() {
+ // API 3.0 REVIEW use immutable id for hashing?
return this.getHandleIdentifier().hashCode();
}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryTaskData.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryTaskData.java
index 6d048c905..f04dc634d 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryTaskData.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryTaskData.java
@@ -308,6 +308,7 @@ public final class RepositoryTaskData extends AttributeContainer implements Seri
}
}
+ // API 3.0 rename to getConnectorKind()
public String getRepositoryKind() {
return repositoryKind;
}
@@ -323,6 +324,7 @@ public final class RepositoryTaskData extends AttributeContainer implements Seri
}
}
+ // API 3.0 rename to getConnectorKind()
public String getTaskKind() {
return taskKind;
}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepositoryManager.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepositoryManager.java
index 7c7f5e2e9..4e2e7b1b5 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepositoryManager.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepositoryManager.java
@@ -408,4 +408,11 @@ public class TaskRepositoryManager {
return false;
}
+ /**
+ * @since 3.0
+ */
+ public TaskRepository getRepository(AbstractTask task) {
+ return getRepository(task.getConnectorKind(), task.getRepositoryUrl());
+ }
+
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/OpenRepositoryTaskJob.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/OpenRepositoryTaskJob.java
index ed060f829..9622a59bb 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/OpenRepositoryTaskJob.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/OpenRepositoryTaskJob.java
@@ -33,7 +33,7 @@ import org.eclipse.ui.PlatformUI;
*/
public class OpenRepositoryTaskJob extends Job {
- private final String serverUrl;
+ private final String repositoryUrl;
private final IWorkbenchPage page;
@@ -43,13 +43,13 @@ public class OpenRepositoryTaskJob extends Job {
private final String taskUrl;
- public OpenRepositoryTaskJob(String repositoryKind, String serverUrl, String taskId, String taskUrl,
+ public OpenRepositoryTaskJob(String repositoryKind, String repositoryUrl, String taskId, String taskUrl,
IWorkbenchPage page) {
super("Opening repository task " + taskId);
this.repositoryKind = repositoryKind;
this.taskId = taskId;
- this.serverUrl = serverUrl;
+ this.repositoryUrl = repositoryUrl;
this.taskUrl = taskUrl;
this.page = page;
}
@@ -57,12 +57,12 @@ public class OpenRepositoryTaskJob extends Job {
@Override
public IStatus run(IProgressMonitor monitor) {
monitor.beginTask("Opening Remote Task", 10);
- TaskRepository repository = TasksUiPlugin.getRepositoryManager().getRepository(repositoryKind, serverUrl);
+ TaskRepository repository = TasksUiPlugin.getRepositoryManager().getRepository(repositoryKind, repositoryUrl);
if (repository == null) {
PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
public void run() {
MessageDialog.openError(null, "Repository Not Found",
- "Could not find repository configuration for " + serverUrl
+ "Could not find repository configuration for " + repositoryUrl
+ ". \nPlease set up repository via " + TasksUiPlugin.LABEL_VIEW_REPOSITORIES + ".");
TasksUiUtil.openUrl(taskUrl, false);
}

Back to the top