Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2007-06-13 17:16:08 -0400
committermkersten2007-06-13 17:16:08 -0400
commita034ef883c5d85e8253d7f80c800ac175774b279 (patch)
treef8a0cf4291438c26e4791f36ab460a47831da4f8
parent7e6f29070580781e54e4af0838ef8ed4da18b4bc (diff)
downloadorg.eclipse.mylyn.tasks-a034ef883c5d85e8253d7f80c800ac175774b279.tar.gz
org.eclipse.mylyn.tasks-a034ef883c5d85e8253d7f80c800ac175774b279.tar.xz
org.eclipse.mylyn.tasks-a034ef883c5d85e8253d7f80c800ac175774b279.zip
NEW - bug 124321: [api] merge local tasks with repository tasks
https://bugs.eclipse.org/bugs/show_bug.cgi?id=124321
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskListManagerTest.java4
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskReportGeneratorTest.java1
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositoryUi.java6
-rw-r--r--org.eclipse.mylyn.help.ui/src/org/eclipse/mylyn/internal/help/ui/dialogs/UiLegendDialog.java6
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/DateRangeActivityDelegate.java (renamed from org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/DateRangeActivityDelegate.java)12
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/DateRangeContainer.java (renamed from org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/DateRangeContainer.java)15
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskArchive.java (renamed from org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskArchive.java)10
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/UnfiledCategory.java (renamed from org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AutomaticCategory.java)9
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractRepositoryQuery.java5
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTask.java12
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskCategory.java22
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskContainer.java146
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskListElement.java162
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/DelegatingTaskExternalizer.java18
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskActivityListener.java2
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskListChangeListener.java8
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskListExternalizer.java4
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskCategory.java7
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskList.java59
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivityTest.java4
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracRepositoryUi.java6
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracTaskExternalizer.java4
22 files changed, 263 insertions, 259 deletions
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskListManagerTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskListManagerTest.java
index e300adcac..5cb64a71d 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskListManagerTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskListManagerTest.java
@@ -24,8 +24,8 @@ import org.eclipse.mylyn.internal.bugzilla.core.BugzillaTask;
import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants;
import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
import org.eclipse.mylyn.tasks.core.AbstractTask;
+import org.eclipse.mylyn.tasks.core.AbstractTaskCategory;
import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.core.AbstractTaskListElement;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.core.TaskList;
import org.eclipse.mylyn.tasks.ui.TaskListManager;
@@ -166,7 +166,7 @@ public class BugzillaTaskListManagerTest extends TestCase {
Collection<AbstractTask> allTasks = manager.getTaskList().getAllTasks();
Set<AbstractTask> allRootTasks = manager.getTaskList().getRootTasks();
- Set<AbstractTaskContainer> allCategories = manager.getTaskList().getCategories();
+ Set<AbstractTaskCategory> allCategories = manager.getTaskList().getCategories();
Set<AbstractTaskContainer> allRoots = manager.getTaskList().getRootElements();
assertEquals(0, allRootTasks.size());
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskReportGeneratorTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskReportGeneratorTest.java
index 88361b493..07247e746 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskReportGeneratorTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskReportGeneratorTest.java
@@ -24,6 +24,7 @@ import org.eclipse.mylyn.internal.bugzilla.core.BugzillaTask;
import org.eclipse.mylyn.internal.tasks.ui.planner.CompletedTaskCollector;
import org.eclipse.mylyn.internal.tasks.ui.planner.TaskReportGenerator;
import org.eclipse.mylyn.tasks.core.AbstractTask;
+import org.eclipse.mylyn.tasks.core.AbstractTaskCategory;
import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
import org.eclipse.mylyn.tasks.core.TaskCategory;
import org.eclipse.mylyn.tasks.ui.TaskListManager;
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositoryUi.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositoryUi.java
index b1fcbab06..a6eea735a 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositoryUi.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositoryUi.java
@@ -32,7 +32,7 @@ import org.eclipse.mylyn.internal.bugzilla.ui.search.BugzillaSearchPage;
import org.eclipse.mylyn.internal.bugzilla.ui.wizard.NewBugzillaTaskWizard;
import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskListElement;
+import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
@@ -58,8 +58,8 @@ public class BugzillaRepositoryUi extends AbstractRepositoryConnectorUi {
}
@Override
- public List<AbstractTaskListElement> getLegendItems() {
- List<AbstractTaskListElement> legendItems = new ArrayList<AbstractTaskListElement>();
+ public List<AbstractTaskContainer> getLegendItems() {
+ List<AbstractTaskContainer> legendItems = new ArrayList<AbstractTaskContainer>();
BugzillaTask blocker = new BugzillaTask("", "critical", "Critical or Blocker");
blocker.setSeverity("critical");
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 9911d652d..d02b26093 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
@@ -19,7 +19,7 @@ import org.eclipse.mylyn.internal.tasks.ui.TaskListColorsAndFonts;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylyn.internal.tasks.ui.views.TaskElementLabelProvider;
import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractTaskListElement;
+import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
import org.eclipse.mylyn.tasks.core.AbstractTask.PriorityLevel;
import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
@@ -305,7 +305,7 @@ public class UiLegendDialog extends PopupDialog {
for (AbstractRepositoryConnector connector : connectors) {
AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getRepositoryUi(connector.getRepositoryType());
if (connectorUi != null) {
- List<AbstractTaskListElement> elements = connectorUi.getLegendItems();
+ List<AbstractTaskContainer> elements = connectorUi.getLegendItems();
if (!elements.isEmpty()) {
section = toolkit.createSection(connectorComposite, Section.TITLE_BAR);
@@ -319,7 +319,7 @@ public class UiLegendDialog extends PopupDialog {
sectionClient = toolkit.createComposite(section);
setSectionLayout(sectionClient, section, true);
- for (AbstractTaskListElement taskListElement : elements) {
+ for (AbstractTaskContainer taskListElement : elements) {
image = toolkit.createLabel(sectionClient, "");
image.setImage(labelProvider.getImage(taskListElement));
toolkit.createLabel(sectionClient, taskListElement.getSummary());
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/DateRangeActivityDelegate.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/DateRangeActivityDelegate.java
index 95cab26ac..10a5028fc 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/DateRangeActivityDelegate.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/DateRangeActivityDelegate.java
@@ -9,12 +9,16 @@
* University Of British Columbia - initial API and implementation
*******************************************************************************/
-package org.eclipse.mylyn.tasks.core;
+package org.eclipse.mylyn.internal.tasks.core;
import java.util.Calendar;
import java.util.Date;
import java.util.Set;
+import org.eclipse.mylyn.tasks.core.AbstractTask;
+import org.eclipse.mylyn.tasks.core.AbstractTaskCategory;
+import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
+
/**
* @author Rob Elves
* @author Mik Kersten
@@ -106,7 +110,7 @@ public class DateRangeActivityDelegate extends AbstractTask {
// task.addSubTask(task);
// }
- public AbstractTaskContainer getCategory() {
+ public AbstractTaskCategory getCategory() {
return task.getCategory();
}
@@ -178,7 +182,7 @@ public class DateRangeActivityDelegate extends AbstractTask {
task.setActive(active);
}
- public void setCategory(AbstractTaskContainer category) {
+ public void setCategory(AbstractTaskCategory category) {
task.setCategory(category);
}
@@ -226,7 +230,7 @@ public class DateRangeActivityDelegate extends AbstractTask {
task.setTaskUrl(url);
}
- public int compareTo(AbstractTaskListElement taskListElement) {
+ public int compareTo(AbstractTaskContainer taskListElement) {
return task.toString().compareTo(((AbstractTask) taskListElement).toString());
}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/DateRangeContainer.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/DateRangeContainer.java
index 31a097ea6..2539b2226 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/DateRangeContainer.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/DateRangeContainer.java
@@ -9,7 +9,7 @@
* University Of British Columbia - initial API and implementation
*******************************************************************************/
-package org.eclipse.mylyn.tasks.core;
+package org.eclipse.mylyn.internal.tasks.core;
import java.text.DateFormat;
import java.util.Calendar;
@@ -20,11 +20,15 @@ import java.util.HashSet;
import java.util.Map;
import java.util.Set;
+import org.eclipse.mylyn.tasks.core.AbstractTask;
+import org.eclipse.mylyn.tasks.core.AbstractTaskCategory;
+import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
+
/**
* @author Rob Elves
* @author Mik Kersten
*/
-public class DateRangeContainer extends AbstractTaskContainer {
+public class DateRangeContainer extends AbstractTaskCategory {
private Set<DateRangeActivityDelegate> dateRangeDelegates = new HashSet<DateRangeActivityDelegate>();
@@ -200,12 +204,7 @@ public class DateRangeContainer extends AbstractTaskContainer {
* different natural ordering.
*/
@Override
- public int compareTo(AbstractTaskListElement taskListElement) {
+ public int compareTo(AbstractTaskContainer taskListElement) {
return startDate.compareTo(((DateRangeContainer) taskListElement).startDate);
}
-
- @Override
- public final boolean isLocal() {
- return true;
- }
} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskArchive.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskArchive.java
index d2785f369..4ebcb3a86 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskArchive.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskArchive.java
@@ -9,8 +9,9 @@
* University Of British Columbia - initial API and implementation
*******************************************************************************/
-package org.eclipse.mylyn.tasks.core;
+package org.eclipse.mylyn.internal.tasks.core;
+import org.eclipse.mylyn.tasks.core.AbstractTaskCategory;
import org.eclipse.mylyn.tasks.core.AbstractTask.PriorityLevel;
@@ -18,7 +19,7 @@ import org.eclipse.mylyn.tasks.core.AbstractTask.PriorityLevel;
/**
* @author Mik Kersten
*/
-public class TaskArchive extends AbstractTaskContainer {
+public class TaskArchive extends AbstractTaskCategory {
public static final String HANDLE = "archive";
@@ -46,9 +47,4 @@ public class TaskArchive extends AbstractTaskContainer {
public boolean canRename() {
return false;
}
-
- @Override
- public final boolean isLocal() {
- return true;
- }
}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AutomaticCategory.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/UnfiledCategory.java
index c0dc75b63..00ed4dc63 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AutomaticCategory.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/UnfiledCategory.java
@@ -9,8 +9,9 @@
* University Of British Columbia - initial API and implementation
*******************************************************************************/
-package org.eclipse.mylyn.tasks.core;
+package org.eclipse.mylyn.internal.tasks.core;
+import org.eclipse.mylyn.tasks.core.TaskCategory;
import org.eclipse.mylyn.tasks.core.AbstractTask.PriorityLevel;
/**
@@ -18,16 +19,16 @@ import org.eclipse.mylyn.tasks.core.AbstractTask.PriorityLevel;
*
* @author Rob Elves
*/
-public class AutomaticCategory extends TaskCategory {
+public class UnfiledCategory extends TaskCategory {
public static final String LABEL = "<Uncategorized>";
public static final String HANDLE = "uncategorized";
- public AutomaticCategory() {
+ public UnfiledCategory() {
super(HANDLE);
}
-
+
public String getPriority() {
return PriorityLevel.P1.toString();
}
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 7fe356193..ea26f3d26 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
@@ -60,11 +60,6 @@ public abstract class AbstractRepositoryQuery extends AbstractTaskContainer {
return highestPriority;
}
- @Override
- public boolean isLocal() {
- return false;
- }
-
public String getRepositoryUrl() {
return repositoryUrl;
}
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 07a635a65..e4b77959b 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
@@ -22,7 +22,7 @@ import org.eclipse.mylyn.internal.tasks.core.RepositoryTaskHandleUtil;
* @author Mik Kersten
* @author Rob Elves
*/
-public abstract class AbstractTask extends AbstractTaskListElement {
+public abstract class AbstractTask extends AbstractTaskContainer {
@Deprecated
public static final String DEFAULT_TASK_KIND = "task";
@@ -51,7 +51,7 @@ public abstract class AbstractTask extends AbstractTaskListElement {
@Deprecated
- private AbstractTaskContainer parentCategory = null;
+ private AbstractTaskCategory parentCategory = null;
// ************ Synch ****************
@@ -176,6 +176,8 @@ public abstract class AbstractTask extends AbstractTaskListElement {
return RepositoryTaskHandleUtil.getHandle(repositoryUrl, taskId);
}
+ public abstract boolean isLocal();
+
public abstract String getRepositoryKind();
public String getLastSyncDateStamp() {
@@ -344,12 +346,12 @@ public abstract class AbstractTask extends AbstractTaskListElement {
* TODO: get rid of this or we should make TaskCategory API.
*/
@Deprecated
- public void setCategory(AbstractTaskContainer category) {
+ public void setCategory(AbstractTaskCategory category) {
this.parentCategory = category;
}
@Deprecated
- public AbstractTaskContainer getCategory() {
+ public AbstractTaskCategory getCategory() {
return parentCategory;
}
@@ -429,7 +431,7 @@ public abstract class AbstractTask extends AbstractTaskListElement {
this.kind = kind;
}
- public int compareTo(AbstractTaskListElement taskListElement) {
+ public int compareTo(AbstractTaskContainer taskListElement) {
return summary.compareTo(((AbstractTask)taskListElement).summary);
}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskCategory.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskCategory.java
new file mode 100644
index 000000000..9faaf6ae8
--- /dev/null
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskCategory.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2004 - 2006 University Of British Columbia 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
+ *
+ * Contributors:
+ * University Of British Columbia - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.mylyn.tasks.core;
+
+/**
+ * @author Mik Kersten
+ */
+public abstract class AbstractTaskCategory extends AbstractTaskContainer {
+
+ public AbstractTaskCategory(String handleAndDescription) {
+ super(handleAndDescription);
+ }
+}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskContainer.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskContainer.java
index 8819072f6..852afa4e6 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskContainer.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskContainer.java
@@ -8,15 +8,155 @@
* Contributors:
* University Of British Columbia - initial API and implementation
*******************************************************************************/
-
package org.eclipse.mylyn.tasks.core;
+import java.util.Collections;
+import java.util.Set;
+import java.util.concurrent.CopyOnWriteArraySet;
+
+import org.eclipse.core.runtime.PlatformObject;
+import org.eclipse.mylyn.tasks.core.AbstractTask.PriorityLevel;
+
/**
+ * Manipulate containers via TaskListManager
+ *
* @author Mik Kersten
*/
-public abstract class AbstractTaskContainer extends AbstractTaskListElement {
+public abstract class AbstractTaskContainer extends PlatformObject implements Comparable<AbstractTaskContainer> {
+
+ private String handle = "";
+
+ private Set<AbstractTask> children = new CopyOnWriteArraySet<AbstractTask>();
+
+ /**
+ * Optional URL corresponding to the web resource associated with this
+ * container.
+ */
+ protected String url = null;
public AbstractTaskContainer(String handleAndDescription) {
- super(handleAndDescription);
+ assert handle != null;
+ this.handle = handleAndDescription;
+ }
+
+ /**
+ * Override for custom-named elements.
+ */
+ @Deprecated
+ public boolean canRename() {
+ return true;
+ }
+
+
+ public Set<AbstractTask> getChildren() {
+ return Collections.unmodifiableSet(children);
+ }
+
+ public boolean contains(String handle) {
+ for (AbstractTask child : children) {
+ if (handle.equals(child.getHandleIdentifier())) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public String getSummary() {
+ return handle;
+ }
+
+ /**
+ * @since 2.0
+ */
+ public boolean isEmpty() {
+ return children.isEmpty();
+ }
+
+ public String getHandleIdentifier() {
+ return handle;
+ }
+
+ public void setDescription(String description) {
+ this.handle = description;
+ }
+
+ public void setHandleIdentifier(String handle) {
+ this.handle = handle;
+ }
+
+ /**
+ * Use {@link TaskList} methods instead.
+ */
+ @Deprecated
+ protected void add(AbstractTask task) {
+ children.add(task);
+ }
+
+ /**
+ * Does not delete task from TaskList
+ */
+ @Deprecated
+ protected void remove(AbstractTask task) {
+ children.remove(task);
+ }
+
+ /**
+ * Does not delete tasks from TaskList
+ */
+ public void clear() {
+ children.clear();
+ }
+
+ @Override
+ public int hashCode() {
+ return handle.hashCode();
+ }
+
+ @Deprecated
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+ @Override
+ public boolean equals(Object object) {
+ if (object == null)
+ return false;
+ if (object instanceof AbstractTaskContainer) {
+ AbstractTaskContainer compare = (AbstractTaskContainer) object;
+ return this.getHandleIdentifier().equals(compare.getHandleIdentifier());
+ } else {
+ return false;
+ }
+ }
+
+ @Override
+ public String toString() {
+ return "container: " + handle;
+ }
+
+ public String getPriority() {
+ String highestPriority = PriorityLevel.P5.toString();
+ Set<AbstractTask> tasks = getChildren();
+ if (tasks.isEmpty()) {
+ return PriorityLevel.P1.toString();
+ }
+ for (AbstractTask task : tasks) {
+ if (highestPriority.compareTo(task.getPriority()) > 0) {
+ highestPriority = task.getPriority();
+ }
+ }
+ return highestPriority;
+ }
+
+ /**
+ * The handle for most containers is their summary. Override to specify a
+ * different natural ordering.
+ */
+ public int compareTo(AbstractTaskContainer taskListElement) {
+ return getHandleIdentifier().compareTo(((AbstractTaskContainer) taskListElement).getHandleIdentifier());
}
}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskListElement.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskListElement.java
deleted file mode 100644
index 237e94cb3..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskListElement.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 - 2006 University Of British Columbia 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
- *
- * Contributors:
- * University Of British Columbia - initial API and implementation
- *******************************************************************************/
-package org.eclipse.mylyn.tasks.core;
-
-import java.util.Collections;
-import java.util.Set;
-import java.util.concurrent.CopyOnWriteArraySet;
-
-import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.mylyn.tasks.core.AbstractTask.PriorityLevel;
-
-/**
- * Manipulate containers via TaskListManager
- *
- * @author Mik Kersten
- */
-public abstract class AbstractTaskListElement extends PlatformObject implements Comparable<AbstractTaskListElement> {
-
- private String handle = "";
-
- private Set<AbstractTask> children = new CopyOnWriteArraySet<AbstractTask>();
-
- /**
- * Optional URL corresponding to the web resource associated with this
- * container.
- */
- protected String url = null;
-
- public AbstractTaskListElement(String handleAndDescription) {
- assert handle != null;
- this.handle = handleAndDescription;
- }
-
- @Deprecated
- public abstract boolean isLocal();
-
- public Set<AbstractTask> getChildren() {
- return Collections.unmodifiableSet(children);
- }
-
- public boolean contains(String handle) {
- for (AbstractTask child : children) {
- if (handle.equals(child.getHandleIdentifier())) {
- return true;
- }
- }
- return false;
- }
-
- public String getSummary() {
- return handle;
- }
-
- /**
- * @since 2.0
- */
- public boolean isEmpty() {
- return children.isEmpty();
- }
-
- public String getHandleIdentifier() {
- return handle;
- }
-
- public void setDescription(String description) {
- this.handle = description;
- }
-
- public void setHandleIdentifier(String handle) {
- this.handle = handle;
- }
-
- /**
- * Use {@link TaskList} methods instead.
- */
- void add(AbstractTask task) {
- children.add(task);
- }
-
- /**
- * Does not delete task from TaskList
- */
- void remove(AbstractTask task) {
- children.remove(task);
- }
-
- /**
- * Does not delete tasks from TaskList
- */
- public void clear() {
- children.clear();
- }
-
- @Override
- public int hashCode() {
- return handle.hashCode();
- }
-
- @Deprecated
- public void setUrl(String url) {
- this.url = url;
- }
-
- public String getUrl() {
- return url;
- }
-
- @Override
- public boolean equals(Object object) {
- if (object == null)
- return false;
- if (object instanceof AbstractTaskListElement) {
- AbstractTaskListElement compare = (AbstractTaskListElement) object;
- return this.getHandleIdentifier().equals(compare.getHandleIdentifier());
- } else {
- return false;
- }
- }
-
- @Override
- public String toString() {
- return "container: " + handle;
- }
-
- /**
- * Override for custom-named elements.
- */
- @Deprecated
- public boolean canRename() {
- return true;
- }
-
- public String getPriority() {
- String highestPriority = PriorityLevel.P5.toString();
- Set<AbstractTask> tasks = getChildren();
- if (tasks.isEmpty()) {
- return PriorityLevel.P1.toString();
- }
- for (AbstractTask task : tasks) {
- if (highestPriority.compareTo(task.getPriority()) > 0) {
- highestPriority = task.getPriority();
- }
- }
- return highestPriority;
- }
-
- /**
- * The handle for most containers is their summary. Override to specify a
- * different natural ordering.
- */
- public int compareTo(AbstractTaskListElement taskListElement) {
- return getHandleIdentifier().compareTo(((AbstractTaskListElement) taskListElement).getHandleIdentifier());
- }
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/DelegatingTaskExternalizer.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/DelegatingTaskExternalizer.java
index 7b8fc11f1..077ded3dc 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/DelegatingTaskExternalizer.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/DelegatingTaskExternalizer.java
@@ -22,6 +22,8 @@ import java.util.Locale;
import org.eclipse.mylyn.core.MylarStatusHandler;
import org.eclipse.mylyn.internal.tasks.core.LocalTask;
import org.eclipse.mylyn.internal.tasks.core.RepositoryTaskHandleUtil;
+import org.eclipse.mylyn.internal.tasks.core.TaskArchive;
+import org.eclipse.mylyn.internal.tasks.core.UnfiledCategory;
import org.eclipse.mylyn.tasks.core.AbstractTask.PriorityLevel;
import org.eclipse.mylyn.tasks.core.AbstractTask.RepositoryTaskSyncState;
import org.w3c.dom.Document;
@@ -138,10 +140,10 @@ public class DelegatingTaskExternalizer implements ITaskListExternalizer {
this.delegateExternalizers = externalizers;
}
- public Element createCategoryElement(AbstractTaskListElement category, Document doc, Element parent) {
+ public Element createCategoryElement(AbstractTaskContainer category, Document doc, Element parent) {
if (category instanceof TaskArchive) {
return parent;
- } else if (category instanceof AutomaticCategory) {
+ } else if (category instanceof UnfiledCategory) {
return parent;
} else {
Element node = doc.createElement(getCategoryTagName());
@@ -164,7 +166,7 @@ public class DelegatingTaskExternalizer implements ITaskListExternalizer {
node.setAttribute(KEY_HANDLE, task.getHandleIdentifier());
if (task.getCategory() != null) {
- if (task.getCategory().getHandleIdentifier().equals(AutomaticCategory.HANDLE)) {
+ if (task.getCategory().getHandleIdentifier().equals(UnfiledCategory.HANDLE)) {
node.setAttribute(KEY_CATEGORY, VAL_ROOT);
} else {
node.setAttribute(KEY_CATEGORY, task.getCategory().getHandleIdentifier());
@@ -287,7 +289,7 @@ public class DelegatingTaskExternalizer implements ITaskListExternalizer {
boolean hasCaughtException = false;
Element element = (Element) node;
- AbstractTaskContainer category;
+ AbstractTaskCategory category;
if (element.hasAttribute(KEY_NAME)) {
category = new TaskCategory(element.getAttribute(KEY_NAME));
taskList.internalAddCategory((TaskCategory)category);
@@ -327,7 +329,7 @@ public class DelegatingTaskExternalizer implements ITaskListExternalizer {
* First tries to use a delegate externalizer to read, if none available,
* reads itself.
*/
- public final AbstractTask readTask(Node node, TaskList taskList, AbstractTaskContainer category, AbstractTask parent)
+ public final AbstractTask readTask(Node node, TaskList taskList, AbstractTaskCategory category, AbstractTask parent)
throws TaskExternalizationException {
AbstractTask task = null;
String taskId = null;
@@ -373,7 +375,7 @@ public class DelegatingTaskExternalizer implements ITaskListExternalizer {
* Override for connector-specific implementation
*/
public AbstractTask createTask(String repositoryUrl, String taskId, String summary, Element element, TaskList taskList,
- AbstractTaskListElement category, AbstractTask parent) throws TaskExternalizationException {
+ AbstractTaskContainer category, AbstractTask parent) throws TaskExternalizationException {
String handle;
if (element.hasAttribute(KEY_HANDLE)) {
handle = element.getAttribute(KEY_HANDLE);
@@ -385,12 +387,12 @@ public class DelegatingTaskExternalizer implements ITaskListExternalizer {
}
private void readTaskInfo(AbstractTask task, TaskList taskList, Element element, AbstractTask parent,
- AbstractTaskContainer legacyCategory) throws TaskExternalizationException {
+ AbstractTaskCategory legacyCategory) throws TaskExternalizationException {
String categoryHandle = null;
if (element.hasAttribute(KEY_CATEGORY)) {
categoryHandle = element.getAttribute(KEY_CATEGORY);
- AbstractTaskContainer category = null;
+ AbstractTaskCategory category = null;
if (categoryHandle != null) {
category = taskList.getContainerForHandle(categoryHandle);
}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskActivityListener.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskActivityListener.java
index e75c44521..351f2f521 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskActivityListener.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskActivityListener.java
@@ -13,6 +13,8 @@ package org.eclipse.mylyn.tasks.core;
import java.util.List;
+import org.eclipse.mylyn.internal.tasks.core.DateRangeContainer;
+
/**
* @author Mik Kersten
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskListChangeListener.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskListChangeListener.java
index f5a4f0f62..f1b4cf740 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskListChangeListener.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskListChangeListener.java
@@ -32,18 +32,18 @@ public interface ITaskListChangeListener {
public abstract void taskDeleted(AbstractTask task);
- public abstract void containerAdded(AbstractTaskListElement container);
+ public abstract void containerAdded(AbstractTaskContainer container);
- public abstract void containerDeleted(AbstractTaskListElement container);
+ public abstract void containerDeleted(AbstractTaskContainer container);
- public abstract void containerInfoChanged(AbstractTaskListElement container);
+ public abstract void containerInfoChanged(AbstractTaskContainer container);
/**
* @param task
* @param fromContainer can be null
* @param toContainer can be null
*/
- public abstract void taskMoved(AbstractTask task, AbstractTaskListElement fromContainer, AbstractTaskListElement toContainer);
+ public abstract void taskMoved(AbstractTask task, AbstractTaskContainer fromContainer, AbstractTaskContainer toContainer);
public abstract void taskAdded(AbstractTask task);
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskListExternalizer.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskListExternalizer.java
index 73f917f3e..febdc5cd2 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskListExternalizer.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskListExternalizer.java
@@ -35,7 +35,7 @@ public interface ITaskListExternalizer {
/**
* @return the element that was created, null if failed
*/
- public abstract Element createCategoryElement(AbstractTaskListElement category, Document doc, Element parent);
+ public abstract Element createCategoryElement(AbstractTaskContainer category, Document doc, Element parent);
public abstract boolean canCreateElementFor(AbstractTask task);
@@ -51,7 +51,7 @@ public interface ITaskListExternalizer {
public abstract boolean canReadTask(Node node);
public abstract AbstractTask createTask(String repositoryUrl, String taskId, String summary, Element element,
- TaskList tlist, AbstractTaskListElement category, AbstractTask parent) throws TaskExternalizationException;
+ TaskList tlist, AbstractTaskContainer category, AbstractTask parent) throws TaskExternalizationException;
public abstract boolean canCreateElementFor(AbstractRepositoryQuery category);
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskCategory.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskCategory.java
index 3992ec6cb..0cbfa2f50 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskCategory.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskCategory.java
@@ -18,14 +18,9 @@ package org.eclipse.mylyn.tasks.core;
/**
* @author Mik Kersten
*/
-public class TaskCategory extends AbstractTaskContainer {
+public class TaskCategory extends AbstractTaskCategory {
public TaskCategory(String handleAndDescription) {
super(handleAndDescription);
}
-
- @Override
- public final boolean isLocal() {
- return true;
- }
}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskList.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskList.java
index 24b128b6d..3173c5ca7 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskList.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskList.java
@@ -25,6 +25,8 @@ import java.util.concurrent.CopyOnWriteArraySet;
import org.eclipse.mylyn.core.MylarStatusHandler;
import org.eclipse.mylyn.internal.tasks.core.LocalTask;
import org.eclipse.mylyn.internal.tasks.core.RepositoryTaskHandleUtil;
+import org.eclipse.mylyn.internal.tasks.core.TaskArchive;
+import org.eclipse.mylyn.internal.tasks.core.UnfiledCategory;
/**
* TODO: some asymetry left between query containers and other task containers
@@ -39,13 +41,13 @@ public class TaskList {
private Map<String, AbstractTask> tasks;
- private Map<String, AbstractTaskContainer> categories;
+ private Map<String, AbstractTaskCategory> categories;
private Map<String, AbstractRepositoryQuery> queries;
private TaskArchive archiveContainer;
- private AutomaticCategory automaticCategory;
+ private UnfiledCategory automaticCategory;
private List<AbstractTask> activeTasks;
@@ -59,11 +61,11 @@ public class TaskList {
public void reset() {
tasks = new ConcurrentHashMap<String, AbstractTask>();
- categories = new ConcurrentHashMap<String, AbstractTaskContainer>();
+ categories = new ConcurrentHashMap<String, AbstractTaskCategory>();
queries = new ConcurrentHashMap<String, AbstractRepositoryQuery>();
archiveContainer = new TaskArchive();
- automaticCategory = new AutomaticCategory();
+ automaticCategory = new UnfiledCategory();
activeTasks = new CopyOnWriteArrayList<AbstractTask>();
lastTaskNum = 0;
@@ -98,7 +100,7 @@ public class TaskList {
* @param task to be added (hit, subtask, etc)
* @param container task container, query or parent task
*/
- public void addTask(AbstractTask task, AbstractTaskListElement parentElement) {
+ public void addTask(AbstractTask task, AbstractTaskContainer parentElement) {
AbstractTask newTask = tasks.get(task.getHandleIdentifier());
@@ -156,13 +158,13 @@ public class TaskList {
moveToContainer(automaticCategory, task);
}
- public void moveToContainer(AbstractTaskContainer toContainer, AbstractTask task) {
+ public void moveToContainer(AbstractTaskCategory toContainer, AbstractTask task) {
if (!tasks.containsKey(task.getHandleIdentifier())) {
tasks.put(task.getHandleIdentifier(), task);
}
- AbstractTaskContainer fromContainer = task.getCategory();
- if (fromContainer instanceof AbstractTaskContainer) {
+ AbstractTaskCategory fromContainer = task.getCategory();
+ if (fromContainer instanceof AbstractTaskCategory) {
(fromContainer).remove(task);
}
if (toContainer != null) {
@@ -197,8 +199,13 @@ public class TaskList {
}
}
+ /**
+ * Use renameTask(..) for renaming tasks.
+ */
public void renameContainer(AbstractTaskContainer container, String newDescription) {
- if (!(container instanceof TaskArchive) && !(container instanceof AutomaticCategory)) {
+ if (container instanceof AbstractTask) {
+ return;
+ } else if (!(container instanceof TaskArchive) && !(container instanceof UnfiledCategory)) {
if (queries.remove(container.getHandleIdentifier()) != null) {
container.setDescription(newDescription);
if (container instanceof AbstractRepositoryQuery) {
@@ -240,7 +247,7 @@ public class TaskList {
}
}
- public void deleteCategory(AbstractTaskContainer category) {
+ public void deleteCategory(AbstractTaskCategory category) {
for (AbstractTask task : category.getChildren()) {
automaticCategory.add(task);
}
@@ -279,12 +286,12 @@ public class TaskList {
categories.put(category.getHandleIdentifier(), category);
}
- public void internalAddTask(AbstractTask task, AbstractTaskContainer container) {
+ public void internalAddTask(AbstractTask task, AbstractTaskCategory container) {
tasks.put(task.getHandleIdentifier(), task);
if (container != null) {
container.add(task);
if (container instanceof TaskCategory) {
- task.setCategory((AbstractTaskContainer)container);
+ task.setCategory((AbstractTaskCategory)container);
}
} else {
task.setCategory(automaticCategory);
@@ -343,13 +350,13 @@ public class TaskList {
return Collections.unmodifiableSet(automaticCategory.getChildren());
}
- public Set<AbstractTaskContainer> getCategories() {
- return Collections.unmodifiableSet(new HashSet<AbstractTaskContainer>(categories.values()));
+ public Set<AbstractTaskCategory> getCategories() {
+ return Collections.unmodifiableSet(new HashSet<AbstractTaskCategory>(categories.values()));
}
- public List<AbstractTaskContainer> getUserCategories() {
- List<AbstractTaskContainer> included = new ArrayList<AbstractTaskContainer>();
- for (AbstractTaskContainer category : categories.values()) {
+ public List<AbstractTaskCategory> getUserCategories() {
+ List<AbstractTaskCategory> included = new ArrayList<AbstractTaskCategory>();
+ for (AbstractTaskCategory category : categories.values()) {
if (!(category instanceof TaskArchive)) {
included.add(category);
}
@@ -365,7 +372,7 @@ public class TaskList {
public Set<AbstractTaskContainer> getRootElements() {
Set<AbstractTaskContainer> roots = new HashSet<AbstractTaskContainer>();
roots.add(automaticCategory);
- for (AbstractTaskContainer cat : categories.values())
+ for (AbstractTaskCategory cat : categories.values())
roots.add(cat);
for (AbstractRepositoryQuery query : queries.values())
roots.add(query);
@@ -376,9 +383,9 @@ public class TaskList {
return Collections.unmodifiableCollection(tasks.values());
}
- public Set<AbstractTaskContainer> getTaskContainers() {
- Set<AbstractTaskContainer> containers = new HashSet<AbstractTaskContainer>();
- for (AbstractTaskContainer container : categories.values()) {
+ public Set<AbstractTaskCategory> getTaskContainers() {
+ Set<AbstractTaskCategory> containers = new HashSet<AbstractTaskCategory>();
+ for (AbstractTaskCategory container : categories.values()) {
if (container instanceof TaskCategory || container instanceof TaskArchive) {
containers.add(container);
}
@@ -449,9 +456,9 @@ public class TaskList {
return null;
}
- public AbstractTaskContainer getContainerForHandle(String categoryHandle) {
- for (AbstractTaskContainer cat : categories.values()) {
- if (cat instanceof AbstractTaskContainer) {
+ public AbstractTaskCategory getContainerForHandle(String categoryHandle) {
+ for (AbstractTaskCategory cat : categories.values()) {
+ if (cat instanceof AbstractTaskCategory) {
if (cat.getHandleIdentifier().equals(categoryHandle)) {
return cat;
}
@@ -460,7 +467,7 @@ public class TaskList {
return null;
}
- public AbstractTaskContainer getAutomaticCategory() {
+ public AbstractTaskCategory getAutomaticCategory() {
return automaticCategory;
}
@@ -607,7 +614,7 @@ public class TaskList {
public int findLargestTaskHandle() {
int max = 0;
max = Math.max(largestTaskHandleHelper(tasks.values()), max);
- for (AbstractTaskContainer cat : getTaskContainers()) {
+ for (AbstractTaskCategory cat : getTaskContainers()) {
max = Math.max(largestTaskHandleHelper(cat.getChildren()), max);
}
return max;
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivityTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivityTest.java
index bd2050353..c711cf3c6 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivityTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivityTest.java
@@ -23,10 +23,10 @@ import org.eclipse.mylyn.internal.context.core.DegreeOfInterest;
import org.eclipse.mylyn.internal.context.core.InteractionContext;
import org.eclipse.mylyn.internal.context.core.InteractionContextManager;
import org.eclipse.mylyn.internal.context.core.ScalingFactors;
+import org.eclipse.mylyn.internal.tasks.core.DateRangeActivityDelegate;
+import org.eclipse.mylyn.internal.tasks.core.DateRangeContainer;
import org.eclipse.mylyn.internal.tasks.core.LocalTask;
import org.eclipse.mylyn.monitor.core.InteractionEvent;
-import org.eclipse.mylyn.tasks.core.DateRangeActivityDelegate;
-import org.eclipse.mylyn.tasks.core.DateRangeContainer;
import org.eclipse.mylyn.tasks.core.AbstractTask;
import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracRepositoryUi.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracRepositoryUi.java
index 39df12532..c334e00b5 100644
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracRepositoryUi.java
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracRepositoryUi.java
@@ -28,7 +28,7 @@ import org.eclipse.mylyn.internal.trac.ui.wizard.TracCustomQueryPage;
import org.eclipse.mylyn.internal.trac.ui.wizard.TracRepositorySettingsPage;
import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskListElement;
+import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
@@ -113,8 +113,8 @@ public class TracRepositoryUi extends AbstractRepositoryConnectorUi {
}
@Override
- public List<AbstractTaskListElement> getLegendItems() {
- List<AbstractTaskListElement> legendItems = new ArrayList<AbstractTaskListElement>();
+ public List<AbstractTaskContainer> getLegendItems() {
+ List<AbstractTaskContainer> legendItems = new ArrayList<AbstractTaskContainer>();
TracTask defect = new TracTask("", Kind.DEFECT.name(), Kind.DEFECT.toString());
defect.setKind(Kind.DEFECT.toString());
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracTaskExternalizer.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracTaskExternalizer.java
index ef6c0e956..3dd1fbb16 100644
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracTaskExternalizer.java
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracTaskExternalizer.java
@@ -16,7 +16,7 @@ import org.eclipse.mylyn.internal.trac.core.TracRepositoryQuery;
import org.eclipse.mylyn.internal.trac.core.TracTask;
import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskListElement;
+import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
import org.eclipse.mylyn.tasks.core.DelegatingTaskExternalizer;
import org.eclipse.mylyn.tasks.core.AbstractTask;
import org.eclipse.mylyn.tasks.core.TaskExternalizationException;
@@ -67,7 +67,7 @@ public class TracTaskExternalizer extends DelegatingTaskExternalizer {
@Override
public AbstractTask createTask(String repositoryUrl, String taskId, String summary, Element element, TaskList taskList,
- AbstractTaskListElement category, AbstractTask parent) throws TaskExternalizationException {
+ AbstractTaskContainer category, AbstractTask parent) throws TaskExternalizationException {
TracTask task = new TracTask(repositoryUrl, taskId, summary);
return task;
}

Back to the top