Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2008-05-06 04:30:34 -0400
committerspingel2008-05-06 04:30:34 -0400
commitb0349340caed391629bb3c178370849d63901b8a (patch)
tree75b4a34f75a4e381aef2a5c93069e19c66070291
parentbf19e98ee4c2a7545bac2ed1a49fa50b5854e19f (diff)
downloadorg.eclipse.mylyn.tasks-b0349340caed391629bb3c178370849d63901b8a.tar.gz
org.eclipse.mylyn.tasks-b0349340caed391629bb3c178370849d63901b8a.tar.xz
org.eclipse.mylyn.tasks-b0349340caed391629bb3c178370849d63901b8a.zip
NEW - bug 229487: [api] manage task list structure internally
https://bugs.eclipse.org/bugs/show_bug.cgi?id=229487
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClientManager.java1
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java4
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxBugzillaQueryContentHandler.java4
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskListStandaloneTest.java2
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskListFactory.java2
-rw-r--r--org.eclipse.mylyn.help.ui/src/org/eclipse/mylyn/internal/help/ui/dialogs/UiLegendDialog.java2
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/AbstractRepositoryQuery.java4
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/AbstractTask.java106
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/AbstractTaskContainer.java4
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalRepositoryConnector.java2
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalTaskListFactory.java2
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskTask.java33
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/UncategorizedTaskContainer.java2
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/UnmatchedTaskContainer.java2
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataExternalizer.java2
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataStateReader.java2
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AbstractLegacyRepositoryConnector.java43
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AbstractTaskListFactory.java (renamed from org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskListFactory.java)3
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/DefaultTaskSchema.java2
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/DelegatingTaskExternalizer.java4
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/TaskListExternalizer.java2
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SubmitTaskAttachmentJob.java2
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SubmitTaskJob.java14
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeQueriesJob.java3
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeTasksJob.java8
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractRepositoryConnector.java158
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITask.java111
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskMapper.java2
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/QueryExportImportTest.java2
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListUiTest.java2
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskTest.java6
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TasksUiUtilTest.java2
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockRepositoryConnector.java2
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockTaskListFactory.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/schema/repositories.exsd60
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskPriorityFilter.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiImages.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewSubTaskAction.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskPlanningEditor.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchHitCollector.java3
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/DelegatingTaskExternalizer.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskListElementImporter.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiExtensionReader.java14
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiInternal.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/PriorityDropDownAction.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskActivityLabelProvider.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskElementLabelProvider.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/AbstractRepositoryConnectorUi.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiUtil.java4
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryConnector.java2
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracTask.java2
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracTaskListFactory.java2
54 files changed, 363 insertions, 296 deletions
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClientManager.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClientManager.java
index 3f58b9451..066c5d4cd 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClientManager.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClientManager.java
@@ -14,7 +14,6 @@ import java.util.Map;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.mylyn.tasks.core.ITaskRepositoryListener;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.core.TaskRepositoryAdapter;
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java
index b14ae1d35..0541136f8 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java
@@ -29,7 +29,6 @@ import org.eclipse.mylyn.commons.core.StatusHandler;
import org.eclipse.mylyn.commons.net.Policy;
import org.eclipse.mylyn.internal.tasks.core.AbstractRepositoryQuery;
import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask.PriorityLevel;
import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractAttachmentHandler;
import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractLegacyRepositoryConnector;
import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractTaskDataHandler;
@@ -41,6 +40,7 @@ import org.eclipse.mylyn.internal.tasks.core.deprecated.TaskComment;
import org.eclipse.mylyn.tasks.core.ITask;
import org.eclipse.mylyn.tasks.core.ITaskList;
import org.eclipse.mylyn.tasks.core.TaskRepository;
+import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
import org.eclipse.mylyn.tasks.core.data.TaskDataCollector;
import org.eclipse.mylyn.tasks.core.sync.SynchronizationContext;
@@ -530,7 +530,7 @@ public class BugzillaRepositoryConnector extends AbstractLegacyRepositoryConnect
}
@Override
- public RepositoryTaskData getTaskData(TaskRepository repository, String taskId, IProgressMonitor monitor)
+ public RepositoryTaskData getLegacyTaskData(TaskRepository repository, String taskId, IProgressMonitor monitor)
throws CoreException {
return getLegacyTaskDataHandler().getTaskData(repository, taskId, monitor);
}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxBugzillaQueryContentHandler.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxBugzillaQueryContentHandler.java
index acd936ae7..00f090b02 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxBugzillaQueryContentHandler.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxBugzillaQueryContentHandler.java
@@ -10,10 +10,10 @@ package org.eclipse.mylyn.internal.bugzilla.core;
import java.util.Locale;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
import org.eclipse.mylyn.internal.tasks.core.deprecated.LegacyTaskDataCollector;
import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskAttribute;
import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
+import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;
@@ -32,7 +32,7 @@ public class SaxBugzillaQueryContentHandler extends DefaultHandler {
private String description = "";
/** The priority of the bug */
- private String priority = AbstractTask.PriorityLevel.getDefault().toString();
+ private String priority = PriorityLevel.getDefault().toString();
private String owner = "";
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskListStandaloneTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskListStandaloneTest.java
index 8f3b3840c..576222ba5 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskListStandaloneTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskListStandaloneTest.java
@@ -22,9 +22,9 @@ import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants;
import org.eclipse.mylyn.internal.bugzilla.ui.tasklist.BugzillaTaskListFactory;
import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
import org.eclipse.mylyn.internal.tasks.core.LocalTask;
+import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractTaskListFactory;
import org.eclipse.mylyn.internal.tasks.ui.TaskListManager;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.AbstractTaskListFactory;
import org.eclipse.mylyn.tasks.core.ITask;
/**
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskListFactory.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskListFactory.java
index 124bc32a3..5dda46f5b 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskListFactory.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskListFactory.java
@@ -15,7 +15,7 @@ import org.eclipse.mylyn.internal.bugzilla.core.BugzillaRepositoryQuery;
import org.eclipse.mylyn.internal.bugzilla.core.BugzillaTask;
import org.eclipse.mylyn.internal.tasks.core.AbstractRepositoryQuery;
import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskListFactory;
+import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractTaskListFactory;
import org.eclipse.mylyn.tasks.core.ITask;
import org.w3c.dom.Element;
diff --git a/org.eclipse.mylyn.help.ui/src/org/eclipse/mylyn/internal/help/ui/dialogs/UiLegendDialog.java b/org.eclipse.mylyn.help.ui/src/org/eclipse/mylyn/internal/help/ui/dialogs/UiLegendDialog.java
index 0e5d67120..74c52ef08 100644
--- a/org.eclipse.mylyn.help.ui/src/org/eclipse/mylyn/internal/help/ui/dialogs/UiLegendDialog.java
+++ b/org.eclipse.mylyn.help.ui/src/org/eclipse/mylyn/internal/help/ui/dialogs/UiLegendDialog.java
@@ -18,13 +18,13 @@ import org.eclipse.mylyn.internal.provisional.commons.ui.CommonFonts;
import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
import org.eclipse.mylyn.internal.provisional.commons.ui.CommonThemes;
import org.eclipse.mylyn.internal.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask.PriorityLevel;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.mylyn.internal.tasks.ui.views.TaskElementLabelProvider;
import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
import org.eclipse.mylyn.tasks.core.ITaskElement;
+import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
import org.eclipse.mylyn.tasks.ui.TasksUi;
import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/AbstractRepositoryQuery.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/AbstractRepositoryQuery.java
index ca0a8f4cd..c00310dd0 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/AbstractRepositoryQuery.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/AbstractRepositoryQuery.java
@@ -8,8 +8,8 @@
package org.eclipse.mylyn.internal.tasks.core;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask.PriorityLevel;
import org.eclipse.mylyn.tasks.core.ITask;
+import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
/**
* A container that stores tasks from a specific repository.
@@ -41,7 +41,7 @@ public abstract class AbstractRepositoryQuery extends AbstractTaskContainer {
@Override
public String getPriority() {
if (super.isEmpty()) {
- return AbstractTask.PriorityLevel.P1.toString();
+ return PriorityLevel.P1.toString();
}
String highestPriority = PriorityLevel.P5.toString();
for (ITask hit : getChildren()) {
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/AbstractTask.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/AbstractTask.java
index 2c258df3c..1be3d9067 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/AbstractTask.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/AbstractTask.java
@@ -86,112 +86,6 @@ public abstract class AbstractTask extends AbstractTaskContainer implements ITas
private boolean markReadPending;
- public enum PriorityLevel {
- P1, P2, P3, P4, P5;
-
- @Override
- public String toString() {
- switch (this) {
- case P1:
- return "P1";
- case P2:
- return "P2";
- case P3:
- return "P3";
- case P4:
- return "P4";
- case P5:
- return "P5";
- default:
- return "P3";
- }
- }
-
- public String getDescription() {
- switch (this) {
- case P1:
- return "Very High";
- case P2:
- return "High";
- case P3:
- return "Normal";
- case P4:
- return "Low";
- case P5:
- return "Very Low";
- default:
- return "";
- }
- }
-
- /**
- * @since 2.3
- */
- public static PriorityLevel fromLevel(int level) {
- if (level <= 1) {
- return P1;
- }
- if (level == 2) {
- return P2;
- }
- if (level == 3) {
- return P3;
- }
- if (level == 4) {
- return P4;
- }
- if (level >= 5) {
- return P5;
- }
- return getDefault();
- }
-
- public static PriorityLevel fromString(String string) {
- if (string.equals("P1")) {
- return P1;
- }
- if (string.equals("P2")) {
- return P2;
- }
- if (string.equals("P3")) {
- return P3;
- }
- if (string.equals("P4")) {
- return P4;
- }
- if (string.equals("P5")) {
- return P5;
- }
- return getDefault();
- }
-
- public static PriorityLevel fromDescription(String string) {
- if (string == null) {
- return null;
- }
- if (string.equals("Very High")) {
- return P1;
- }
- if (string.equals("High")) {
- return P2;
- }
- if (string.equals("Normal")) {
- return P3;
- }
- if (string.equals("Low")) {
- return P4;
- }
- if (string.equals("Very Low")) {
- return P5;
- }
- return getDefault();
- }
-
- public static PriorityLevel getDefault() {
- return P3;
- }
- }
-
public AbstractTask(String repositoryUrl, String taskId, String summary) {
super(RepositoryTaskHandleUtil.getHandle(repositoryUrl, taskId));
this.repositoryUrl = repositoryUrl;
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/AbstractTaskContainer.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/AbstractTaskContainer.java
index ba12e1529..077cf3c17 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/AbstractTaskContainer.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/AbstractTaskContainer.java
@@ -15,9 +15,9 @@ import java.util.concurrent.CopyOnWriteArrayList;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask.PriorityLevel;
import org.eclipse.mylyn.tasks.core.ITask;
import org.eclipse.mylyn.tasks.core.ITaskElement;
+import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
/**
* Top-level Task List element that can contain other Task List elements.
@@ -158,7 +158,7 @@ public abstract class AbstractTaskContainer extends PlatformObject implements IT
}
public String getPriority() {
- String highestPriority = AbstractTask.PriorityLevel.P5.toString();
+ String highestPriority = PriorityLevel.P5.toString();
Collection<ITask> tasks = getChildren();
if (tasks.isEmpty()) {
return PriorityLevel.P1.toString();
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalRepositoryConnector.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalRepositoryConnector.java
index c290b0d78..0c5157379 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalRepositoryConnector.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalRepositoryConnector.java
@@ -113,7 +113,7 @@ public class LocalRepositoryConnector extends AbstractLegacyRepositoryConnector
}
@Override
- public RepositoryTaskData getTaskData(TaskRepository repository, String taskId, IProgressMonitor monitor)
+ public RepositoryTaskData getLegacyTaskData(TaskRepository repository, String taskId, IProgressMonitor monitor)
throws CoreException {
return null;
}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalTaskListFactory.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalTaskListFactory.java
index ea3066ba9..0acf48978 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalTaskListFactory.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalTaskListFactory.java
@@ -8,7 +8,7 @@
package org.eclipse.mylyn.internal.tasks.core;
-import org.eclipse.mylyn.tasks.core.AbstractTaskListFactory;
+import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractTaskListFactory;
import org.eclipse.mylyn.tasks.core.ITask;
import org.w3c.dom.Element;
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskTask.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskTask.java
new file mode 100644
index 000000000..2f1b0de6f
--- /dev/null
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskTask.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 Mylyn project committers and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+
+package org.eclipse.mylyn.internal.tasks.core;
+
+/**
+ * @author Steffen Pingel
+ */
+public class TaskTask extends AbstractTask {
+
+ private final String connectorKind;
+
+ public TaskTask(String connectorKind, String repositoryUrl, String taskId) {
+ super(repositoryUrl, taskId, "");
+ this.connectorKind = connectorKind;
+ }
+
+ @Override
+ public String getConnectorKind() {
+ return connectorKind;
+ }
+
+ @Override
+ public boolean isLocal() {
+ return false;
+ }
+
+}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/UncategorizedTaskContainer.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/UncategorizedTaskContainer.java
index a2c2e7a92..ec4682c20 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/UncategorizedTaskContainer.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/UncategorizedTaskContainer.java
@@ -8,7 +8,7 @@
package org.eclipse.mylyn.internal.tasks.core;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask.PriorityLevel;
+import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
/**
* Category created for the user to hold uncategorized tasks.
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/UnmatchedTaskContainer.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/UnmatchedTaskContainer.java
index cc93f4fd6..30e63afb8 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/UnmatchedTaskContainer.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/UnmatchedTaskContainer.java
@@ -8,8 +8,8 @@
package org.eclipse.mylyn.internal.tasks.core;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask.PriorityLevel;
import org.eclipse.mylyn.tasks.core.ITask;
+import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
/**
* Holds orphaned or uncategorized tasks for a given repository
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataExternalizer.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataExternalizer.java
index 8ae1aebc4..8add1dec5 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataExternalizer.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataExternalizer.java
@@ -59,7 +59,7 @@ public class TaskDataExternalizer {
throw new IOException("Repository \"" + repositoryUrl + "\" not found for kind \"" + connectorKind + "\"");
}
- AbstractTaskDataHandler taskDataHandler = connector.getTaskDataHandler2();
+ AbstractTaskDataHandler taskDataHandler = connector.getTaskDataHandler();
if (taskDataHandler != null) {
if (taskDataState.getLastReadData() != null) {
taskDataHandler.migrateTaskData(taskRepository, taskDataState.getLastReadData());
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataStateReader.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataStateReader.java
index cd415f7c5..a017d54ca 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataStateReader.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataStateReader.java
@@ -594,7 +594,7 @@ public class TaskDataStateReader extends DefaultHandler {
}
final TaskAttributeMapper attributeMapper;
- AbstractTaskDataHandler taskDataHandler = connector.getTaskDataHandler2();
+ AbstractTaskDataHandler taskDataHandler = connector.getTaskDataHandler();
if (taskDataHandler != null) {
attributeMapper = taskDataHandler.getAttributeMapper(taskRepository);
} else {
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AbstractLegacyRepositoryConnector.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AbstractLegacyRepositoryConnector.java
index 2b6368161..6488ceb34 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AbstractLegacyRepositoryConnector.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AbstractLegacyRepositoryConnector.java
@@ -28,6 +28,7 @@ import org.eclipse.mylyn.tasks.core.ITaskList;
import org.eclipse.mylyn.tasks.core.RepositoryTemplate;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState;
+import org.eclipse.mylyn.tasks.core.data.TaskData;
import org.eclipse.mylyn.tasks.core.data.TaskDataCollector;
import org.eclipse.mylyn.tasks.core.sync.SynchronizationContext;
@@ -55,7 +56,7 @@ public abstract class AbstractLegacyRepositoryConnector extends AbstractReposito
@Deprecated
protected ITaskList taskList;
- private final boolean userManaged = true;
+ private boolean userManaged = true;
/**
* @since 3.0
@@ -159,7 +160,6 @@ public abstract class AbstractLegacyRepositoryConnector extends AbstractReposito
*
* @return instance of AbstractTask
*/
- @Override
@Deprecated
public abstract AbstractTask createTask(String repositoryUrl, String id, String summary);
@@ -367,7 +367,7 @@ public abstract class AbstractLegacyRepositoryConnector extends AbstractReposito
}
@Deprecated
- public RepositoryTaskData getTaskData(TaskRepository repository, String taskId, IProgressMonitor monitor)
+ public RepositoryTaskData getLegacyTaskData(TaskRepository repository, String taskId, IProgressMonitor monitor)
throws CoreException {
if (getLegacyTaskDataHandler() != null) {
return getLegacyTaskDataHandler().getTaskData(repository, taskId, monitor);
@@ -375,4 +375,41 @@ public abstract class AbstractLegacyRepositoryConnector extends AbstractReposito
throw new UnsupportedOperationException();
}
+ public void setUserManaged(boolean userManaged) {
+ this.userManaged = userManaged;
+ }
+
+ /**
+ * If false, user is unable to manipulate (i.e. rename/delete), no preferences are available.
+ */
+ @Override
+ public boolean isUserManaged() {
+ return userManaged;
+ }
+
+ /**
+ * @since 3.0
+ */
+ @Override
+ public boolean hasChanged(ITask task, TaskData taskData) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @since 3.0
+ */
+ @Override
+ public void updateTaskFromTaskData(TaskRepository repository, ITask task, TaskData taskData) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @since 3.0
+ */
+ @Override
+ public TaskData getTaskData(TaskRepository taskRepository, String taskId, IProgressMonitor monitor)
+ throws CoreException {
+ throw new UnsupportedOperationException();
+ }
+
}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskListFactory.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AbstractTaskListFactory.java
index 8f14bf965..b0425eb8b 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskListFactory.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AbstractTaskListFactory.java
@@ -6,13 +6,14 @@
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
-package org.eclipse.mylyn.tasks.core;
+package org.eclipse.mylyn.internal.tasks.core.deprecated;
import java.util.Collections;
import java.util.Set;
import org.eclipse.mylyn.internal.tasks.core.AbstractRepositoryQuery;
import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
+import org.eclipse.mylyn.tasks.core.ITask;
import org.w3c.dom.Element;
/**
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/DefaultTaskSchema.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/DefaultTaskSchema.java
index a968d88db..5082b29c7 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/DefaultTaskSchema.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/DefaultTaskSchema.java
@@ -11,8 +11,8 @@ package org.eclipse.mylyn.internal.tasks.core.deprecated;
import java.util.Date;
import org.eclipse.core.runtime.Assert;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask.PriorityLevel;
import org.eclipse.mylyn.tasks.core.ITask;
+import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
/**
* @author Steffen Pingel
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/DelegatingTaskExternalizer.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/DelegatingTaskExternalizer.java
index 110427ff7..4e4af6a0b 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/DelegatingTaskExternalizer.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/DelegatingTaskExternalizer.java
@@ -33,10 +33,10 @@ import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
import org.eclipse.mylyn.internal.tasks.core.TaskExternalizationException;
import org.eclipse.mylyn.internal.tasks.core.TaskList;
import org.eclipse.mylyn.internal.tasks.core.UncategorizedTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask.PriorityLevel;
-import org.eclipse.mylyn.tasks.core.AbstractTaskListFactory;
+import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractTaskListFactory;
import org.eclipse.mylyn.tasks.core.ITask;
import org.eclipse.mylyn.tasks.core.ITaskElement;
+import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/TaskListExternalizer.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/TaskListExternalizer.java
index 1470b9ee8..9e6cbda0f 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/TaskListExternalizer.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/TaskListExternalizer.java
@@ -46,7 +46,7 @@ import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
import org.eclipse.mylyn.internal.tasks.core.LocalTask;
import org.eclipse.mylyn.internal.tasks.core.TaskExternalizationException;
import org.eclipse.mylyn.internal.tasks.core.TaskList;
-import org.eclipse.mylyn.tasks.core.AbstractTaskListFactory;
+import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractTaskListFactory;
import org.eclipse.mylyn.tasks.core.ITaskElement;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SubmitTaskAttachmentJob.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SubmitTaskAttachmentJob.java
index 4a6cbd09d..1efe0a79e 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SubmitTaskAttachmentJob.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SubmitTaskAttachmentJob.java
@@ -84,7 +84,7 @@ public class SubmitTaskAttachmentJob extends SubmitJob {
Policy.subMonitorFor(monitor, 100));
fireTaskSubmitted(monitor);
monitor.subTask("Updating task");
- TaskData taskData = connector.getTaskData2(taskRepository, task.getTaskId(), Policy.subMonitorFor(monitor,
+ TaskData taskData = connector.getTaskData(taskRepository, task.getTaskId(), Policy.subMonitorFor(monitor,
100));
taskDataManager.putUpdatedTaskData(task, taskData, true);
fireTaskSynchronized(monitor);
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SubmitTaskJob.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SubmitTaskJob.java
index 5840ed55c..cb6316aae 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SubmitTaskJob.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SubmitTaskJob.java
@@ -16,6 +16,8 @@ import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Status;
import org.eclipse.mylyn.commons.net.Policy;
import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
+import org.eclipse.mylyn.internal.tasks.core.TaskTask;
+import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractLegacyRepositoryConnector;
import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
import org.eclipse.mylyn.tasks.core.ITask;
import org.eclipse.mylyn.tasks.core.RepositoryResponse;
@@ -65,7 +67,7 @@ public class SubmitTaskJob extends SubmitJob {
monitor.beginTask("Submitting task", 2 * (1 + getSubmitJobListeners().length) * 100);
// post task data
- AbstractTaskDataHandler taskDataHandler = connector.getTaskDataHandler2();
+ AbstractTaskDataHandler taskDataHandler = connector.getTaskDataHandler();
monitor.subTask("Sending data");
response = taskDataHandler.postTaskData(taskRepository, taskData, changedAttributes, Policy.subMonitorFor(
monitor, 100));
@@ -79,7 +81,7 @@ public class SubmitTaskJob extends SubmitJob {
// update task in task list
String taskId = response.getTaskId();
monitor.subTask("Receiving data");
- TaskData updatedTaskData = connector.getTaskData2(taskRepository, taskId,
+ TaskData updatedTaskData = connector.getTaskData(taskRepository, taskId,
Policy.subMonitorFor(monitor, 100));
task = createTask(monitor, updatedTaskData);
taskDataManager.putSubmittedTaskData(task, updatedTaskData);
@@ -99,7 +101,13 @@ public class SubmitTaskJob extends SubmitJob {
private ITask createTask(IProgressMonitor monitor, TaskData updatedTaskData) throws CoreException {
if (taskData.isNew()) {
- task = connector.createTask(taskRepository.getRepositoryUrl(), updatedTaskData.getTaskId(), "");
+ if (connector instanceof AbstractLegacyRepositoryConnector) {
+ task = ((AbstractLegacyRepositoryConnector) connector).createTask(taskRepository.getRepositoryUrl(),
+ updatedTaskData.getTaskId(), "");
+ } else {
+ task = new TaskTask(connector.getConnectorKind(), taskRepository.getRepositoryUrl(),
+ updatedTaskData.getTaskId());
+ }
}
return task;
}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeQueriesJob.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeQueriesJob.java
index 8a6f3d0e6..83863a3ad 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeQueriesJob.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeQueriesJob.java
@@ -87,7 +87,8 @@ public class SynchronizeQueriesJob extends SynchronizationJob {
boolean changed;
AbstractTask task = taskList.getTask(taskData.getRepositoryUrl(), taskData.getTaskId());
if (task == null) {
- task = connector.createTask(taskData.getRepositoryUrl(), taskData.getTaskId(), "");
+ task = ((AbstractLegacyRepositoryConnector) connector).createTask(taskData.getRepositoryUrl(),
+ taskData.getTaskId(), "");
task.setStale(true);
changed = ((AbstractLegacyRepositoryConnector) connector).updateTaskFromTaskData(repository, task,
taskData);
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeTasksJob.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeTasksJob.java
index 48bd8099f..1035f80c1 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeTasksJob.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeTasksJob.java
@@ -104,7 +104,7 @@ public class SynchronizeTasksJob extends SynchronizationJob {
AbstractTaskDataHandler taskDataHandler = ((AbstractLegacyRepositoryConnector) connector).getLegacyTaskDataHandler();
return taskDataHandler != null && taskDataHandler.canGetMultiTaskData();
} else {
- org.eclipse.mylyn.tasks.core.data.AbstractTaskDataHandler taskDataHandler = connector.getTaskDataHandler2();
+ org.eclipse.mylyn.tasks.core.data.AbstractTaskDataHandler taskDataHandler = connector.getTaskDataHandler();
return taskDataHandler != null && taskDataHandler.canGetMultiTaskData();
}
}
@@ -120,13 +120,13 @@ public class SynchronizeTasksJob extends SynchronizationJob {
monitor = Policy.backgroundMonitorFor(monitor);
}
if (connector instanceof AbstractLegacyRepositoryConnector) {
- RepositoryTaskData downloadedTaskData = ((AbstractLegacyRepositoryConnector) connector).getTaskData(
+ RepositoryTaskData downloadedTaskData = ((AbstractLegacyRepositoryConnector) connector).getLegacyTaskData(
taskRepository, taskId, monitor);
if (downloadedTaskData != null) {
updateFromTaskData(taskRepository, task, downloadedTaskData);
}
} else {
- TaskData taskData = connector.getTaskData2(taskRepository, taskId, monitor);
+ TaskData taskData = connector.getTaskData(taskRepository, taskId, monitor);
if (taskData != null) {
updateFromTaskData(taskRepository, task, taskData);
} else {
@@ -174,7 +174,7 @@ public class SynchronizeTasksJob extends SynchronizationJob {
((AbstractLegacyRepositoryConnector) connector).getLegacyTaskDataHandler().getMultiTaskData(repository,
Collections.unmodifiableSet(idToTask.keySet()), collector, monitor);
} else {
- connector.getTaskDataHandler2().getMultiTaskData(repository,
+ connector.getTaskDataHandler().getMultiTaskData(repository,
Collections.unmodifiableSet(idToTask.keySet()), collector, monitor);
}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractRepositoryConnector.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractRepositoryConnector.java
index 61ce6b290..f22cf45f0 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractRepositoryConnector.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractRepositoryConnector.java
@@ -14,7 +14,6 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.mylyn.internal.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
import org.eclipse.mylyn.tasks.core.data.AbstractTaskAttachmentHandler;
import org.eclipse.mylyn.tasks.core.data.AbstractTaskDataHandler;
import org.eclipse.mylyn.tasks.core.data.ITaskDataManager;
@@ -35,42 +34,13 @@ public abstract class AbstractRepositoryConnector {
private static final long REPOSITORY_CONFIGURATION_UPDATE_INTERVAL = 24 * 60 * 60 * 1000;
- private boolean userManaged = true;
-
private ITaskDataManager taskDataManager;
- /**
- * Set upon construction
- *
- * @since 3.0
- */
- public void init(ITaskDataManager taskDataManager) {
- this.taskDataManager = taskDataManager;
- }
-
- /**
- * @since 3.0
- */
- public AbstractTaskDataHandler getTaskDataHandler2() {
- return null;
- }
-
- public abstract String getRepositoryUrlFromTaskUrl(String taskFullUrl);
-
- public abstract String getTaskIdFromTaskUrl(String taskFullUrl);
-
- // API 3.0 change type of taskId to AbstractTask
- public abstract String getTaskUrl(String repositoryUrl, String taskId);
-
- public String[] getTaskIdsFromComment(TaskRepository repository, String comment) {
- return null;
- }
+ public abstract boolean canCreateNewTask(TaskRepository repository);
// API 3.0 rename to canCreateTaskFromId?
public abstract boolean canCreateTaskFromKey(TaskRepository repository);
- public abstract boolean canCreateNewTask(TaskRepository repository);
-
/**
* @since 3.0
*/
@@ -79,26 +49,18 @@ public abstract class AbstractRepositoryConnector {
}
/**
- * Utility method for construction of connector specific task object.
- *
- * @return instance of AbstractTask
- * @since 3.0
- */
- public abstract AbstractTask createTask(String repositoryUrl, String id, String summary);
-
- /**
- * Implementors must execute query synchronously.
- *
- * @since 3.0
+ * @return the unique kind of the repository, e.g. "bugzilla"
*/
- public abstract IStatus performQuery(TaskRepository repository, AbstractRepositoryQuery query,
- TaskDataCollector resultCollector, SynchronizationContext event, IProgressMonitor monitor);
+ public abstract String getConnectorKind();
/**
* The connector's summary i.e. "JIRA (supports 3.3.1 and later)"
*/
+ // API 3.0: move to AbstractRepositoryConnectorUi?
public abstract String getLabel();
+ public abstract String getRepositoryUrlFromTaskUrl(String taskFullUrl);
+
/**
* Returns a short label for the connector, e.g. Bugzilla.
*
@@ -124,9 +86,33 @@ public abstract class AbstractRepositoryConnector {
}
/**
- * @return the unique kind of the repository, e.g. "bugzilla"
+ * @since 3.0
*/
- public abstract String getConnectorKind();
+ public AbstractTaskAttachmentHandler getTaskAttachmentHandler() {
+ return null;
+ }
+
+ /**
+ * @since 3.0
+ */
+ public abstract TaskData getTaskData(TaskRepository taskRepository, String taskId, IProgressMonitor monitor)
+ throws CoreException;
+
+ /**
+ * @since 3.0
+ */
+ public AbstractTaskDataHandler getTaskDataHandler() {
+ return null;
+ }
+
+ /**
+ * @since 3.0
+ */
+ protected ITaskDataManager getTaskDataManager() {
+ return taskDataManager;
+ }
+
+ public abstract String getTaskIdFromTaskUrl(String taskFullUrl);
/**
* Used for referring to the task in the UI.
@@ -138,13 +124,33 @@ public abstract class AbstractRepositoryConnector {
return "task";
}
+ public String[] getTaskIdsFromComment(TaskRepository repository, String comment) {
+ return null;
+ }
+
/**
- * Reset and update the repository attributes from the server (e.g. products, components)
+ * @since 3.0
+ */
+ public TaskMapper getTaskScheme(TaskData taskData) {
+ return new TaskMapper(taskData);
+ }
+
+ // API 3.0 change type of taskId to AbstractTask
+ public abstract String getTaskUrl(String repositoryUrl, String taskId);
+
+ /**
+ * @since 3.0
+ */
+ public abstract boolean hasChanged(ITask task, TaskData taskData);
+
+ /**
+ * Set upon construction
*
* @since 3.0
*/
- public abstract void updateRepositoryConfiguration(TaskRepository repository, IProgressMonitor monitor)
- throws CoreException;
+ public void init(ITaskDataManager taskDataManager) {
+ this.taskDataManager = taskDataManager;
+ }
/**
* Default implementation returns true every 24hrs
@@ -167,29 +173,22 @@ public abstract class AbstractRepositoryConnector {
return isStale;
}
- // API 3.0 remove and let connectors override isUserManaged? Can this property change in the life cycle of the connector?
- public void setUserManaged(boolean userManaged) {
- this.userManaged = userManaged;
- }
-
- /**
- * If false, user is unable to manipulate (i.e. rename/delete), no preferences are available.
- */
public boolean isUserManaged() {
- return userManaged;
+ return true;
}
/**
+ * Implementors must execute query synchronously.
+ *
* @since 3.0
*/
- protected ITaskDataManager getTaskDataManager() {
- return taskDataManager;
- }
+ public abstract IStatus performQuery(TaskRepository repository, AbstractRepositoryQuery query,
+ TaskDataCollector resultCollector, SynchronizationContext event, IProgressMonitor monitor);
/**
* @since 3.0
*/
- public void preSynchronization(SynchronizationContext event, IProgressMonitor monitor) throws CoreException {
+ public void postSynchronization(SynchronizationContext event, IProgressMonitor monitor) throws CoreException {
try {
monitor.beginTask("", 1);
} finally {
@@ -200,7 +199,7 @@ public abstract class AbstractRepositoryConnector {
/**
* @since 3.0
*/
- public void postSynchronization(SynchronizationContext event, IProgressMonitor monitor) throws CoreException {
+ public void preSynchronization(SynchronizationContext event, IProgressMonitor monitor) throws CoreException {
try {
monitor.beginTask("", 1);
} finally {
@@ -209,39 +208,16 @@ public abstract class AbstractRepositoryConnector {
}
/**
+ * Reset and update the repository attributes from the server (e.g. products, components)
+ *
* @since 3.0
*/
- public boolean hasChanged(ITask task, TaskData taskData) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @since 3.0
- */
- public void updateTaskFromTaskData(TaskRepository repository, ITask task, TaskData taskData) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @since 3.0
- */
- public TaskData getTaskData2(TaskRepository taskRepository, String taskId, IProgressMonitor monitor)
- throws CoreException {
- return null;
- }
-
- /**
- * @since 3.0
- */
- public AbstractTaskAttachmentHandler getTaskAttachmentHandler() {
- return null;
- }
+ public abstract void updateRepositoryConfiguration(TaskRepository repository, IProgressMonitor monitor)
+ throws CoreException;
/**
* @since 3.0
*/
- public TaskMapper getTaskScheme(TaskData taskData) {
- return new TaskMapper(taskData);
- }
+ public abstract void updateTaskFromTaskData(TaskRepository repository, ITask task, TaskData taskData);
}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITask.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITask.java
index 498c4053f..f2ff2e7f6 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITask.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITask.java
@@ -62,6 +62,112 @@ public interface ITask extends ITaskElement {
}
}
+ public enum PriorityLevel {
+ P1, P2, P3, P4, P5;
+
+ @Override
+ public String toString() {
+ switch (this) {
+ case P1:
+ return "P1";
+ case P2:
+ return "P2";
+ case P3:
+ return "P3";
+ case P4:
+ return "P4";
+ case P5:
+ return "P5";
+ default:
+ return "P3";
+ }
+ }
+
+ public String getDescription() {
+ switch (this) {
+ case P1:
+ return "Very High";
+ case P2:
+ return "High";
+ case P3:
+ return "Normal";
+ case P4:
+ return "Low";
+ case P5:
+ return "Very Low";
+ default:
+ return "";
+ }
+ }
+
+ /**
+ * @since 2.3
+ */
+ public static PriorityLevel fromLevel(int level) {
+ if (level <= 1) {
+ return P1;
+ }
+ if (level == 2) {
+ return P2;
+ }
+ if (level == 3) {
+ return P3;
+ }
+ if (level == 4) {
+ return P4;
+ }
+ if (level >= 5) {
+ return P5;
+ }
+ return getDefault();
+ }
+
+ public static PriorityLevel fromString(String string) {
+ if (string.equals("P1")) {
+ return P1;
+ }
+ if (string.equals("P2")) {
+ return P2;
+ }
+ if (string.equals("P3")) {
+ return P3;
+ }
+ if (string.equals("P4")) {
+ return P4;
+ }
+ if (string.equals("P5")) {
+ return P5;
+ }
+ return getDefault();
+ }
+
+ public static PriorityLevel fromDescription(String string) {
+ if (string == null) {
+ return null;
+ }
+ if (string.equals("Very High")) {
+ return P1;
+ }
+ if (string.equals("High")) {
+ return P2;
+ }
+ if (string.equals("Normal")) {
+ return P3;
+ }
+ if (string.equals("Low")) {
+ return P4;
+ }
+ if (string.equals("Very Low")) {
+ return P5;
+ }
+ return getDefault();
+ }
+
+ public static PriorityLevel getDefault() {
+ return P3;
+ }
+ }
+
public abstract Date getCompletionDate();
public abstract String getConnectorKind();
@@ -141,6 +247,9 @@ public interface ITask extends ITaskElement {
@Deprecated
public abstract void setActive(boolean b);
+ /**
+ * @deprecated use {@link #setCompletionDate(Date)} instead
+ */
@Deprecated
public abstract void setCompleted(boolean completed);
@@ -174,4 +283,4 @@ public interface ITask extends ITaskElement {
public abstract void setUrl(String taskUrl);
-} \ No newline at end of file
+}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskMapper.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskMapper.java
index eb4bca173..295787347 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskMapper.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskMapper.java
@@ -11,7 +11,7 @@ package org.eclipse.mylyn.tasks.core;
import java.util.Date;
import org.eclipse.core.runtime.Assert;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask.PriorityLevel;
+import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
import org.eclipse.mylyn.tasks.core.data.TaskData;
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/QueryExportImportTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/QueryExportImportTest.java
index 7c8f44b86..dfdca1277 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/QueryExportImportTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/QueryExportImportTest.java
@@ -26,8 +26,8 @@ import junit.framework.TestCase;
import org.eclipse.mylyn.internal.tasks.core.AbstractRepositoryQuery;
import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryManager;
+import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractTaskListFactory;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.AbstractTaskListFactory;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryConnector;
import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryQuery;
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListUiTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListUiTest.java
index c43506890..b8bea8fa1 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListUiTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListUiTest.java
@@ -21,7 +21,6 @@ import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask.PriorityLevel;
import org.eclipse.mylyn.internal.tasks.ui.MoveToCategoryMenuContributor;
import org.eclipse.mylyn.internal.tasks.ui.TaskListManager;
import org.eclipse.mylyn.internal.tasks.ui.TaskPriorityFilter;
@@ -34,6 +33,7 @@ import org.eclipse.mylyn.internal.web.tasks.WebTask;
import org.eclipse.mylyn.tasks.core.ITask;
import org.eclipse.mylyn.tasks.core.ITaskElement;
import org.eclipse.mylyn.tasks.core.ITaskListChangeListener;
+import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryQuery;
import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
import org.eclipse.swt.widgets.TreeItem;
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskTest.java
index c4912070e..3ea781a15 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskTest.java
@@ -12,8 +12,8 @@ import junit.framework.TestCase;
import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask.PriorityLevel;
import org.eclipse.mylyn.tasks.core.ITask;
+import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
/**
* @author Mik Kersten
@@ -55,8 +55,8 @@ public class TaskTest extends TestCase {
PriorityLevel def = PriorityLevel.getDefault();
assertNotNull(def);
- assertEquals(def, AbstractTask.PriorityLevel.fromDescription("garbage"));
- assertEquals(def, AbstractTask.PriorityLevel.fromString("garbage"));
+ assertEquals(def, PriorityLevel.fromDescription("garbage"));
+ assertEquals(def, PriorityLevel.fromString("garbage"));
}
public void testPriorityLevelFromLevel() {
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TasksUiUtilTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TasksUiUtilTest.java
index 4fd281591..d3b527c4e 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TasksUiUtilTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TasksUiUtilTest.java
@@ -14,10 +14,10 @@ import junit.framework.TestCase;
import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask.PriorityLevel;
import org.eclipse.mylyn.internal.tasks.ui.TaskListManager;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
+import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
import org.eclipse.ui.IEditorPart;
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockRepositoryConnector.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockRepositoryConnector.java
index a1290b719..7f5b87474 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockRepositoryConnector.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockRepositoryConnector.java
@@ -201,7 +201,7 @@ public class MockRepositoryConnector extends AbstractLegacyRepositoryConnector {
}
@Override
- public RepositoryTaskData getTaskData(TaskRepository repository, String taskId, IProgressMonitor monitor)
+ public RepositoryTaskData getLegacyTaskData(TaskRepository repository, String taskId, IProgressMonitor monitor)
throws CoreException {
return null;
}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockTaskListFactory.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockTaskListFactory.java
index 4c1631425..9d2d169b3 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockTaskListFactory.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockTaskListFactory.java
@@ -13,7 +13,7 @@ import java.util.Set;
import org.eclipse.mylyn.internal.tasks.core.AbstractRepositoryQuery;
import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskListFactory;
+import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractTaskListFactory;
import org.eclipse.mylyn.tasks.core.ITask;
import org.w3c.dom.Element;
diff --git a/org.eclipse.mylyn.tasks.ui/schema/repositories.exsd b/org.eclipse.mylyn.tasks.ui/schema/repositories.exsd
index 5f4e34e19..ff15466f1 100644
--- a/org.eclipse.mylyn.tasks.ui/schema/repositories.exsd
+++ b/org.eclipse.mylyn.tasks.ui/schema/repositories.exsd
@@ -1,10 +1,10 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.mylyn.tasks.ui">
+<schema targetNamespace="org.eclipse.mylyn.tasks.ui" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
- <appInfo>
+ <appinfo>
<meta.schema plugin="org.eclipse.mylyn.tasks.ui" id="repositories" name="Repositories"/>
- </appInfo>
+ </appinfo>
<documentation>
[Enter description of this extension point.]
</documentation>
@@ -12,6 +12,9 @@
<element name="extension">
<annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
<documentation>
(no description available)
</documentation>
@@ -41,9 +44,9 @@
<documentation>
</documentation>
- <appInfo>
+ <appinfo>
<meta.attribute translatable="true"/>
- </appInfo>
+ </appinfo>
</annotation>
</attribute>
</complexType>
@@ -51,9 +54,9 @@
<element name="taskListFactory">
<annotation>
- <appInfo>
+ <appinfo>
<meta.element labelAttribute="name"/>
- </appInfo>
+ </appinfo>
<documentation>
(no description available)
</documentation>
@@ -64,9 +67,9 @@
<documentation>
</documentation>
- <appInfo>
+ <appinfo>
<meta.attribute kind="java" basedOn="org.eclipse.mylyn.tasks.core.AbstractTaskListFactory:"/>
- </appInfo>
+ </appinfo>
</annotation>
</attribute>
<attribute name="id" type="string">
@@ -81,9 +84,9 @@
<documentation>
</documentation>
- <appInfo>
+ <appinfo>
<meta.attribute translatable="true"/>
- </appInfo>
+ </appinfo>
</annotation>
</attribute>
</complexType>
@@ -101,9 +104,9 @@
<documentation>
</documentation>
- <appInfo>
+ <appinfo>
<meta.attribute kind="java" basedOn="org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector"/>
- </appInfo>
+ </appinfo>
</annotation>
</attribute>
<attribute name="name" type="string">
@@ -132,6 +135,9 @@
<documentation>
</documentation>
+ <appinfo>
+ <meta.attribute deprecated="true"/>
+ </appinfo>
</annotation>
</attribute>
</complexType>
@@ -149,9 +155,9 @@
<documentation>
(no description available)
</documentation>
- <appInfo>
+ <appinfo>
<meta.attribute kind="java" basedOn="org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi"/>
- </appInfo>
+ </appinfo>
</annotation>
</attribute>
<attribute name="id" type="string">
@@ -166,9 +172,9 @@
<documentation>
(no description available)
</documentation>
- <appInfo>
+ <appinfo>
<meta.attribute kind="resource"/>
- </appInfo>
+ </appinfo>
</annotation>
</attribute>
<attribute name="name" type="string">
@@ -183,9 +189,9 @@
<documentation>
(no description available)
</documentation>
- <appInfo>
+ <appinfo>
<meta.attribute kind="resource"/>
- </appInfo>
+ </appinfo>
</annotation>
</attribute>
<attribute name="customNotifications" type="boolean">
@@ -199,36 +205,36 @@
</element>
<annotation>
- <appInfo>
+ <appinfo>
<meta.section type="since"/>
- </appInfo>
+ </appinfo>
<documentation>
[Enter the first release in which this extension point appears.]
</documentation>
</annotation>
<annotation>
- <appInfo>
+ <appinfo>
<meta.section type="examples"/>
- </appInfo>
+ </appinfo>
<documentation>
[Enter extension point usage example here.]
</documentation>
</annotation>
<annotation>
- <appInfo>
+ <appinfo>
<meta.section type="apiInfo"/>
- </appInfo>
+ </appinfo>
<documentation>
[Enter API information here.]
</documentation>
</annotation>
<annotation>
- <appInfo>
+ <appinfo>
<meta.section type="implementation"/>
- </appInfo>
+ </appinfo>
<documentation>
[Enter information about supplied implementation of this extension point.]
</documentation>
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskPriorityFilter.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskPriorityFilter.java
index 55652f43d..2cbe7e407 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskPriorityFilter.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskPriorityFilter.java
@@ -7,9 +7,9 @@
*******************************************************************************/
package org.eclipse.mylyn.internal.tasks.ui;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask.PriorityLevel;
import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
import org.eclipse.mylyn.tasks.core.ITaskElement;
+import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
/**
* @author Mik Kersten
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiImages.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiImages.java
index 53d929097..662780d2d 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiImages.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiImages.java
@@ -14,7 +14,7 @@ import java.net.URL;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask.PriorityLevel;
+import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin.java
index eff254a70..6cd0bdd79 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin.java
@@ -62,7 +62,6 @@ import org.eclipse.mylyn.internal.tasks.core.TaskActivityManager;
import org.eclipse.mylyn.internal.tasks.core.TaskActivityUtil;
import org.eclipse.mylyn.internal.tasks.core.TaskDataStorageManager;
import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask.PriorityLevel;
import org.eclipse.mylyn.internal.tasks.core.data.TaskDataManager;
import org.eclipse.mylyn.internal.tasks.core.data.TaskDataStore;
import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractAttributeFactory;
@@ -86,6 +85,7 @@ import org.eclipse.mylyn.tasks.core.ITaskElement;
import org.eclipse.mylyn.tasks.core.RepositoryTemplate;
import org.eclipse.mylyn.tasks.core.TaskActivityAdapter;
import org.eclipse.mylyn.tasks.core.TaskRepository;
+import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState;
import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
import org.eclipse.mylyn.tasks.ui.AbstractTaskRepositoryLinkProvider;
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewSubTaskAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewSubTaskAction.java
index 900909b45..9350d64b7 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewSubTaskAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewSubTaskAction.java
@@ -26,7 +26,6 @@ import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
import org.eclipse.mylyn.internal.tasks.core.LocalRepositoryConnector;
import org.eclipse.mylyn.internal.tasks.core.LocalTask;
import org.eclipse.mylyn.internal.tasks.core.TaskList;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask.PriorityLevel;
import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractAttributeFactory;
import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractLegacyRepositoryConnector;
import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractTaskDataHandler;
@@ -38,6 +37,7 @@ import org.eclipse.mylyn.internal.tasks.ui.deprecated.NewTaskEditorInput;
import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
import org.eclipse.mylyn.tasks.core.ITask;
import org.eclipse.mylyn.tasks.core.TaskRepository;
+import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
import org.eclipse.mylyn.tasks.ui.TasksUi;
import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskPlanningEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskPlanningEditor.java
index 0392f6833..56bc16361 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskPlanningEditor.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskPlanningEditor.java
@@ -32,7 +32,6 @@ import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
import org.eclipse.mylyn.internal.tasks.core.LocalRepositoryConnector;
import org.eclipse.mylyn.internal.tasks.core.LocalTask;
import org.eclipse.mylyn.internal.tasks.core.TaskActivityUtil;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask.PriorityLevel;
import org.eclipse.mylyn.internal.tasks.ui.RetrieveTitleFromUrlJob;
import org.eclipse.mylyn.internal.tasks.ui.ScheduleDatePicker;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
@@ -47,6 +46,7 @@ import org.eclipse.mylyn.tasks.core.ITaskListChangeListener;
import org.eclipse.mylyn.tasks.core.TaskActivityAdapter;
import org.eclipse.mylyn.tasks.core.TaskContainerDelta;
import org.eclipse.mylyn.tasks.core.TaskRepository;
+import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
import org.eclipse.mylyn.tasks.ui.TasksUi;
import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchHitCollector.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchHitCollector.java
index 51220d4fd..d670d0770 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchHitCollector.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchHitCollector.java
@@ -104,7 +104,8 @@ public class SearchHitCollector extends LegacyTaskDataCollector implements ISear
public void accept(RepositoryTaskData taskData) {
AbstractTask task = taskList.getTask(repository.getRepositoryUrl(), taskData.getTaskId());
if (task == null) {
- task = connector.createTask(taskData.getRepositoryUrl(), taskData.getTaskId(), "");
+ task = ((AbstractLegacyRepositoryConnector) connector).createTask(taskData.getRepositoryUrl(),
+ taskData.getTaskId(), "");
((AbstractLegacyRepositoryConnector) connector).updateTaskFromTaskData(repository, task, taskData);
}
taskResults.add(task);
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 439484b4b..2eea0a9c6 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
@@ -31,11 +31,11 @@ import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
import org.eclipse.mylyn.internal.tasks.core.TaskExternalizationException;
import org.eclipse.mylyn.internal.tasks.core.TaskList;
import org.eclipse.mylyn.internal.tasks.core.UncategorizedTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask.PriorityLevel;
+import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractTaskListFactory;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.AbstractTaskListFactory;
import org.eclipse.mylyn.tasks.core.ITask;
import org.eclipse.mylyn.tasks.core.ITaskElement;
+import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskListElementImporter.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskListElementImporter.java
index b2c853a3b..f043f7e90 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskListElementImporter.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskListElementImporter.java
@@ -53,9 +53,9 @@ import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
import org.eclipse.mylyn.internal.tasks.core.TaskExternalizationException;
import org.eclipse.mylyn.internal.tasks.core.TaskList;
import org.eclipse.mylyn.internal.tasks.core.TaskRepositoriesExternalizer;
+import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractTaskListFactory;
import org.eclipse.mylyn.internal.tasks.ui.ITasksUiConstants;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.AbstractTaskListFactory;
import org.eclipse.mylyn.tasks.core.ITaskElement;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.ui.TasksUi;
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiExtensionReader.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiExtensionReader.java
index 27decc189..af558b972 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiExtensionReader.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiExtensionReader.java
@@ -24,13 +24,13 @@ import org.eclipse.mylyn.commons.core.StatusHandler;
import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractDuplicateDetector;
import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractLegacyRepositoryConnector;
+import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractTaskListFactory;
import org.eclipse.mylyn.internal.tasks.core.externalization.TaskListExternalizer;
import org.eclipse.mylyn.internal.tasks.ui.IDynamicSubMenuContributor;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.mylyn.internal.tasks.ui.views.AbstractTaskListPresentation;
import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractTaskListFactory;
import org.eclipse.mylyn.tasks.core.RepositoryTemplate;
import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
import org.eclipse.mylyn.tasks.ui.AbstractTaskRepositoryLinkProvider;
@@ -370,13 +370,15 @@ public class TasksUiExtensionReader {
Object type = element.getAttribute(ELMNT_TYPE);
Object connectorCore = element.createExecutableExtension(ATTR_CLASS);
if (connectorCore instanceof AbstractRepositoryConnector && type != null) {
- AbstractLegacyRepositoryConnector repositoryConnector = (AbstractLegacyRepositoryConnector) connectorCore;
+ AbstractRepositoryConnector repositoryConnector = (AbstractRepositoryConnector) connectorCore;
TasksUiPlugin.getRepositoryManager().addRepositoryConnector(repositoryConnector);
- String userManagedString = element.getAttribute(ATTR_USER_MANAGED);
- if (userManagedString != null) {
- boolean userManaged = Boolean.parseBoolean(userManagedString);
- repositoryConnector.setUserManaged(userManaged);
+ if (repositoryConnector instanceof AbstractLegacyRepositoryConnector) {
+ String userManagedString = element.getAttribute(ATTR_USER_MANAGED);
+ if (userManagedString != null) {
+ boolean userManaged = Boolean.parseBoolean(userManagedString);
+ ((AbstractLegacyRepositoryConnector) repositoryConnector).setUserManaged(userManaged);
+ }
}
} else {
StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Could not load connector core "
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiInternal.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiInternal.java
index 2ca5ed970..01ef015ef 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiInternal.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiInternal.java
@@ -38,7 +38,6 @@ import org.eclipse.mylyn.internal.tasks.core.LocalTask;
import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskDelegate;
import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
import org.eclipse.mylyn.internal.tasks.core.TaskList;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask.PriorityLevel;
import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
import org.eclipse.mylyn.internal.tasks.core.deprecated.TaskSelection;
import org.eclipse.mylyn.internal.tasks.ui.ITasksUiConstants;
@@ -56,6 +55,7 @@ import org.eclipse.mylyn.tasks.core.ITaskElement;
import org.eclipse.mylyn.tasks.core.ITaskList;
import org.eclipse.mylyn.tasks.core.RepositoryStatus;
import org.eclipse.mylyn.tasks.core.TaskRepository;
+import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
import org.eclipse.mylyn.tasks.core.data.AbstractTaskAttachmentSource;
import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
import org.eclipse.mylyn.tasks.core.sync.SynchronizationJob;
@@ -194,7 +194,7 @@ public class TasksUiInternal {
RepositoryTaskData taskData = TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(
task.getRepositoryUrl(), task.getTaskId());
if ((taskData != null || connector instanceof AbstractRepositoryConnector)
- || connector.getTaskDataHandler2() != null) {
+ || connector.getTaskDataHandler() != null) {
TasksUiUtil.openTaskAndRefresh(task);
} else {
// TODO consider moving this into the editor, i.e. have the editor refresh the task if task data is missing
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/PriorityDropDownAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/PriorityDropDownAction.java
index 8d6f5ab4a..db952c638 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/PriorityDropDownAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/PriorityDropDownAction.java
@@ -12,9 +12,9 @@ import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.ActionContributionItem;
import org.eclipse.jface.action.IMenuCreator;
import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask.PriorityLevel;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPreferenceConstants;
+import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Menu;
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskActivityLabelProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskActivityLabelProvider.java
index cd38db1f7..6e19eb8ac 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskActivityLabelProvider.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskActivityLabelProvider.java
@@ -23,12 +23,12 @@ import org.eclipse.mylyn.commons.core.StatusHandler;
import org.eclipse.mylyn.internal.provisional.commons.ui.CommonFonts;
import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskContainer;
import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskDelegate;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask.PriorityLevel;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.mylyn.tasks.core.ITask;
import org.eclipse.mylyn.tasks.core.ITaskActivityManager;
import org.eclipse.mylyn.tasks.core.ITaskElement;
+import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.Image;
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskElementLabelProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskElementLabelProvider.java
index 2cb314040..0a1f0a3b2 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskElementLabelProvider.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskElementLabelProvider.java
@@ -28,13 +28,13 @@ import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
import org.eclipse.mylyn.internal.tasks.core.TaskGroup;
import org.eclipse.mylyn.internal.tasks.core.UncategorizedTaskContainer;
import org.eclipse.mylyn.internal.tasks.core.UnmatchedTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask.PriorityLevel;
import org.eclipse.mylyn.internal.tasks.ui.ITaskHighlighter;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.mylyn.tasks.core.ITask;
import org.eclipse.mylyn.tasks.core.ITaskElement;
import org.eclipse.mylyn.tasks.core.TaskRepository;
+import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState;
import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
import org.eclipse.mylyn.tasks.ui.TasksUi;
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java
index a969cc223..2fb75dc50 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java
@@ -60,7 +60,6 @@ import org.eclipse.mylyn.internal.tasks.core.AbstractTaskContainer;
import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
import org.eclipse.mylyn.internal.tasks.core.UncategorizedTaskContainer;
import org.eclipse.mylyn.internal.tasks.core.UnmatchedTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask.PriorityLevel;
import org.eclipse.mylyn.internal.tasks.ui.AbstractTaskListFilter;
import org.eclipse.mylyn.internal.tasks.ui.CategorizedPresentation;
import org.eclipse.mylyn.internal.tasks.ui.IDynamicSubMenuContributor;
@@ -105,6 +104,7 @@ import org.eclipse.mylyn.tasks.core.ITaskElement;
import org.eclipse.mylyn.tasks.core.ITaskListChangeListener;
import org.eclipse.mylyn.tasks.core.TaskActivityAdapter;
import org.eclipse.mylyn.tasks.core.TaskContainerDelta;
+import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
import org.eclipse.mylyn.tasks.ui.TasksUi;
import org.eclipse.mylyn.tasks.ui.editors.TaskEditorInput;
import org.eclipse.swt.SWT;
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/AbstractRepositoryConnectorUi.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/AbstractRepositoryConnectorUi.java
index 824167ea6..2e6f1f292 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/AbstractRepositoryConnectorUi.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/AbstractRepositoryConnectorUi.java
@@ -23,7 +23,6 @@ import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.mylyn.commons.core.StatusHandler;
import org.eclipse.mylyn.internal.tasks.core.AbstractRepositoryQuery;
import org.eclipse.mylyn.internal.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask.PriorityLevel;
import org.eclipse.mylyn.internal.tasks.core.deprecated.TaskSelection;
import org.eclipse.mylyn.internal.tasks.ui.OpenRepositoryTaskJob;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
@@ -35,6 +34,7 @@ import org.eclipse.mylyn.tasks.core.ITaskComment;
import org.eclipse.mylyn.tasks.core.ITaskElement;
import org.eclipse.mylyn.tasks.core.ITaskRepositoryManager;
import org.eclipse.mylyn.tasks.core.TaskRepository;
+import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
import org.eclipse.mylyn.tasks.core.data.TaskAttachmentModel;
import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
import org.eclipse.mylyn.tasks.ui.wizards.AbstractRepositorySettingsPage;
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 12aed8556..08905ef50 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
@@ -129,7 +129,7 @@ public class TasksUiUtil {
if (task == null) {
AbstractRepositoryConnector connector = TasksUiPlugin.getConnector(repository.getConnectorKind());
if (connector instanceof AbstractLegacyRepositoryConnector) {
- RepositoryTaskData taskData = ((AbstractLegacyRepositoryConnector) connector).getTaskData(repository,
+ RepositoryTaskData taskData = ((AbstractLegacyRepositoryConnector) connector).getLegacyTaskData(repository,
id, new SubProgressMonitor(monitor, 1));
if (taskData != null) {
task = createTaskFromTaskData((AbstractLegacyRepositoryConnector) connector, taskList, repository,
@@ -153,7 +153,7 @@ public class TasksUiUtil {
throws CoreException {
AbstractTask task = taskList.getTask(repository.getRepositoryUrl(), id);
if (task == null) {
- RepositoryTaskData taskData = connector.getTaskData(repository, id, new SubProgressMonitor(monitor, 1));
+ RepositoryTaskData taskData = connector.getLegacyTaskData(repository, id, new SubProgressMonitor(monitor, 1));
if (taskData != null) {
task = createTaskFromTaskData(connector, taskList, repository, taskData, retrieveSubTasks,
new SubProgressMonitor(monitor, 1));
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryConnector.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryConnector.java
index e117748f0..5a8fde847 100644
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryConnector.java
+++ b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryConnector.java
@@ -421,7 +421,7 @@ public class TracRepositoryConnector extends AbstractLegacyRepositoryConnector {
}
@Override
- public RepositoryTaskData getTaskData(TaskRepository repository, String taskId, IProgressMonitor monitor)
+ public RepositoryTaskData getLegacyTaskData(TaskRepository repository, String taskId, IProgressMonitor monitor)
throws CoreException {
return getLegacyTaskDataHandler().getTaskData(repository, taskId, monitor);
}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracTask.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracTask.java
index 80002035e..30d94f878 100644
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracTask.java
+++ b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracTask.java
@@ -204,7 +204,7 @@ public class TracTask extends AbstractTask {
if (priority.equals(tracPriority.getName())) {
float relativeValue = (float) (tracPriority.getValue() - minValue) / range;
int value = (int) (relativeValue * TASK_PRIORITY_LEVELS) + 1;
- return AbstractTask.PriorityLevel.fromLevel(value);
+ return PriorityLevel.fromLevel(value);
}
}
}
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracTaskListFactory.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracTaskListFactory.java
index 8c86d5fb6..c4b57c53a 100644
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracTaskListFactory.java
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracTaskListFactory.java
@@ -13,9 +13,9 @@ import java.util.Set;
import org.eclipse.mylyn.internal.tasks.core.AbstractRepositoryQuery;
import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
+import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractTaskListFactory;
import org.eclipse.mylyn.internal.trac.core.TracRepositoryQuery;
import org.eclipse.mylyn.internal.trac.core.TracTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskListFactory;
import org.eclipse.mylyn.tasks.core.ITask;
import org.w3c.dom.Element;

Back to the top