Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2006-03-13 11:00:09 -0500
committermkersten2006-03-13 11:00:09 -0500
commit7ad3cbb293884c3c27aab3ca4af1ba34d8a376f1 (patch)
tree6c1763ee32f6b3cbfd533cc4bfec49cdcbf26faf
parent5b35bb9b7a599d8e1c7a02ef370271ae3adb9e37 (diff)
downloadorg.eclipse.mylyn-7ad3cbb293884c3c27aab3ca4af1ba34d8a376f1.tar.gz
org.eclipse.mylyn-7ad3cbb293884c3c27aab3ca4af1ba34d8a376f1.tar.xz
org.eclipse.mylyn-7ad3cbb293884c3c27aab3ca4af1ba34d8a376f1.zip
Progress on: 129625: make task list backed by single task container mechanism
https://bugs.eclipse.org/bugs/show_bug.cgi?id=129625
-rw-r--r--org.eclipse.mylyn.tests/src/org/eclipse/mylyn/tests/integration/ChangeDataDirTest.java13
-rw-r--r--org.eclipse.mylyn.tests/src/org/eclipse/mylyn/tests/misc/BugzillaSearchPluginTest.java14
2 files changed, 15 insertions, 12 deletions
diff --git a/org.eclipse.mylyn.tests/src/org/eclipse/mylyn/tests/integration/ChangeDataDirTest.java b/org.eclipse.mylyn.tests/src/org/eclipse/mylyn/tests/integration/ChangeDataDirTest.java
index 0553ba2..b4c1148 100644
--- a/org.eclipse.mylyn.tests/src/org/eclipse/mylyn/tests/integration/ChangeDataDirTest.java
+++ b/org.eclipse.mylyn.tests/src/org/eclipse/mylyn/tests/integration/ChangeDataDirTest.java
@@ -97,11 +97,11 @@ public class ChangeDataDirTest extends TestCase {
ITask task = new Task(handle, "label", true);
manager.getTaskList().moveToRoot(task);
- ITask readTaskBeforeMove = manager.getTaskForHandle(handle, true);
+ ITask readTaskBeforeMove = manager.getTaskList().getTask(handle);
MylarTaskListPlugin.getDefault().getTaskListSaveManager().copyDataDirContentsTo(newDataDir);
MylarPlugin.getDefault().setDataDirectory(newDataDir);
- ITask readTaskAfterMove = manager.getTaskForHandle(handle, true);
+ ITask readTaskAfterMove = manager.getTaskList().getTask(handle);
assertNotNull(readTaskAfterMove);
assertEquals(readTaskBeforeMove.getCreationDate(), readTaskAfterMove.getCreationDate());
}
@@ -113,14 +113,14 @@ public class ChangeDataDirTest extends TestCase {
Date refreshDate = new Date();
bugzillaTask.setLastRefresh(refreshDate);
- BugzillaTask readTaskBeforeMove = (BugzillaTask) manager.getTaskForHandle(handle, true);
+ BugzillaTask readTaskBeforeMove = (BugzillaTask) manager.getTaskList().getTask(handle);
assertNotNull(readTaskBeforeMove);
assertEquals(refreshDate, readTaskBeforeMove.getLastRefresh());
MylarTaskListPlugin.getDefault().getTaskListSaveManager().copyDataDirContentsTo(newDataDir);
MylarPlugin.getDefault().setDataDirectory(newDataDir);
- BugzillaTask readTaskAfterMove = (BugzillaTask) manager.getTaskForHandle(handle, true);
+ BugzillaTask readTaskAfterMove = (BugzillaTask) manager.getTaskList().getTask(handle);
assertNotNull(readTaskAfterMove);
// HACK: shoudl be checking date equality, but millis seem to differ?
assertEquals(refreshDate.toString(), readTaskAfterMove.getLastRefresh().toString());
@@ -129,7 +129,10 @@ public class ChangeDataDirTest extends TestCase {
private void addBugzillaTask(BugzillaTask newTask) {
// AbstractRepositoryClient client = MylarTaskListPlugin.getRepositoryManager().getRepositoryClient(BugzillaPlugin.REPOSITORY_KIND);
// client.addTaskToArchive(newTask);
- MylarTaskListPlugin.getTaskListManager().getTaskList().internalAddTask(newTask);
+
+ // TODO: put back?
+// MylarTaskListPlugin.getTaskListManager().getTaskList().internalAddTask(newTask);
+
// BugzillaTaskHandler handler = new BugzillaTaskHandler();
// handler.addTaskToArchive(newTask);
MylarTaskListPlugin.getTaskListManager().getTaskList().moveToRoot(newTask);
diff --git a/org.eclipse.mylyn.tests/src/org/eclipse/mylyn/tests/misc/BugzillaSearchPluginTest.java b/org.eclipse.mylyn.tests/src/org/eclipse/mylyn/tests/misc/BugzillaSearchPluginTest.java
index 1178195..ed8d286 100644
--- a/org.eclipse.mylyn.tests/src/org/eclipse/mylyn/tests/misc/BugzillaSearchPluginTest.java
+++ b/org.eclipse.mylyn.tests/src/org/eclipse/mylyn/tests/misc/BugzillaSearchPluginTest.java
@@ -233,26 +233,26 @@ public class BugzillaSearchPluginTest extends TestCase {
manager.getTaskList().addCategory(cat);
BugzillaTask bugTask1 = new BugzillaTask(bugPrefix + 94185, "<bugzilla info>", true);
- manager.getTaskList().moveToCategory(cat, bugTask1);
+ manager.getTaskList().moveToContainer(cat, bugTask1);
// cat.addTask(bugTask1);
while (bugTask1.isCurrentlySynchronizing()) {
Thread.sleep(500);
}
BugzillaTask bugTask2 = new BugzillaTask(bugPrefix + 3692, "<bugzilla info>", true);
- manager.getTaskList().moveToCategory(cat, bugTask2);
+ manager.getTaskList().moveToContainer(cat, bugTask2);
// cat.addTask(bugTask2);
while (bugTask2.isCurrentlySynchronizing()) {
Thread.sleep(500);
}
BugzillaTask bugTask3 = new BugzillaTask(bugPrefix + 3693, "<bugzilla info>", true);
- manager.getTaskList().moveToCategory(cat, bugTask3);
+ manager.getTaskList().moveToContainer(cat, bugTask3);
// cat.addTask(bugTask3);
while (bugTask3.isCurrentlySynchronizing()) {
Thread.sleep(500);
}
BugzillaTask bugTask4 = new BugzillaTask(bugPrefix + 9583, "<bugzilla info>", true);
- manager.getTaskList().moveToCategory(cat, bugTask4);
+ manager.getTaskList().moveToContainer(cat, bugTask4);
// cat.addTask(bugTask4);
while (bugTask4.isCurrentlySynchronizing()) {
Thread.sleep(500);
@@ -299,20 +299,20 @@ public class BugzillaSearchPluginTest extends TestCase {
TaskCategory cat = new TaskCategory("Testing Category", manager.getTaskList());
manager.getTaskList().addCategory(cat);
BugzillaTask bugTask1 = new BugzillaTask(bugPrefix + 94185, "<bugzilla info>", true);
- manager.getTaskList().moveToCategory(cat, bugTask1);
+ manager.getTaskList().moveToContainer(cat, bugTask1);
// cat.addTask(bugTask1);
while (bugTask1.isCurrentlySynchronizing()) {
Thread.sleep(500);
}
BugzillaTask bugTask2 = new BugzillaTask(bugPrefix + 9583, "<bugzilla info>", true);
- manager.getTaskList().moveToCategory(cat, bugTask2);
+ manager.getTaskList().moveToContainer(cat, bugTask2);
// cat.addTask(bugTask2);
while (bugTask2.isCurrentlySynchronizing()) {
Thread.sleep(500);
}
BugzillaTask bugTask3 = new BugzillaTask(bugPrefix + 3693, "<bugzilla info>", true);
- manager.getTaskList().moveToCategory(cat, bugTask3);
+ manager.getTaskList().moveToContainer(cat, bugTask3);
// cat.addTask(bugTask3);
while (bugTask3.isCurrentlySynchronizing()) {
Thread.sleep(500);

Back to the top