Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 171470 Details for
Bug 314166
improve scheduled presentation bins and sort order
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
updated patch
clipboard.txt (text/plain), 5.97 KB, created by
Shawn Minto
on 2010-06-08 16:21:35 EDT
(
hide
)
Description:
updated patch
Filename:
MIME Type:
Creator:
Shawn Minto
Created:
2010-06-08 16:21:35 EDT
Size:
5.97 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylyn.tasks.ui >Index: src/org/eclipse/mylyn/internal/tasks/ui/views/TaskScheduleContentProvider.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskScheduleContentProvider.java,v >retrieving revision 1.50 >diff -u -r1.50 TaskScheduleContentProvider.java >--- src/org/eclipse/mylyn/internal/tasks/ui/views/TaskScheduleContentProvider.java 4 Jun 2010 15:27:40 -0000 1.50 >+++ src/org/eclipse/mylyn/internal/tasks/ui/views/TaskScheduleContentProvider.java 8 Jun 2010 20:20:54 -0000 >@@ -240,85 +240,99 @@ > } > } > >- public class Incoming extends ScheduledTaskContainer { >+ private abstract class StateTaskContainer extends ScheduledTaskContainer { > > Calendar temp = TaskActivityUtil.getCalendar(); > >- public Incoming() { >- super(taskActivityManager, new DateRange(INCOMING_TIME), Messages.TaskScheduleContentProvider_Incoming); >+ public StateTaskContainer(DateRange range, String summary) { >+ super(taskActivityManager, range, summary); > } > > @Override > public Collection<ITask> getChildren() { > Set<ITask> children = new HashSet<ITask>(); > for (ITask task : TasksUiPlugin.getTaskList().getAllTasks()) { >+ if (select(task) && include(task)) { >+ children.add(task); >+ } >+ } >+ return children; >+ } > >- if (task.getSynchronizationState().equals(SynchronizationState.INCOMING) >- || task.getSynchronizationState().equals(SynchronizationState.INCOMING_NEW)) { >- >- // 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) { >- if (taskActivityManager.isOwnedByUser(task)) { >- temp.setTime(task.getDueDate()); >- if (TaskActivityUtil.isAfterCurrentWeek(temp)) { >- children.add(task); >- continue; >- } >- } else { >- children.add(task); >- } >- } >+ private boolean include(ITask task) { >+ DateRange scheduledForDate = ((AbstractTask) task).getScheduledForDate(); > >+ // in focused mode fewer container are displayed, include additional tasks >+ if (taskListView.isFocusedMode()) { >+ if (scheduledForDate != null) { >+ if (TaskActivityUtil.isAfterCurrentWeek(scheduledForDate.getStartDate())) { >+ // scheduled for next week or later >+ return true; >+ } else { >+ // scheduled for this week or earlier >+ return false; > } >- >- // Task list is not focused. Show all incoming tasks in the Incoming bin >- if (((AbstractTask) task).getScheduledForDate() == null && task.getDueDate() != null >- && !taskActivityManager.isOwnedByUser(task)) { >- children.add(task); >- } else if (task.getDueDate() == null && ((AbstractTask) task).getScheduledForDate() == null) { >- children.add(task); >+ } else if (task.getDueDate() != null && taskActivityManager.isOwnedByUser(task)) { >+ temp.setTime(task.getDueDate()); >+ if (TaskActivityUtil.isAfterCurrentWeek(temp)) { >+ // not scheduled, due next week or later >+ return true; >+ } else { >+ // due this week or earlier >+ return false; > } > } > } >- return children; >+ >+ if (scheduledForDate == null) { >+ if (task.getDueDate() != null && !taskActivityManager.isOwnedByUser(task)) { >+ // not scheduled, due but not owned by user >+ return true; >+ } else if (task.getDueDate() == null) { >+ // not scheduled, not due >+ return true; >+ } >+ } >+ >+ if(task.isCompleted()){ >+ // make sure that all completed tasks are included >+ return true; >+ } >+ return false; > } >+ >+ protected abstract boolean select(ITask task); >+ > } > >- public class Outgoing extends ScheduledTaskContainer { >+ public class Incoming extends StateTaskContainer { > >- public Outgoing() { >- super(taskActivityManager, new DateRange(OUTGOING_TIME), Messages.TaskScheduleContentProvider_Outgoing); >+ public Incoming() { >+ super(new DateRange(INCOMING_TIME), Messages.TaskScheduleContentProvider_Incoming); > } > > @Override >- 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.OUTGOING) >- || task.getSynchronizationState().equals(SynchronizationState.OUTGOING_NEW) >- || task.getSynchronizationState().equals(SynchronizationState.CONFLICT)) { >- children.add(task); >- } >- } >- return children; >+ protected boolean select(ITask task) { >+ SynchronizationState state = task.getSynchronizationState(); >+ return state == SynchronizationState.INCOMING || state == SynchronizationState.INCOMING_NEW; > } > > } > >+ public class Outgoing extends StateTaskContainer { >+ >+ public Outgoing() { >+ super(new DateRange(OUTGOING_TIME), Messages.TaskScheduleContentProvider_Outgoing); >+ } >+ >+ @Override >+ public boolean select(ITask task) { >+ SynchronizationState state = task.getSynchronizationState(); >+ return state == SynchronizationState.OUTGOING || state == SynchronizationState.OUTGOING_NEW >+ || state == SynchronizationState.CONFLICT; >+ } >+ } >+ > public class Completed extends ScheduledTaskContainer { > > public Completed() {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 314166
:
169733
|
169920
|
169921
|
169929
|
170074
|
170075
|
171309
|
171446
|
171447
| 171470 |
171483