Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrelves2010-06-01 18:26:54 -0400
committerrelves2010-06-01 18:26:54 -0400
commit0ff41d785fcbb9bfcd7025a7a3b6d445ae1a30d0 (patch)
treef84cb9915f65e922c53c0a0df4bc9d8f5a68e8f4 /org.eclipse.mylyn.tasks.ui
parentebf0ba320c04a231a7182fb39fa69ea6aa50712d (diff)
downloadorg.eclipse.mylyn.tasks-0ff41d785fcbb9bfcd7025a7a3b6d445ae1a30d0.tar.gz
org.eclipse.mylyn.tasks-0ff41d785fcbb9bfcd7025a7a3b6d445ae1a30d0.tar.xz
org.eclipse.mylyn.tasks-0ff41d785fcbb9bfcd7025a7a3b6d445ae1a30d0.zip
NEW - bug 314166: fix the scheduled presentation bins and sort order
https://bugs.eclipse.org/bugs/show_bug.cgi?id=314166
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui')
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskScheduleContentProvider.java35
1 files changed, 31 insertions, 4 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskScheduleContentProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskScheduleContentProvider.java
index e660d116e..34e79a665 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskScheduleContentProvider.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskScheduleContentProvider.java
@@ -242,6 +242,8 @@ public class TaskScheduleContentProvider extends TaskListContentProvider impleme
public class Incoming extends ScheduledTaskContainer {
+ Calendar temp = TaskActivityUtil.getCalendar();
+
public Incoming() {
super(taskActivityManager, new DateRange(INCOMING_TIME), Messages.TaskScheduleContentProvider_Incoming);
}
@@ -250,15 +252,40 @@ public class TaskScheduleContentProvider extends TaskListContentProvider impleme
public Collection<ITask> getChildren() {
Set<ITask> children = new HashSet<ITask>();
for (ITask task : TasksUiPlugin.getTaskList().getAllTasks()) {
- if (task.getDueDate() == null && ((AbstractTask) task).getScheduledForDate() == null
- && task.getSynchronizationState().equals(SynchronizationState.INCOMING)
+
+ if (task.getSynchronizationState().equals(SynchronizationState.INCOMING)
|| task.getSynchronizationState().equals(SynchronizationState.INCOMING_NEW)) {
- children.add(task);
+
+ // if focused and scheduled/due for future (and at this point has incoming, include here)
+ // because it incomings that are scheduled for this week will appear in the date range containers
+ // but incomings scheduled for next week and later would not otherwise appear when the task list
+ // is focused.
+ if (taskListView.isFocusedMode()) {
+
+ if (((AbstractTask) task).getScheduledForDate() != null) {
+ if (TaskActivityUtil.isAfterCurrentWeek(((AbstractTask) task).getScheduledForDate()
+ .getStartDate())) {
+ children.add(task);
+ continue;
+ }
+ }
+
+ if (task.getDueDate() != null) {
+ temp.setTime(task.getDueDate());
+ if (TaskActivityUtil.isAfterCurrentWeek(temp)) {
+ children.add(task);
+ continue;
+ }
+ }
+
+ } else if (task.getDueDate() == null && ((AbstractTask) task).getScheduledForDate() == null) {
+ // Task list is not focused. Show all incoming tasks in the Incoming bin
+ children.add(task);
+ }
}
}
return children;
}
-
}
public class Outgoing extends ScheduledTaskContainer {

Back to the top