Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2010-06-11 09:49:10 -0400
committermkersten2010-06-11 09:49:10 -0400
commit7a6d1bdf8855d9323502c151e2552ba7cffeffcc (patch)
treef18f0d150ccee371e57e4c5f046574c58ab7d708
parente018a4cd766dd2f2272c3732f1ccb017657e6cbf (diff)
downloadorg.eclipse.mylyn.tasks-7a6d1bdf8855d9323502c151e2552ba7cffeffcc.tar.gz
org.eclipse.mylyn.tasks-7a6d1bdf8855d9323502c151e2552ba7cffeffcc.tar.xz
org.eclipse.mylyn.tasks-7a6d1bdf8855d9323502c151e2552ba7cffeffcc.zip
NEW - bug 316214: remove container decorations from the Scheduled presentation
https://bugs.eclipse.org/bugs/show_bug.cgi?id=316214
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/CustomTaskListDecorationDrawer.java17
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskElementLabelProvider.java22
2 files changed, 26 insertions, 13 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/CustomTaskListDecorationDrawer.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/CustomTaskListDecorationDrawer.java
index c5e986af4..350baca59 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/CustomTaskListDecorationDrawer.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/CustomTaskListDecorationDrawer.java
@@ -18,6 +18,7 @@ import org.eclipse.mylyn.internal.provisional.commons.ui.CommonFonts;
import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
+import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskContainer;
import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
import org.eclipse.mylyn.internal.tasks.core.UnmatchedTaskContainer;
import org.eclipse.mylyn.internal.tasks.ui.AbstractTaskListFilter;
@@ -26,8 +27,8 @@ import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.mylyn.internal.tasks.ui.util.PlatformUtil;
import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskContainer;
import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState;
+import org.eclipse.mylyn.tasks.core.ITaskContainer;
import org.eclipse.mylyn.tasks.ui.TasksUiImages;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
@@ -84,10 +85,12 @@ public class CustomTaskListDecorationDrawer implements Listener {
this.lastClippingArea = new Rectangle(0, 0, 0, 0);
this.tweakClipping = PlatformUtil.isPaintItemClippingRequired();
this.platformSpecificSquish = PlatformUtil.getTreeItemSquish();
- this.synchronizationOverlaid = TasksUiPlugin.getDefault().getPreferenceStore().getBoolean(
- ITasksUiPreferenceConstants.OVERLAYS_INCOMING_TIGHT);
- this.useStrikethroughForCompleted = TasksUiPlugin.getDefault().getPreferenceStore().getBoolean(
- ITasksUiPreferenceConstants.USE_STRIKETHROUGH_FOR_COMPLETED);
+ this.synchronizationOverlaid = TasksUiPlugin.getDefault()
+ .getPreferenceStore()
+ .getBoolean(ITasksUiPreferenceConstants.OVERLAYS_INCOMING_TIGHT);
+ this.useStrikethroughForCompleted = TasksUiPlugin.getDefault()
+ .getPreferenceStore()
+ .getBoolean(ITasksUiPreferenceConstants.USE_STRIKETHROUGH_FOR_COMPLETED);
this.focusedMode = focusedMode;
TasksUiPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(PROPERTY_LISTENER);
}
@@ -230,7 +233,9 @@ public class CustomTaskListDecorationDrawer implements Listener {
}
private boolean hideDecorationOnContainer(ITaskContainer element, TreeItem treeItem) {
- if (element instanceof UnmatchedTaskContainer) {
+ if (element instanceof ScheduledTaskContainer) {
+ return true;
+ } else if (element instanceof UnmatchedTaskContainer) {
if (!focusedMode) {
return false;
} else if (AbstractTaskListFilter.hasDescendantIncoming(element)) {
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskElementLabelProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskElementLabelProvider.java
index cebcb381c..8885e7ade 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskElementLabelProvider.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskElementLabelProvider.java
@@ -131,7 +131,11 @@ public class TaskElementLabelProvider extends LabelProvider implements IColorPro
} else if (element instanceof ScheduledTaskContainer) {
ScheduledTaskContainer scheduledTaskContainer = (ScheduledTaskContainer) element;
if (scheduledTaskContainer.getDateRange() instanceof DayDateRange) {
- compositeDescriptor.icon = CommonImages.SCHEDULE_DAY;
+ if (scheduledTaskContainer.isPresent()) {
+ compositeDescriptor.icon = CommonImages.SCHEDULE_DAY;
+ } else {
+ compositeDescriptor.icon = CommonImages.SCHEDULE;
+ }
} else if (scheduledTaskContainer.getDateRange() instanceof WeekDateRange) {
compositeDescriptor.icon = CommonImages.SCHEDULE_WEEK;
} else {
@@ -206,12 +210,16 @@ public class TaskElementLabelProvider extends LabelProvider implements IColorPro
}
}
} else if (object instanceof ITaskContainer) {
- for (ITask child : ((ITaskContainer) object).getChildren()) {
- if (child.isActive() || (child instanceof ITaskContainer && showHasActiveChild((ITaskContainer) child))) {
- return themeManager.getCurrentTheme().getColorRegistry().get(CommonThemes.COLOR_TASK_ACTIVE);
- } else if (TasksUiPlugin.getTaskActivityManager().isOverdue(child)) {
-// } else if ((child.isPastReminder() && !child.isCompleted()) || showHasChildrenPastDue(child)) {
- return themeManager.getCurrentTheme().getColorRegistry().get(CommonThemes.COLOR_OVERDUE);
+ if (object instanceof ScheduledTaskContainer) {
+ return null;
+ } else {
+ for (ITask child : ((ITaskContainer) object).getChildren()) {
+ if (child.isActive()
+ || (child instanceof ITaskContainer && showHasActiveChild((ITaskContainer) child))) {
+ return themeManager.getCurrentTheme().getColorRegistry().get(CommonThemes.COLOR_TASK_ACTIVE);
+ } else if (TasksUiPlugin.getTaskActivityManager().isOverdue(child)) {
+ return themeManager.getCurrentTheme().getColorRegistry().get(CommonThemes.COLOR_OVERDUE);
+ }
}
}
}

Back to the top