|
Lines 12-26
Link Here
|
| 12 |
package org.eclipse.mylyn.internal.sandbox.dev.actions; |
12 |
package org.eclipse.mylyn.internal.sandbox.dev.actions; |
| 13 |
|
13 |
|
| 14 |
import java.util.Collection; |
14 |
import java.util.Collection; |
| 15 |
import java.util.HashSet; |
|
|
| 16 |
import java.util.Iterator; |
15 |
import java.util.Iterator; |
| 17 |
import java.util.Set; |
|
|
| 18 |
|
16 |
|
| 19 |
import org.eclipse.jface.action.IAction; |
17 |
import org.eclipse.jface.action.IAction; |
| 20 |
import org.eclipse.jface.viewers.ISelection; |
18 |
import org.eclipse.jface.viewers.ISelection; |
| 21 |
import org.eclipse.mylyn.internal.tasks.core.AbstractTask; |
19 |
import org.eclipse.mylyn.internal.tasks.core.AbstractTask; |
| 22 |
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin; |
20 |
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin; |
|
|
21 |
import org.eclipse.mylyn.internal.tasks.ui.notifications.TaskListNotification; |
| 23 |
import org.eclipse.mylyn.internal.tasks.ui.notifications.TaskListNotificationReminder; |
22 |
import org.eclipse.mylyn.internal.tasks.ui.notifications.TaskListNotificationReminder; |
|
|
23 |
import org.eclipse.mylyn.internal.tasks.ui.notifications.TaskListNotifier; |
| 24 |
import org.eclipse.ui.IWorkbenchWindow; |
24 |
import org.eclipse.ui.IWorkbenchWindow; |
| 25 |
import org.eclipse.ui.IWorkbenchWindowActionDelegate; |
25 |
import org.eclipse.ui.IWorkbenchWindowActionDelegate; |
| 26 |
|
26 |
|
|
Lines 42-56
Link Here
|
| 42 |
public void run(IAction action) { |
42 |
public void run(IAction action) { |
| 43 |
Collection<AbstractTask> allTasks = TasksUiPlugin.getTaskList().getAllTasks(); |
43 |
Collection<AbstractTask> allTasks = TasksUiPlugin.getTaskList().getAllTasks(); |
| 44 |
Iterator<AbstractTask> iterator = allTasks.iterator(); |
44 |
Iterator<AbstractTask> iterator = allTasks.iterator(); |
| 45 |
Set<TaskListNotificationReminder> dummyNotifications = new HashSet<TaskListNotificationReminder>(); |
45 |
while (iterator.hasNext()) { |
| 46 |
for (int i = 0; i < 6; i++) { |
46 |
AbstractTask task = iterator.next(); |
|
|
47 |
if (task.getHandleIdentifier().equals("http://macmainz.dyndns.org/Internet/Bugzilla32-10") |
| 48 |
|| task.getHandleIdentifier().equals("http://macmainz.dyndns.org/Internet/Bugzilla32-8")) { |
| 49 |
TaskListNotifier notifier = new TaskListNotifier(TasksUiPlugin.getRepositoryModel(), |
| 50 |
TasksUiPlugin.getTaskDataManager()); |
| 51 |
TaskListNotification notification = notifier.getNotification(task, null); |
| 52 |
TasksUiPlugin.getTaskListNotificationManager().getNotifications().add(notification); |
| 53 |
} |
| 54 |
} |
| 55 |
iterator = allTasks.iterator(); |
| 56 |
for (int i = 0; i < 2; i++) { |
| 47 |
TaskListNotificationReminder notification = new TaskListNotificationReminder(iterator.next()); |
57 |
TaskListNotificationReminder notification = new TaskListNotificationReminder(iterator.next()); |
| 48 |
notification.setDescription("Mylyn is the Task-Focused UI for Eclipse that reduces information overload " |
58 |
notification.setDescription("Mylyn is the Task-Focused UI for Eclipse that reduces information overload " |
| 49 |
+ "\n..........and makes multi-tasking easy. It does this by making tasks a first class part of"); |
59 |
+ "\n..........and makes multi-tasking easy. It does this by making tasks a first class part of"); |
| 50 |
// + "Eclipse, and integrating rich and offline editing for repositories such as Bugzilla, " |
60 |
// + "Eclipse, and integrating rich and offline editing for repositories such as Bugzilla, " |
| 51 |
// + "Trac, and JIRA. Once your tasks are integrated, Mylyn monitors your work activity to " |
61 |
// + "Trac, and JIRA. Once your tasks are integrated, Mylyn monitors your work activity to " |
| 52 |
// + "inidentify information relevant to the task-at-hand, and uses this task context to focus "); |
62 |
// + "inidentify information relevant to the task-at-hand, and uses this task context to focus "); |
| 53 |
dummyNotifications.add(notification); |
|
|
| 54 |
TasksUiPlugin.getTaskListNotificationManager().getNotifications().add(notification); |
63 |
TasksUiPlugin.getTaskListNotificationManager().getNotifications().add(notification); |
| 55 |
} |
64 |
} |
| 56 |
TasksUiPlugin.getTaskListNotificationManager().showPopup(); |
65 |
TasksUiPlugin.getTaskListNotificationManager().showPopup(); |