diff options
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn')
5 files changed, 31 insertions, 5 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskLabelDecorator.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskLabelDecorator.java index 83ec685e4..c9c0c6ed0 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskLabelDecorator.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskLabelDecorator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 Tasktop Technologies and others. + * Copyright (c) 2004, 2013 Tasktop Technologies 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 @@ -16,12 +16,14 @@ import org.eclipse.jface.viewers.IDecoration; import org.eclipse.jface.viewers.ILabelProviderListener; import org.eclipse.jface.viewers.ILightweightLabelDecorator; import org.eclipse.mylyn.commons.ui.CommonImages; +import org.eclipse.mylyn.internal.tasks.core.AbstractTask; import org.eclipse.mylyn.internal.tasks.core.ITaskRepositoryElement; import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal; import org.eclipse.mylyn.tasks.core.ITask; import org.eclipse.mylyn.tasks.core.TaskRepository; import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi; import org.eclipse.mylyn.tasks.ui.TasksUi; +import org.eclipse.mylyn.tasks.ui.TasksUiImages; /** * @author Mik Kersten @@ -44,6 +46,9 @@ public class TaskLabelDecorator implements ILightweightLabelDecorator { } else if (!task.isCompleted() && task.getDueDate() != null) { decoration.addOverlay(CommonImages.OVERLAY_DATE_DUE, IDecoration.TOP_RIGHT); } + if (hasNotes(task)) { + decoration.addOverlay(TasksUiImages.NOTES, IDecoration.BOTTOM_RIGHT); + } } else if (element instanceof ITaskRepositoryElement) { ITaskRepositoryElement repositoryElement = (ITaskRepositoryElement) element; String repositoryUrl = repositoryElement.getRepositoryUrl(); @@ -92,4 +97,11 @@ public class TaskLabelDecorator implements ILightweightLabelDecorator { return null; } + private boolean hasNotes(ITask task) { + if (task instanceof AbstractTask) { + return !((AbstractTask) task).getNotes().isEmpty(); + } + return false; + } + } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/Messages.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/Messages.java index 7ec9fdaf6..ec143d0d2 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/Messages.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/Messages.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 Tasktop Technologies and others. + * Copyright (c) 2004, 2013 Tasktop Technologies 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 @@ -97,6 +97,8 @@ public class Messages extends NLS { public static String UiLegendControl_New_task; + public static String UiLegendControl_Notes; + public static String UiLegendControl_Open_Task_List_; public static String UiLegendControl_Outgoing_changes; diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/UiLegendControl.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/UiLegendControl.java index b32621cfa..a580a6475 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/UiLegendControl.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/UiLegendControl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2008 Tasktop Technologies and others. + * Copyright (c) 2004, 2013 Tasktop Technologies 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 @@ -333,6 +333,10 @@ public class UiLegendControl extends Composite { textLabel.setForeground(themeManager.getCurrentTheme().getColorRegistry().get(CommonThemes.COLOR_OVERDUE)); imageLabel = toolkit.createLabel(activityClient, ""); //$NON-NLS-1$ + imageLabel.setImage(CommonImages.getImage(TasksUiImages.NOTES)); + toolkit.createLabel(activityClient, Messages.UiLegendControl_Notes); + + imageLabel = toolkit.createLabel(activityClient, ""); //$NON-NLS-1$ imageLabel.setImage(CommonImages.getImage(CommonImages.BLANK)); Hyperlink adjust = toolkit.createHyperlink(activityClient, Messages.UiLegendControl_Adjust_Colors_and_Fonts_, SWT.WRAP); diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/messages.properties b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/messages.properties index dc33ef9d4..fbfe2786a 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/messages.properties +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/messages.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2009 Tasktop Technologies and others. +# Copyright (c) 2009, 2013 Tasktop Technologies 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 @@ -46,6 +46,7 @@ UiLegendControl_Inactive_task_with_context=Inactive task with context UiLegendControl_Inactive_task_with_no_context=Inactive task with no context UiLegendControl_Incoming_changes=Incoming changes, open to view UiLegendControl_New_task=New task, open to view +UiLegendControl_Notes=Has Private Notes UiLegendControl_Open_Task_List_=Open Task List... UiLegendControl_Outgoing_changes=Outgoing changes UiLegendControl_Past_Due_date=Past Due date diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiImages.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiImages.java index 33d7b3c82..8bb4950bb 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiImages.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiImages.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 Tasktop Technologies and others. + * Copyright (c) 2004, 2013 Tasktop Technologies 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 @@ -39,6 +39,8 @@ public class TasksUiImages { private static final String OBJ = "obj16"; //$NON-NLS-1$ + private static final String OVERLAY = "ovr16"; //$NON-NLS-1$ + private static final String WIZBAN = "wizban"; //$NON-NLS-1$ // Tasks and Task List elements @@ -225,6 +227,11 @@ public class TasksUiImages { */ public static final ImageDescriptor IMAGE_CAPTURE_SMALL = create(TOOL_SMALL, "image_capture.png"); //$NON-NLS-1$ + /** + * @since 3.10 + */ + public static final ImageDescriptor NOTES = create(OVERLAY, "overlay-notes.gif"); //$NON-NLS-1$ + public static Image getImageForPriority(PriorityLevel priorityLevel) { if (priorityLevel == null) { return null; |