Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2006-01-24 13:08:49 -0500
committermkersten2006-01-24 13:08:49 -0500
commit6daf99df21892549744b557e8184d4b1cfd5be73 (patch)
tree528b6eb8c768c3adb70bd9f0e21af0c863105970
parent7ab82926cbe0f710ce8f873ecdd746be61e1e4ab (diff)
downloadorg.eclipse.mylyn.tasks-6daf99df21892549744b557e8184d4b1cfd5be73.tar.gz
org.eclipse.mylyn.tasks-6daf99df21892549744b557e8184d4b1cfd5be73.tar.xz
org.eclipse.mylyn.tasks-6daf99df21892549744b557e8184d4b1cfd5be73.zip
Progress on: update copyrights to 2006
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/AllTasklistTests.java18
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/BackgroundSaveTest.java27
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/BugzillaTaskTest.java8
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/MylarTasksTestsPlugin.java6
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/RetrieveTitleFromUrlTest.java4
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskActivityTimingTest.java32
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskDataExportTest.java14
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskHistoryTest.java122
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskListDnDTest.java6
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskListManagerTest.java302
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskListStandaloneTest.java50
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskListUiTest.java269
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskReportGeneratorTest.java2
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskRepositoryManagerTest.java20
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskTest.java14
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskTestUtil.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/BackgroundSaveTimer.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/TaskListSaveManager.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/TaskListImages.java14
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/wizards/EditRepositoryWizard.java5
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ITaskActivityListener.java4
21 files changed, 489 insertions, 434 deletions
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/AllTasklistTests.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/AllTasklistTests.java
index 6a9746d27..f89cbf1e2 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/AllTasklistTests.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/AllTasklistTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004 - 2005 University Of British Columbia and others.
+ * 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
@@ -21,22 +21,22 @@ public class AllTasklistTests {
public static Test suite() {
TestSuite suite = new TestSuite("Test for org.eclipse.mylar.tests.tasklist");
-
- //$JUnit-BEGIN$
+
+ // $JUnit-BEGIN$
suite.addTestSuite(BugzillaTaskTest.class);
suite.addTestSuite(TaskReportGeneratorTest.class);
suite.addTestSuite(TaskTest.class);
suite.addTestSuite(TaskRepositoryManagerTest.class);
suite.addTestSuite(TaskListStandaloneTest.class);
- suite.addTestSuite(TaskListManagerTest.class);
- suite.addTestSuite(TaskListUiTest.class);
- suite.addTestSuite(TaskListDnDTest.class);
- suite.addTestSuite(TaskHistoryTest.class);
+ suite.addTestSuite(TaskListManagerTest.class);
+ suite.addTestSuite(TaskListUiTest.class);
+ suite.addTestSuite(TaskListDnDTest.class);
+ suite.addTestSuite(TaskHistoryTest.class);
suite.addTestSuite(TaskDataExportTest.class);
suite.addTestSuite(BackgroundSaveTest.class);
suite.addTestSuite(TaskActivityTimingTest.class);
-// suite.addTestSuite(RetrieveTitleFromUrlTest.class);
- //$JUnit-END$
+ // suite.addTestSuite(RetrieveTitleFromUrlTest.class);
+ // $JUnit-END$
return suite;
}
}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/BackgroundSaveTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/BackgroundSaveTest.java
index 9703ecb62..a468d17f1 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/BackgroundSaveTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/BackgroundSaveTest.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * 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.mylar.tests.tasklist;
import java.io.File;
@@ -9,27 +19,28 @@ import org.eclipse.mylar.internal.tasklist.MylarTaskListPlugin;
import org.eclipse.mylar.internal.tasklist.TaskListSaveManager;
/**
- * Tests the mechanism for saving the task data periodically.
- * If this test fails unexpectedly, try adjusting the timing.
+ * Tests the mechanism for saving the task data periodically. If this test fails
+ * unexpectedly, try adjusting the timing.
*
* @author Wesley Coelho
* @author Mik Kersten (rewrite)
*/
public class BackgroundSaveTest extends TestCase {
- private BackgroundSaveTimer saveTimer ;
-
+ private BackgroundSaveTimer saveTimer;
+
private TaskListSaveManager policy;
+
protected void setUp() throws Exception {
super.setUp();
policy = MylarTaskListPlugin.getDefault().getTaskListSaveManager();
saveTimer = new BackgroundSaveTimer(MylarTaskListPlugin.getDefault().getTaskListSaveManager());
- saveTimer.setSaveIntervalMillis(50);
+ saveTimer.setSaveIntervalMillis(50);
saveTimer.start();
MylarTaskListPlugin.getDefault().getTaskListSaveManager().setForceBackgroundSave(true);
}
-
+
protected void tearDown() throws Exception {
saveTimer.stop();
super.tearDown();
@@ -39,10 +50,10 @@ public class BackgroundSaveTest extends TestCase {
public void testBackgroundSave() throws InterruptedException {
File file = MylarTaskListPlugin.getTaskListManager().getTaskListFile();
policy.saveTaskListAndContexts();
-
+
long fistModified = file.lastModified();
Thread.sleep(500);
-
+
assertTrue(file.lastModified() > fistModified);
}
}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/BugzillaTaskTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/BugzillaTaskTest.java
index 55c182008..3fab65805 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/BugzillaTaskTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/BugzillaTaskTest.java
@@ -43,16 +43,16 @@ public class BugzillaTaskTest extends TestCase {
BugReport report = new BugReport(1, IBugzillaConstants.ECLIPSE_BUGZILLA_URL);
task.setBugReport(report);
assertNull(task.getCompletionDate());
-
+
Date now = new Date();
report.addComment(new Comment(report, 1, now, "author", "author-name"));
assertNull(task.getCompletionDate());
-
+
Attribute resolvedAttribute = new Attribute(BugReport.ATTR_STATUS);
resolvedAttribute.setValue(BugReport.VAL_STATUS_RESOLVED);
report.addAttribute(resolvedAttribute);
assertEquals(now, task.getCompletionDate());
-
+
}
-
+
}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/MylarTasksTestsPlugin.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/MylarTasksTestsPlugin.java
index acd61d119..a552daba5 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/MylarTasksTestsPlugin.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/MylarTasksTestsPlugin.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004 - 2005 University Of British Columbia and others.
+ * 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
@@ -17,9 +17,9 @@ import org.osgi.framework.BundleContext;
* The main plugin class to be used in the desktop.
*/
public class MylarTasksTestsPlugin extends Plugin {
- //The shared instance.
+ // The shared instance.
private static MylarTasksTestsPlugin plugin;
-
+
/**
* The constructor.
*/
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/RetrieveTitleFromUrlTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/RetrieveTitleFromUrlTest.java
index 2377344ce..193ad11b8 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/RetrieveTitleFromUrlTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/RetrieveTitleFromUrlTest.java
@@ -27,7 +27,7 @@ public class RetrieveTitleFromUrlTest extends TestCase {
public void testRetrieve() throws InterruptedException, InvocationTargetException {
final String url = "http://eclipse.org/mylar/index.php";
final String knownTitle = "Mylar Technology Project";
-
+
RetrieveTitleFromUrlJob job = new RetrieveTitleFromUrlJob(url) {
public void setTitle(String title) {
@@ -35,7 +35,7 @@ public class RetrieveTitleFromUrlTest extends TestCase {
}
};
job.run(new NullProgressMonitor());
-
+
assertTrue(job.isTitleRetrieved());
assertEquals(knownTitle, job.getPageTitle());
}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskActivityTimingTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskActivityTimingTest.java
index 68e133acc..2facdb068 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskActivityTimingTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskActivityTimingTest.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * 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.mylar.tests.tasklist;
import junit.framework.TestCase;
@@ -17,13 +27,13 @@ public class TaskActivityTimingTest extends TestCase {
// 5 seconds (minimum value since TimerThread sleeps
// for 5 seconds anyway before checking
-
+
private static final int SLOP = 100;
-
- private static final int SLEEP_INTERVAL = SLOP*3;
-
- private static final int TIMEOUT = SLEEP_INTERVAL*2;
-
+
+ private static final int SLEEP_INTERVAL = SLOP * 3;
+
+ private static final int TIMEOUT = SLEEP_INTERVAL * 2;
+
private static final int SLEEP_NOTIMEOUT = TIMEOUT - SLOP; // 1 second
// Introdueced long sleep for testing inactivity where TimerThread
@@ -74,7 +84,7 @@ public class TaskActivityTimingTest extends TestCase {
MylarTaskListPlugin.getTaskListManager().activateTask(task1);
TaskActivityTimer timer1 = manager.getTimerMap().get(task1);
// previous task was deactivated
- assertEquals(1, manager.getTimerMap().values().size());
+ assertEquals(1, manager.getTimerMap().values().size());
assertTrue(timer1.isStarted());
Thread.sleep(SLEEP_TIMEOUT);
@@ -101,8 +111,8 @@ public class TaskActivityTimingTest extends TestCase {
elapsed = task1.getElapsedTime();
assertTrue("should be bigger than timeout", elapsed >= TIMEOUT);
-// Task should be inactive so no time accumulated
- Thread.sleep(SLEEP_TIMEOUT);
+ // Task should be inactive so no time accumulated
+ Thread.sleep(SLEEP_TIMEOUT);
MylarTaskListPlugin.getTaskListManager().deactivateTask(task1);
long elapsedAfterDeactivation = task1.getElapsedTime();
@@ -120,8 +130,8 @@ public class TaskActivityTimingTest extends TestCase {
long elpasedAfterReactivation = task1.getElapsedTime();
// adds some slop
- assertTrue("time: " + (elpasedAfterReactivation - elapsedAfterInactivity),
- elpasedAfterReactivation - elapsedAfterInactivity + 50 >= SLEEP_TIMEOUT);
+ assertTrue("time: " + (elpasedAfterReactivation - elapsedAfterInactivity), elpasedAfterReactivation
+ - elapsedAfterInactivity + 50 >= SLEEP_TIMEOUT);
}
public void testTimeout() throws InterruptedException {
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskDataExportTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskDataExportTest.java
index 78a9fb72c..bd913f513 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskDataExportTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskDataExportTest.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * 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.mylar.tests.tasklist;
import java.io.File;
@@ -37,7 +47,7 @@ public class TaskDataExportTest extends AbstractContextTest {
protected void setUp() throws Exception {
super.setUp();
-
+
// Create the export wizard
wizard = new TaskDataExportWizard();
wizard.addPages();
@@ -70,7 +80,7 @@ public class TaskDataExportTest extends AbstractContextTest {
for (File file : files) {
file.delete();
}
-
+
destinationDir.delete();
assertFalse(destinationDir.exists());
MylarPlugin.getContextManager().contextDeactivated(mockContext.getHandleIdentifier());
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskHistoryTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskHistoryTest.java
index 859fd83c1..3fb8f71cf 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskHistoryTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskHistoryTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004 - 2005 University Of British Columbia and others.
+ * 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
@@ -34,115 +34,120 @@ import org.eclipse.ui.PartInitException;
*/
public class TaskHistoryTest extends TestCase {
- protected TaskListManager manager = MylarTaskListPlugin.getTaskListManager();
+ protected TaskListManager manager = MylarTaskListPlugin.getTaskListManager();
+
protected TaskListView taskView = null;
-
+
protected Task task1 = null;
+
protected Task task2 = null;
+
protected Task task3 = null;
+
protected Task task4 = null;
+
protected Task task5 = null;
-
+
protected void setUp() throws Exception {
super.setUp();
-
-
+
try {
- MylarTaskListPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().showView("org.eclipse.mylar.tasks.ui.views.TaskListView");
+ MylarTaskListPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(
+ "org.eclipse.mylar.tasks.ui.views.TaskListView");
} catch (PartInitException e) {
// TODO Auto-generated catch block
e.printStackTrace();
fail("View not initialized");
}
-
- assertNotNull(TaskListView.getDefault());
+
+ assertNotNull(TaskListView.getDefault());
taskView = TaskListView.getDefault();
-
+
resetHistory();
-
+
task1 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "task 1", true);
task2 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "task 2", true);
task3 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "task 3", true);
task4 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "task 4", true);
task5 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "task 5", true);
-
+
manager.moveToRoot(task1);
manager.moveToRoot(task2);
manager.moveToRoot(task3);
manager.moveToRoot(task4);
manager.moveToRoot(task5);
-
+
}
-
- private void resetHistory(){
+
+ private void resetHistory() {
taskView.clearTaskHistory();
MylarPlugin.getContextManager().resetActivityHistory();
}
-
+
/**
* Tests the next task and previous task navigation.
*/
- public void testBasicHistoryNavigation(){
+ public void testBasicHistoryNavigation() {
(new TaskActivateAction()).run(task1);
- taskView.addTaskToHistory(task1);
+ taskView.addTaskToHistory(task1);
(new TaskActivateAction()).run(task2);
- taskView.addTaskToHistory(task2);
+ taskView.addTaskToHistory(task2);
(new TaskActivateAction()).run(task3);
taskView.addTaskToHistory(task3);
-
+
assertTrue(task3.isActive());
assertFalse(task2.isActive());
taskView.getPreviousTaskAction().run();
assertTrue(task2.isActive());
-
+
taskView.getPreviousTaskAction().run();
assertTrue(task1.isActive());
-
+
taskView.getPreviousTaskAction().run();
assertTrue(task1.isActive());
-
+
taskView.getNextTaskAction().run();
assertTrue(task2.isActive());
-
+
taskView.getNextTaskAction().run();
assertTrue(task3.isActive());
-
+
taskView.getNextTaskAction().run();
assertTrue(task3.isActive());
-
+
taskView.getPreviousTaskAction().run();
- assertTrue(task2.isActive());
-
+ assertTrue(task2.isActive());
+
taskView.getNextTaskAction().run();
assertTrue(task3.isActive());
-
+
(new TaskActivateAction()).run(task4);
- taskView.addTaskToHistory(task4); //Simulate clicking on it rather than navigating next or previous
+ taskView.addTaskToHistory(task4); // Simulate clicking on it rather
+ // than navigating next or previous
assertTrue(task4.isActive());
-
+
taskView.getNextTaskAction().run();
- assertTrue(task4.isActive());
-
+ assertTrue(task4.isActive());
+
taskView.getPreviousTaskAction().run();
- assertTrue(task3.isActive());
-
+ assertTrue(task3.isActive());
+
taskView.getNextTaskAction().run();
assertTrue(task4.isActive());
-
+
}
-
+
/**
- * Tests navigation to previous/next tasks that
- * are chosen from a list rather than being
- * sequentially navigated
+ * Tests navigation to previous/next tasks that are chosen from a list
+ * rather than being sequentially navigated
*/
- public void testArbitraryHistoryNavigation(){
+ public void testArbitraryHistoryNavigation() {
resetHistory();
-
- //Simulate activating the tasks by clicking rather than
- //navigating previous/next
+
+ // Simulate activating the tasks by clicking rather than
+ // navigating previous/next
(new TaskActivateAction()).run(task1);
taskView.addTaskToHistory(task1);
(new TaskActivateAction()).run(task2);
@@ -151,40 +156,40 @@ public class TaskHistoryTest extends TestCase {
taskView.addTaskToHistory(task3);
(new TaskActivateAction()).run(task4);
taskView.addTaskToHistory(task4);
-
+
assertTrue(task4.isActive());
TaskActivationHistory taskHistory = taskView.getTaskActivationHistory();
List<ITask> prevHistoryList = taskHistory.getPreviousTasks();
-
- //Check that the previous history list looks right
+
+ // Check that the previous history list looks right
assertTrue(prevHistoryList.size() >= 3);
assertTrue(prevHistoryList.get(prevHistoryList.size() - 1) == task3);
assertTrue(prevHistoryList.get(prevHistoryList.size() - 2) == task2);
assertTrue(prevHistoryList.get(prevHistoryList.size() - 3) == task1);
-
- //Get a task from the list and activate it
+
+ // Get a task from the list and activate it
PreviousTaskDropDownAction prevAction = new PreviousTaskDropDownAction(taskView, taskHistory);
TaskNavigateAction navigateAction = prevAction.new TaskNavigateAction(task2);
navigateAction.run();
taskHistory.navigatedToTask(task2);
-
+
assertTrue(task2.isActive());
-
+
// Now check that the next and prev lists look right
prevHistoryList = taskHistory.getPreviousTasks();
assertTrue(prevHistoryList.get(prevHistoryList.size() - 1) == task1);
List<ITask> nextHistoryList = taskHistory.getNextTasks();
assertTrue(nextHistoryList.get(0) == task3);
assertTrue(nextHistoryList.get(1) == task4);
-
- //Navigate to a next item
+
+ // Navigate to a next item
NextTaskDropDownAction nextAction = new NextTaskDropDownAction(taskView, taskHistory);
navigateAction = nextAction.new TaskNavigateAction(task4);
navigateAction.run();
taskHistory.navigatedToTask(task4);
-
+
assertTrue(task4.isActive());
-
+
// Check that the prev and next lists look right
nextHistoryList = taskHistory.getNextTasks();
prevHistoryList = taskHistory.getPreviousTasks();
@@ -192,16 +197,15 @@ public class TaskHistoryTest extends TestCase {
assertTrue(prevHistoryList.get(prevHistoryList.size() - 1) == task3);
assertTrue(prevHistoryList.get(prevHistoryList.size() - 2) == task2);
assertTrue(prevHistoryList.get(prevHistoryList.size() - 3) == task1);
-
- //Check that a deactivated task appears first on the history list
+
+ // Check that a deactivated task appears first on the history list
(new TaskActivateAction()).run(task5);
(new TaskDeactivateAction()).run(task5);
taskView.addTaskToHistory(task5);
prevHistoryList = taskHistory.getPreviousTasks();
assertTrue(prevHistoryList.get(prevHistoryList.size() - 1) == task5);
-
+
}
-
protected void tearDown() throws Exception {
super.tearDown();
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskListDnDTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskListDnDTest.java
index bafc74a2e..1ca689826 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskListDnDTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskListDnDTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004 - 2005 University Of British Columbia and others.
+ * 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
@@ -63,13 +63,13 @@ public class TaskListDnDTest extends TestCase {
String url = "http://eclipse.org/mylar";
String title = "Mylar Technology Project";
String urlData = url + "\n" + title;
-
+
dropAdapter.performDrop(urlData);
List<ITask> tasks = manager.getTaskList().getRootTasks();
assertNotNull(tasks);
assertEquals(1, tasks.size());
assertEquals(url, tasks.get(0).getUrl());
-
+
// TODO: Failing due to asynchronous retrieval of title from url
// assertEquals(title, tasks.get(0).getDescription(false));
}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskListManagerTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskListManagerTest.java
index 0b935582f..ffc41335c 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskListManagerTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskListManagerTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004 - 2005 University Of British Columbia and others.
+ * 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
@@ -10,7 +10,7 @@
*******************************************************************************/
/*
* Created on Dec 21, 2004
- */
+ */
package org.eclipse.mylar.tests.tasklist;
import java.net.URL;
@@ -37,18 +37,19 @@ import org.eclipse.mylar.tasklist.TaskRepository;
* @author Mik Kersten
*/
public class TaskListManagerTest extends TestCase {
-
+
private TaskListManager manager;
-
+
private TaskRepository repository;
-
+
@Override
protected void setUp() throws Exception {
super.setUp();
manager = MylarTaskListPlugin.getTaskListManager();
manager.createNewTaskList();
-
- repository = new TaskRepository(BugzillaPlugin.REPOSITORY_KIND, new URL(IBugzillaConstants.ECLIPSE_BUGZILLA_URL));
+
+ repository = new TaskRepository(BugzillaPlugin.REPOSITORY_KIND,
+ new URL(IBugzillaConstants.ECLIPSE_BUGZILLA_URL));
MylarTaskListPlugin.getRepositoryManager().addRepository(repository);
}
@@ -60,157 +61,160 @@ public class TaskListManagerTest extends TestCase {
MylarTaskListPlugin.getRepositoryManager().removeRepository(repository);
}
- public void testRepositoryUrlHandles() {
-
- String repository = IBugzillaConstants.ECLIPSE_BUGZILLA_URL;
- String id = "123";
- String handle = TaskRepositoryManager.getHandle(repository, id);
- BugzillaTask bugTask = new BugzillaTask(handle, "label 124", true, true);
- assertEquals(repository, bugTask.getRepositoryUrl());
-
- manager.moveToRoot(bugTask);
-
- manager.saveTaskList();
- TaskList list = new TaskList();
- manager.setTaskList(list);
- manager.readExistingOrCreateNewList();
-
- BugzillaTask readReport = (BugzillaTask)manager.getTaskList().getRootTasks().get(0);
- assertEquals(readReport.getDescription(), readReport.getDescription());
- assertEquals(readReport.getRepositoryUrl(), readReport.getRepositoryUrl());
- }
-
+ public void testRepositoryUrlHandles() {
+
+ String repository = IBugzillaConstants.ECLIPSE_BUGZILLA_URL;
+ String id = "123";
+ String handle = TaskRepositoryManager.getHandle(repository, id);
+ BugzillaTask bugTask = new BugzillaTask(handle, "label 124", true, true);
+ assertEquals(repository, bugTask.getRepositoryUrl());
+
+ manager.moveToRoot(bugTask);
+
+ manager.saveTaskList();
+ TaskList list = new TaskList();
+ manager.setTaskList(list);
+ manager.readExistingOrCreateNewList();
+
+ BugzillaTask readReport = (BugzillaTask) manager.getTaskList().getRootTasks().get(0);
+ assertEquals(readReport.getDescription(), readReport.getDescription());
+ assertEquals(readReport.getRepositoryUrl(), readReport.getRepositoryUrl());
+ }
+
public void testMoves() {
- assertEquals(0, manager.getTaskList().getRootTasks().size());
+ assertEquals(0, manager.getTaskList().getRootTasks().size());
Task task1 = new Task("t1", "t1", true);
- manager.moveToRoot(task1);
- assertEquals(1, manager.getTaskList().getRootTasks().size());
- assertNull(task1.getCategory());
-
- TaskCategory cat1 = new TaskCategory("c1");
- manager.addCategory(cat1);
-
- manager.moveToCategory(cat1, task1);
- assertEquals(0, manager.getTaskList().getRootTasks().size());
- assertEquals(cat1, task1.getCategory());
-
- manager.moveToRoot(task1);
- assertEquals(1, manager.getTaskList().getRootTasks().size());
- assertEquals(0, cat1.getChildren().size());
- assertNull(task1.getCategory());
+ manager.moveToRoot(task1);
+ assertEquals(1, manager.getTaskList().getRootTasks().size());
+ assertNull(task1.getCategory());
+
+ TaskCategory cat1 = new TaskCategory("c1");
+ manager.addCategory(cat1);
+
+ manager.moveToCategory(cat1, task1);
+ assertEquals(0, manager.getTaskList().getRootTasks().size());
+ assertEquals(cat1, task1.getCategory());
+
+ manager.moveToRoot(task1);
+ assertEquals(1, manager.getTaskList().getRootTasks().size());
+ assertEquals(0, cat1.getChildren().size());
+ assertNull(task1.getCategory());
}
-
+
public void testPlans() {
-// File file = new File("foo" + MylarTaskListPlugin.FILE_EXTENSION);
-// file.deleteOnExit();
-// TaskListManager manager = new TaskListManager(file);
-
- Task task1 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "task 1", true);
- task1.addPlan("default");
- manager.moveToRoot(task1);
-
- manager.saveTaskList();
- assertNotNull(manager.getTaskList());
- TaskList list = new TaskList();
- manager.setTaskList(list);
- manager.readExistingOrCreateNewList();
- assertNotNull(manager.getTaskList());
-
- List<ITask> readList = manager.getTaskList().getRootTasks();
- ITask task = readList.get(0);
- assertEquals(1, task.getPlans().size());
- assertTrue(task.getPlans().get(0).equals("default"));
- }
-
+ // File file = new File("foo" + MylarTaskListPlugin.FILE_EXTENSION);
+ // file.deleteOnExit();
+ // TaskListManager manager = new TaskListManager(file);
+
+ Task task1 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "task 1", true);
+ task1.addPlan("default");
+ manager.moveToRoot(task1);
+
+ manager.saveTaskList();
+ assertNotNull(manager.getTaskList());
+ TaskList list = new TaskList();
+ manager.setTaskList(list);
+ manager.readExistingOrCreateNewList();
+ assertNotNull(manager.getTaskList());
+
+ List<ITask> readList = manager.getTaskList().getRootTasks();
+ ITask task = readList.get(0);
+ assertEquals(1, task.getPlans().size());
+ assertTrue(task.getPlans().get(0).equals("default"));
+ }
+
public void testQueryExternalization() {
IRepositoryQuery query = new BugzillaQueryCategory("repositoryUrl", "queryUrl", "label", "1");
- assertEquals("repositoryUrl", query.getRepositoryUrl());
- assertEquals("queryUrl", query.getQueryUrl());
+ assertEquals("repositoryUrl", query.getRepositoryUrl());
+ assertEquals("queryUrl", query.getQueryUrl());
manager.addQuery(query);
manager.saveTaskList();
- assertNotNull(manager.getTaskList());
-
- TaskList list = new TaskList();
- manager.setTaskList(list);
- manager.readExistingOrCreateNewList();
- assertEquals(1, manager.getTaskList().getQueries().size());
- IRepositoryQuery readQuery = manager.getTaskList().getQueries().get(0);
- assertEquals(query.getQueryUrl(), readQuery.getQueryUrl());
- assertEquals(query.getRepositoryUrl(), readQuery.getRepositoryUrl());
- assertEquals("repositoryUrl", readQuery.getRepositoryUrl());
+ assertNotNull(manager.getTaskList());
+
+ TaskList list = new TaskList();
+ manager.setTaskList(list);
+ manager.readExistingOrCreateNewList();
+ assertEquals(1, manager.getTaskList().getQueries().size());
+ IRepositoryQuery readQuery = manager.getTaskList().getQueries().get(0);
+ assertEquals(query.getQueryUrl(), readQuery.getQueryUrl());
+ assertEquals(query.getRepositoryUrl(), readQuery.getRepositoryUrl());
+ assertEquals("repositoryUrl", readQuery.getRepositoryUrl());
}
-
- public void testCreationAndExternalization() {
+
+ public void testCreationAndExternalization() {
Task task1 = new Task(manager.genUniqueTaskHandle(), "task 1", true);
- manager.moveToRoot(task1);
- Task sub1 = new Task(manager.genUniqueTaskHandle(), "sub 1", true);
- task1.addSubTask(sub1);
- sub1.setParent(task1);
- Task task2 = new Task(manager.genUniqueTaskHandle(), "task 2", true);
- manager.moveToRoot(task2);
-
- TaskCategory cat1 = new TaskCategory("Category 1");
- manager.addCategory(cat1);
- Task task3 = new Task(manager.genUniqueTaskHandle(), "task 3", true);
- manager.moveToCategory(cat1, task3);
- assertEquals(cat1, task3.getCategory());
- Task sub2 = new Task(manager.genUniqueTaskHandle(), "sub 2", true);
- task3.addSubTask(sub2);
- sub2.setParent(task3);
- Task task4 = new Task(manager.genUniqueTaskHandle(), "task 4", true);
- manager.moveToCategory(cat1, task4);
-
- TaskCategory cat2 = new TaskCategory("Category 2");
- manager.addCategory(cat2);
- Task task5 = new Task(manager.genUniqueTaskHandle(), "task 5", true);
- manager.moveToCategory(cat2, task5);
- Task task6 = new Task(manager.genUniqueTaskHandle(), "task 6", true);
- manager.moveToCategory(cat2, task6);
-
- BugzillaTask report = new BugzillaTask("123", "label 123", true, true);
- manager.moveToCategory(cat2, report);
- assertEquals(cat2, report.getCategory());
-
- BugzillaTask report2 = new BugzillaTask("124", "label 124", true, true);
- manager.moveToRoot(report2);
-
- assertEquals(5, manager.getTaskList().getRoots().size());
-
- manager.saveTaskList();
- assertNotNull(manager.getTaskList());
- TaskList list = new TaskList();
- manager.setTaskList(list);
- manager.readExistingOrCreateNewList();
-
- assertNotNull(manager.getTaskList());
- assertEquals(3, manager.getTaskList().getRootTasks().size()); // contains archived reports category
-
- List<ITask> readList = manager.getTaskList().getRootTasks();
- assertTrue(readList.get(0).getDescription().equals("task 1"));
- assertTrue(readList.get(0).getChildren().get(0).getDescription().equals("sub 1"));
- assertTrue(readList.get(1).getDescription().equals("task 2"));
- assertTrue(readList.get(2) instanceof BugzillaTask);
- BugzillaTask readReport = (BugzillaTask)readList.get(2);
- assertEquals(report2.getDescription(), readReport.getDescription());
-
- List<TaskCategory> readCats = manager.getTaskList().getTaskCategories();
- assertTrue(readCats.get(0).getDescription().equals(BugzillaTaskExternalizer.BUGZILLA_ARCHIVE_LABEL));
-
- assertEquals(3, manager.getTaskList().getCategories().size());
-
- TaskCategory readCat = readCats.get(1);
- readList = readCat.getChildren();
- assertTrue(readList.get(0).getDescription().equals("task 3"));
- assertEquals(readCat, readList.get(0).getCategory());
- assertTrue(readList.get(0).getChildren().get(0).getDescription().equals("sub 2"));
- assertTrue(readList.get(1).getDescription().equals("task 4"));
-
- TaskCategory readCat2 = readCats.get(2);
- readList = readCat2.getChildren();
- assertTrue(readList.get(0).getDescription().equals("task 5"));
- assertTrue(readList.get(1).getDescription().equals("task 6"));
- assertTrue(readList.get(2) instanceof BugzillaTask);
- assertEquals(readCat2, readList.get(2).getCategory());
- }
+ manager.moveToRoot(task1);
+ Task sub1 = new Task(manager.genUniqueTaskHandle(), "sub 1", true);
+ task1.addSubTask(sub1);
+ sub1.setParent(task1);
+ Task task2 = new Task(manager.genUniqueTaskHandle(), "task 2", true);
+ manager.moveToRoot(task2);
+
+ TaskCategory cat1 = new TaskCategory("Category 1");
+ manager.addCategory(cat1);
+ Task task3 = new Task(manager.genUniqueTaskHandle(), "task 3", true);
+ manager.moveToCategory(cat1, task3);
+ assertEquals(cat1, task3.getCategory());
+ Task sub2 = new Task(manager.genUniqueTaskHandle(), "sub 2", true);
+ task3.addSubTask(sub2);
+ sub2.setParent(task3);
+ Task task4 = new Task(manager.genUniqueTaskHandle(), "task 4", true);
+ manager.moveToCategory(cat1, task4);
+
+ TaskCategory cat2 = new TaskCategory("Category 2");
+ manager.addCategory(cat2);
+ Task task5 = new Task(manager.genUniqueTaskHandle(), "task 5", true);
+ manager.moveToCategory(cat2, task5);
+ Task task6 = new Task(manager.genUniqueTaskHandle(), "task 6", true);
+ manager.moveToCategory(cat2, task6);
+
+ BugzillaTask report = new BugzillaTask("123", "label 123", true, true);
+ manager.moveToCategory(cat2, report);
+ assertEquals(cat2, report.getCategory());
+
+ BugzillaTask report2 = new BugzillaTask("124", "label 124", true, true);
+ manager.moveToRoot(report2);
+
+ assertEquals(5, manager.getTaskList().getRoots().size());
+
+ manager.saveTaskList();
+ assertNotNull(manager.getTaskList());
+ TaskList list = new TaskList();
+ manager.setTaskList(list);
+ manager.readExistingOrCreateNewList();
+
+ assertNotNull(manager.getTaskList());
+ assertEquals(3, manager.getTaskList().getRootTasks().size()); // contains
+ // archived
+ // reports
+ // category
+
+ List<ITask> readList = manager.getTaskList().getRootTasks();
+ assertTrue(readList.get(0).getDescription().equals("task 1"));
+ assertTrue(readList.get(0).getChildren().get(0).getDescription().equals("sub 1"));
+ assertTrue(readList.get(1).getDescription().equals("task 2"));
+ assertTrue(readList.get(2) instanceof BugzillaTask);
+ BugzillaTask readReport = (BugzillaTask) readList.get(2);
+ assertEquals(report2.getDescription(), readReport.getDescription());
+
+ List<TaskCategory> readCats = manager.getTaskList().getTaskCategories();
+ assertTrue(readCats.get(0).getDescription().equals(BugzillaTaskExternalizer.BUGZILLA_ARCHIVE_LABEL));
+
+ assertEquals(3, manager.getTaskList().getCategories().size());
+
+ TaskCategory readCat = readCats.get(1);
+ readList = readCat.getChildren();
+ assertTrue(readList.get(0).getDescription().equals("task 3"));
+ assertEquals(readCat, readList.get(0).getCategory());
+ assertTrue(readList.get(0).getChildren().get(0).getDescription().equals("sub 2"));
+ assertTrue(readList.get(1).getDescription().equals("task 4"));
+
+ TaskCategory readCat2 = readCats.get(2);
+ readList = readCat2.getChildren();
+ assertTrue(readList.get(0).getDescription().equals("task 5"));
+ assertTrue(readList.get(1).getDescription().equals("task 6"));
+ assertTrue(readList.get(2) instanceof BugzillaTask);
+ assertEquals(readCat2, readList.get(2).getCategory());
+ }
}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskListStandaloneTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskListStandaloneTest.java
index 7d7353e2b..2393c82c6 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskListStandaloneTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskListStandaloneTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004 - 2005 University Of British Columbia and others.
+ * 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
@@ -35,26 +35,26 @@ import org.eclipse.mylar.tasklist.ITaskListExternalizer;
public class TaskListStandaloneTest extends TestCase {
private TaskListManager manager;
-
+
private File file;
-
+
@Override
protected void setUp() throws Exception {
super.setUp();
List<ITaskListExternalizer> externalizers = new ArrayList<ITaskListExternalizer>();
-
+
// bugzilla externalizer requires workbench
-// externalizers.add(new BugzillaTaskExternalizer());
-
+ // externalizers.add(new BugzillaTaskExternalizer());
+
TaskListWriter writer = new TaskListWriter();
writer.setDelegateExternalizers(externalizers);
-
+
file = new File("foo" + MylarTaskListPlugin.FILE_EXTENSION);
file.deleteOnExit();
manager = new TaskListManager(writer, file, 1);
manager.createNewTaskList();
- assertEquals("should be empty: " + manager.getTaskList().getRootTasks(),
- 0, manager.getTaskList().getRootTasks().size());
+ assertEquals("should be empty: " + manager.getTaskList().getRootTasks(), 0, manager.getTaskList()
+ .getRootTasks().size());
}
@Override
@@ -67,50 +67,50 @@ public class TaskListStandaloneTest extends TestCase {
ITask task = new Task("1", "1", true);
long now = new Date().getTime();
task.setReminderDate(new Date(now - 1000));
- assertTrue(task.isPastReminder());
-
+ assertTrue(task.isPastReminder());
+
task.setReminderDate(new Date(now + 1000));
assertFalse(task.isPastReminder());
-
+
task.setReminderDate(new Date(now - 1000));
task.setCompleted(true);
assertTrue(task.isPastReminder());
}
-
+
public void testDates() {
Date start = Calendar.getInstance().getTime();
Date creation = new Date();
Task task = new Task("1", "task 1", true);
-
+
manager.moveToRoot(task);
assertDatesCloseEnough(task.getCreationDate(), start);
-
+
task.setCompleted(true);
assertDatesCloseEnough(task.getCompletionDate(), start);
-
+
task.setReminderDate(start);
assertDatesCloseEnough(task.getReminderDate(), start);
-
+
assertEquals(manager.getTaskList().getRoots().size(), 1);
manager.saveTaskList();
-
+
assertNotNull(manager.getTaskList());
-// TaskList list = new TaskList();
-// manager.setTaskList(list);
-// assertEquals(0, manager.getTaskList().getRootTasks().size());
-// manager.readOrCreateTaskList();
-// assertNotNull(manager.getTaskList());
+ // TaskList list = new TaskList();
+ // manager.setTaskList(list);
+ // assertEquals(0, manager.getTaskList().getRootTasks().size());
+ // manager.readOrCreateTaskList();
+ // assertNotNull(manager.getTaskList());
assertEquals(1, manager.getTaskList().getRootTasks().size());
List<ITask> readList = manager.getTaskList().getRootTasks();
ITask readTask = readList.get(0);
assertTrue(readTask.getDescription().equals("task 1"));
-
+
assertEquals("should be: " + creation, task.getCreationDate(), readTask.getCreationDate());
assertEquals(task.getCompletionDate(), readTask.getCompletionDate());
assertEquals(task.getReminderDate(), readTask.getReminderDate());
}
-
+
public void assertDatesCloseEnough(Date first, Date second) {
assertTrue(second.getTime() - first.getTime() < 100);
}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskListUiTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskListUiTest.java
index 089958a53..f89a30c72 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskListUiTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskListUiTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004 - 2005 University Of British Columbia and others.
+ * 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
@@ -28,149 +28,161 @@ import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.ui.PartInitException;
/**
- * Tests TaskListView's filtering mechanism.
+ * Tests TaskListView's filtering mechanism.
+ *
* @author Ken Sueda
- *
+ *
*/
-public class TaskListUiTest extends TestCase {
+public class TaskListUiTest extends TestCase {
private TaskCategory cat1 = null;
+
private Task cat1task1 = null;
+
private Task cat1task2 = null;
+
private Task cat1task3 = null;
+
private Task cat1task4 = null;
+
private Task cat1task5 = null;
+
private Task cat1task1sub1 = null;
-
+
private TaskCategory cat2 = null;
+
private Task cat2task1 = null;
+
private Task cat2task2 = null;
+
private Task cat2task3 = null;
+
private Task cat2task4 = null;
+
private Task cat2task5 = null;
+
private Task cat2task1sub1 = null;
-
-
+
private final static int CHECK_COMPLETE_FILTER = 1;
+
private final static int CHECK_INCOMPLETE_FILTER = 2;
+
private final static int CHECK_PRIORITY_FILTER = 3;
-
- public void setUp() throws PartInitException{
+
+ public void setUp() throws PartInitException {
try {
- MylarTaskListPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().showView("org.eclipse.mylar.tasks.ui.views.TaskListView");
- TaskListManager manager = MylarTaskListPlugin.getTaskListManager();
- cat1 = new TaskCategory("First Category");
-
- cat1task1 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "task 1", true);
- cat1task1.setPriority(MylarTaskListPlugin.PriorityLevel.P1.toString());
- cat1task1.setCompleted(true);
- cat1task1.setCategory(cat1);
- manager.moveToCategory(cat1, cat1task1);
-
- cat1task1sub1 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "sub task 1", true);
- cat1task1sub1.setPriority(MylarTaskListPlugin.PriorityLevel.P1.toString());
- cat1task1sub1.setCompleted(true);
- cat1task1sub1.setParent(cat1task1);
- cat1task1.addSubTask(cat1task1sub1);
-
- cat1task2 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "task 2", true);
- cat1task2.setPriority(MylarTaskListPlugin.PriorityLevel.P2.toString());
- cat1task2.setCategory(cat1);
- manager.moveToCategory(cat1, cat1task2);
-
- cat1task3 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "task 3", true);
- cat1task3.setPriority(MylarTaskListPlugin.PriorityLevel.P3.toString());
- cat1task3.setCompleted(true);
- cat1task3.setCategory(cat1);
- manager.moveToCategory(cat1, cat1task3);
-
- cat1task4 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "task 4", true);
- cat1task4.setPriority(MylarTaskListPlugin.PriorityLevel.P4.toString());
- cat1task4.setCategory(cat1);
- manager.moveToCategory(cat1, cat1task4);
-
- cat1task5 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "task 5", true);
- cat1task5.setPriority(MylarTaskListPlugin.PriorityLevel.P5.toString());
- cat1task5.setCompleted(true);
- cat1task5.setCategory(cat1);
- manager.moveToCategory(cat1, cat1task5);
-
- manager.addCategory(cat1);
- assertEquals(cat1.getChildren().size(), 5);
-
- cat2 = new TaskCategory("Second Category");
-
- cat2task1 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "task 1", true);
- cat2task1.setPriority(MylarTaskListPlugin.PriorityLevel.P1.toString());
- cat2task1.setCategory(cat2);
- manager.moveToCategory(cat2, cat2task1);
-
- cat2task1sub1 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "sub task 1", true);
- cat2task1sub1.setPriority(MylarTaskListPlugin.PriorityLevel.P1.toString());
- cat2task1sub1.setParent(cat2task1);
- cat2task1.addSubTask(cat2task1sub1);
-
- cat2task2 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "task 2", true);
- cat2task2.setPriority(MylarTaskListPlugin.PriorityLevel.P2.toString());
- cat2task2.setCompleted(true);
- cat2task2.setCategory(cat2);
- manager.moveToCategory(cat2, cat2task2);
-
- cat2task3 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "task 3", true);
- cat2task3.setPriority(MylarTaskListPlugin.PriorityLevel.P3.toString());
- cat2task3.setCategory(cat2);
- manager.moveToCategory(cat2, cat2task3);
-
- cat2task4 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "task 4", true);
- cat2task4.setPriority(MylarTaskListPlugin.PriorityLevel.P4.toString());
- cat2task4.setCompleted(true);
- cat2task4.setCategory(cat2);
- manager.moveToCategory(cat2, cat2task4);
-
- cat2task5 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "task 5", true);
- cat2task5.setPriority(MylarTaskListPlugin.PriorityLevel.P5.toString());
- cat2task5.setCategory(cat2);
- manager.moveToCategory(cat2, cat2task5);
-
- manager.addCategory(cat2);
- manager.saveTaskList();
+ MylarTaskListPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(
+ "org.eclipse.mylar.tasks.ui.views.TaskListView");
+ TaskListManager manager = MylarTaskListPlugin.getTaskListManager();
+ cat1 = new TaskCategory("First Category");
+
+ cat1task1 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "task 1", true);
+ cat1task1.setPriority(MylarTaskListPlugin.PriorityLevel.P1.toString());
+ cat1task1.setCompleted(true);
+ cat1task1.setCategory(cat1);
+ manager.moveToCategory(cat1, cat1task1);
+
+ cat1task1sub1 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "sub task 1", true);
+ cat1task1sub1.setPriority(MylarTaskListPlugin.PriorityLevel.P1.toString());
+ cat1task1sub1.setCompleted(true);
+ cat1task1sub1.setParent(cat1task1);
+ cat1task1.addSubTask(cat1task1sub1);
+
+ cat1task2 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "task 2", true);
+ cat1task2.setPriority(MylarTaskListPlugin.PriorityLevel.P2.toString());
+ cat1task2.setCategory(cat1);
+ manager.moveToCategory(cat1, cat1task2);
+
+ cat1task3 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "task 3", true);
+ cat1task3.setPriority(MylarTaskListPlugin.PriorityLevel.P3.toString());
+ cat1task3.setCompleted(true);
+ cat1task3.setCategory(cat1);
+ manager.moveToCategory(cat1, cat1task3);
+
+ cat1task4 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "task 4", true);
+ cat1task4.setPriority(MylarTaskListPlugin.PriorityLevel.P4.toString());
+ cat1task4.setCategory(cat1);
+ manager.moveToCategory(cat1, cat1task4);
+
+ cat1task5 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "task 5", true);
+ cat1task5.setPriority(MylarTaskListPlugin.PriorityLevel.P5.toString());
+ cat1task5.setCompleted(true);
+ cat1task5.setCategory(cat1);
+ manager.moveToCategory(cat1, cat1task5);
+
+ manager.addCategory(cat1);
+ assertEquals(cat1.getChildren().size(), 5);
+
+ cat2 = new TaskCategory("Second Category");
+
+ cat2task1 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "task 1", true);
+ cat2task1.setPriority(MylarTaskListPlugin.PriorityLevel.P1.toString());
+ cat2task1.setCategory(cat2);
+ manager.moveToCategory(cat2, cat2task1);
+
+ cat2task1sub1 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "sub task 1", true);
+ cat2task1sub1.setPriority(MylarTaskListPlugin.PriorityLevel.P1.toString());
+ cat2task1sub1.setParent(cat2task1);
+ cat2task1.addSubTask(cat2task1sub1);
+
+ cat2task2 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "task 2", true);
+ cat2task2.setPriority(MylarTaskListPlugin.PriorityLevel.P2.toString());
+ cat2task2.setCompleted(true);
+ cat2task2.setCategory(cat2);
+ manager.moveToCategory(cat2, cat2task2);
+
+ cat2task3 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "task 3", true);
+ cat2task3.setPriority(MylarTaskListPlugin.PriorityLevel.P3.toString());
+ cat2task3.setCategory(cat2);
+ manager.moveToCategory(cat2, cat2task3);
+
+ cat2task4 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "task 4", true);
+ cat2task4.setPriority(MylarTaskListPlugin.PriorityLevel.P4.toString());
+ cat2task4.setCompleted(true);
+ cat2task4.setCategory(cat2);
+ manager.moveToCategory(cat2, cat2task4);
+
+ cat2task5 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "task 5", true);
+ cat2task5.setPriority(MylarTaskListPlugin.PriorityLevel.P5.toString());
+ cat2task5.setCategory(cat2);
+ manager.moveToCategory(cat2, cat2task5);
+
+ manager.addCategory(cat2);
+ manager.saveTaskList();
} catch (Exception e) {
e.printStackTrace();
}
}
-
+
public void tearDown() {
// clear everything
}
-
-
-
public void testUiFilter() {
try {
- assertNotNull(TaskListView.getDefault());
- TreeViewer viewer = TaskListView.getDefault().getViewer();
- TaskListView.getDefault().addFilter(TaskListView.getDefault().getCompleteFilter());
- viewer.refresh();
- viewer.expandAll();
- TreeItem[] items = viewer.getTree().getItems();
- assertTrue(checkFilter(CHECK_COMPLETE_FILTER, items));
- TaskListView.getDefault().removeFilter(TaskListView.getDefault().getCompleteFilter());
-
- TaskPriorityFilter filter = (TaskPriorityFilter)TaskListView.getDefault().getPriorityFilter();
- filter.displayPrioritiesAbove("P2");
- TaskListView.getDefault().addFilter(filter);
- viewer.refresh();
- viewer.expandAll();
- items = viewer.getTree().getItems();
-
- // check priority tasks
- assertTrue(checkFilter(CHECK_PRIORITY_FILTER, items));
- } catch(Exception e) {
+ assertNotNull(TaskListView.getDefault());
+ TreeViewer viewer = TaskListView.getDefault().getViewer();
+ TaskListView.getDefault().addFilter(TaskListView.getDefault().getCompleteFilter());
+ viewer.refresh();
+ viewer.expandAll();
+ TreeItem[] items = viewer.getTree().getItems();
+ assertTrue(checkFilter(CHECK_COMPLETE_FILTER, items));
+ TaskListView.getDefault().removeFilter(TaskListView.getDefault().getCompleteFilter());
+
+ TaskPriorityFilter filter = (TaskPriorityFilter) TaskListView.getDefault().getPriorityFilter();
+ filter.displayPrioritiesAbove("P2");
+ TaskListView.getDefault().addFilter(filter);
+ viewer.refresh();
+ viewer.expandAll();
+ items = viewer.getTree().getItems();
+
+ // check priority tasks
+ assertTrue(checkFilter(CHECK_PRIORITY_FILTER, items));
+ } catch (Exception e) {
e.printStackTrace();
}
}
-
+
/**
* Tests that TaskEditors remove all listeners when closed
*/
@@ -195,29 +207,30 @@ public class TaskListUiTest extends TestCase {
assertEquals(numListenersDuring, numListenersBefore + 2);
- MylarTaskListPlugin.getDefault().getWorkbench()
- .getActiveWorkbenchWindow().getActivePage().closeAllEditors(
- false);
+ MylarTaskListPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().closeAllEditors(
+ false);
listeners = manager.getListeners();
numListenersAfter = listeners.size();
assertEquals(numListenersBefore, numListenersAfter);
}
-
-
-
+
public boolean checkFilter(int type, TreeItem[] items) {
- switch(type) {
- case CHECK_COMPLETE_FILTER: return checkCompleteIncompleteFilter(items, false);
- case CHECK_INCOMPLETE_FILTER: return checkCompleteIncompleteFilter(items, true);
- case CHECK_PRIORITY_FILTER: return checkPriorityFilter(items);
- default: return false;
+ switch (type) {
+ case CHECK_COMPLETE_FILTER:
+ return checkCompleteIncompleteFilter(items, false);
+ case CHECK_INCOMPLETE_FILTER:
+ return checkCompleteIncompleteFilter(items, true);
+ case CHECK_PRIORITY_FILTER:
+ return checkPriorityFilter(items);
+ default:
+ return false;
}
}
-
+
public boolean checkCompleteIncompleteFilter(TreeItem[] items, boolean checkComplete) {
- assertEquals(2, items.length);
+ assertEquals(2, items.length);
int count = 0;
for (int i = 0; i < items.length; i++) {
assertTrue(items[i].getData() instanceof TaskCategory);
@@ -231,12 +244,12 @@ public class TaskListUiTest extends TestCase {
assertFalse(task.isCompleted());
}
count++;
- }
+ }
}
assertTrue(count == 5);
return true;
}
-
+
public boolean checkPriorityFilter(TreeItem[] items) {
assertTrue(items.length == 2);
int p2Count = 0;
@@ -253,11 +266,11 @@ public class TaskListUiTest extends TestCase {
} else {
p1Count++;
}
- }
- }
+ }
+ }
assertEquals(2, p1Count);
assertEquals(2, p2Count);
return true;
}
-
+
}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskReportGeneratorTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskReportGeneratorTest.java
index 40860c889..989e148e6 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskReportGeneratorTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskReportGeneratorTest.java
@@ -157,7 +157,7 @@ public class TaskReportGeneratorTest extends TestCase {
generator.run(new NullProgressMonitor());
assertEquals(0, generator.getAllCollectedTasks().size());
- TaskTestUtil.setBugTaskCompleted(task1, true);
+ TaskTestUtil.setBugTaskCompleted(task1, true);
generator.run(new NullProgressMonitor());
assertEquals(1, generator.getAllCollectedTasks().size());
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskRepositoryManagerTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskRepositoryManagerTest.java
index 00d3cf586..dfcd898bc 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskRepositoryManagerTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskRepositoryManagerTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004 - 2005 University Of British Columbia and others.
+ * 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
@@ -30,9 +30,11 @@ import org.eclipse.mylar.tasklist.TaskRepository;
public class TaskRepositoryManagerTest extends TestCase {
private static final String DEFAULT_KIND = BugzillaPlugin.REPOSITORY_KIND;
+
private static final String DEFAULT_URL = "http://eclipse.org";
+
private TaskRepositoryManager manager;
-
+
@Override
protected void setUp() throws Exception {
super.setUp();
@@ -49,13 +51,13 @@ public class TaskRepositoryManagerTest extends TestCase {
public void testHandles() {
String url = IBugzillaConstants.ECLIPSE_BUGZILLA_URL;
- String id = "123";
+ String id = "123";
String handle = TaskRepositoryManager.getHandle(url, id);
assertEquals(url, TaskRepositoryManager.getRepositoryUrl(handle));
assertEquals(id, TaskRepositoryManager.getTaskId(handle));
assertEquals(123, TaskRepositoryManager.getTaskIdAsInt(handle));
}
-
+
public void testMultipleNotAdded() throws MalformedURLException {
TaskRepository repository = new TaskRepository(DEFAULT_KIND, new URL(DEFAULT_URL));
manager.addRepository(repository);
@@ -66,22 +68,22 @@ public class TaskRepositoryManagerTest extends TestCase {
public void testGet() throws MalformedURLException {
assertEquals("", MylarTaskListPlugin.getPrefs().getString(TaskRepositoryManager.PREF_REPOSITORIES));
-
+
TaskRepository repository = new TaskRepository(DEFAULT_KIND, new URL(DEFAULT_URL));
manager.addRepository(repository);
assertEquals(repository, manager.getRepository(DEFAULT_KIND, DEFAULT_URL));
assertNull(manager.getRepository(DEFAULT_KIND, "foo"));
assertNull(manager.getRepository("foo", DEFAULT_URL));
}
-
+
public void testRepositoryPersistance() throws MalformedURLException {
assertEquals("", MylarTaskListPlugin.getPrefs().getString(TaskRepositoryManager.PREF_REPOSITORIES));
-
+
TaskRepository repository = new TaskRepository(DEFAULT_KIND, new URL(DEFAULT_URL));
manager.addRepository(repository);
-
+
assertNotNull(MylarTaskListPlugin.getPrefs().getString(TaskRepositoryManager.PREF_REPOSITORIES));
-
+
List<TaskRepository> repositoryList = new ArrayList<TaskRepository>();
repositoryList.add(repository);
manager.readRepositories();
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskTest.java
index 4bac8e6d6..69c2335ea 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004 - 2005 University Of British Columbia and others.
+ * 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
@@ -27,21 +27,21 @@ public class TaskTest extends TestCase {
protected void tearDown() throws Exception {
super.tearDown();
}
-
- public void testUrl() {
+
+ public void testUrl() {
Task task = new Task("handle", "label", true);
task.setUrl("http://eclipse.org/mylar/doc.php");
assertTrue(task.hasValidUrl());
-
+
task.setUrl("http://");
assertFalse(task.hasValidUrl());
-
+
task.setUrl("https://");
assertFalse(task.hasValidUrl());
-
+
task.setUrl("");
assertFalse(task.hasValidUrl());
-
+
task.setUrl(null);
assertFalse(task.hasValidUrl());
}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskTestUtil.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskTestUtil.java
index 90a67d8b4..1628aacee 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskTestUtil.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tests/tasklist/TaskTestUtil.java
@@ -34,7 +34,7 @@ public class TaskTestUtil {
resolvedAttribute.setValue(BugReport.VAL_STATUS_NEW);
}
report.addAttribute(resolvedAttribute);
-
+
Date now = new Date();
report.addComment(new Comment(report, 1, now, "author", "author-name"));
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/BackgroundSaveTimer.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/BackgroundSaveTimer.java
index 1a1089734..3730c6f34 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/BackgroundSaveTimer.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/BackgroundSaveTimer.java
@@ -38,7 +38,7 @@ public class BackgroundSaveTimer implements ITimerThreadListener {
public BackgroundSaveTimer(IBackgroundSaveListener listener) {
this.listener = listener;
timer = new TimerThread(saveInterval / 1000); // This constructor
- // wants seconds
+ // wants seconds
timer.addListener(this);
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/TaskListSaveManager.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/TaskListSaveManager.java
index 006ec78fe..de266ca80 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/TaskListSaveManager.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/TaskListSaveManager.java
@@ -78,7 +78,7 @@ public class TaskListSaveManager implements ITaskActivityListener, DisposeListen
// path = task.getHandleIdentifier();
// }
MylarPlugin.getContextManager().saveContext(task.getHandleIdentifier());// ,
- // path);
+ // path);
}
}
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/TaskListImages.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/TaskListImages.java
index a28ebaf18..2f6e79ec9 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/TaskListImages.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/TaskListImages.java
@@ -41,12 +41,14 @@ public class TaskListImages {
public static final Color BACKGROUND_ARCHIVE = new Color(Display.getDefault(), 190, 210, 238);
public static final Color GRAY_LIGHT = new Color(Display.getDefault(), 170, 170, 170); // TODO:
- // use
- // theme?
+
+ // use
+ // theme?
public static final Color COLOR_TASK_COMPLETED = new Color(Display.getDefault(), 170, 170, 170); // TODO:
- // use
- // theme?
+
+ // use
+ // theme?
public static final Color COLOR_TASK_ACTIVE = new Color(Display.getDefault(), 36, 22, 50);
@@ -210,8 +212,8 @@ public class TaskListImages {
private ImageData getImageData(ImageDescriptor descriptor) {
ImageData data = descriptor.getImageData(); // see bug 51965:
- // getImageData can
- // return null
+ // getImageData can
+ // return null
if (data == null) {
data = DEFAULT_IMAGE_DATA;
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/wizards/EditRepositoryWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/wizards/EditRepositoryWizard.java
index 030c38c64..bc97db3fc 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/wizards/EditRepositoryWizard.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/wizards/EditRepositoryWizard.java
@@ -25,8 +25,9 @@ import org.eclipse.ui.IWorkbench;
public class EditRepositoryWizard extends Wizard implements INewWizard {
private AbstractRepositorySettingsPage abstractRepositorySettingsPage;// =
- // new
- // AbstractRepositorySettingsPage();
+
+ // new
+ // AbstractRepositorySettingsPage();
public EditRepositoryWizard(TaskRepository repository) {
super();
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ITaskActivityListener.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ITaskActivityListener.java
index 6b68dd597..3a57af19c 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ITaskActivityListener.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ITaskActivityListener.java
@@ -8,9 +8,7 @@
* Contributors:
* University Of British Columbia - initial API and implementation
*******************************************************************************/
-/*
- * Created on Jan 13, 2005
- */
+
package org.eclipse.mylar.tasklist;
import java.util.List;

Back to the top