Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Davis2015-08-25 22:49:26 +0000
committerSam Davis2015-08-26 16:53:08 +0000
commitd7d046ca38d3dfbeef93e4f7a0939d0ea436f5c2 (patch)
tree12c8688b6f8cb9ebe51fffee2dd3a657a2a6043b /org.eclipse.mylyn.tasks.ui
parent5528c60382bc995bcf112133696b4bdaf215f991 (diff)
downloadorg.eclipse.mylyn.tasks-d7d046ca38d3dfbeef93e4f7a0939d0ea436f5c2.tar.gz
org.eclipse.mylyn.tasks-d7d046ca38d3dfbeef93e4f7a0939d0ea436f5c2.tar.xz
org.eclipse.mylyn.tasks-d7d046ca38d3dfbeef93e4f7a0939d0ea436f5c2.zip
475540: enable plugins to display messages using the task list message
service Change-Id: I524a266b0ea4770a07511b543bcd4f5643337890 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=475540
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui')
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin.java1
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskListServiceMessageControl.java7
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java1
3 files changed, 6 insertions, 3 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin.java
index 4c0c1cd58..49d65c8b9 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin.java
@@ -434,7 +434,6 @@ public class TasksUiPlugin extends AbstractUIPlugin {
return false;
}
};
- message.setId("hide.nonmatching.subtasks"); //$NON-NLS-1$
message.setImage(Dialog.DLG_IMG_MESSAGE_INFO);
message.setTitle(Messages.TasksUiPlugin_Hide_Irrelevant_Subtasks);
message.setDescription(NLS.bind(Messages.TasksUiPlugin_Hide_Irrelevant_Subtasks_Message,
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskListServiceMessageControl.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskListServiceMessageControl.java
index c2cfea33c..54721b945 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskListServiceMessageControl.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskListServiceMessageControl.java
@@ -51,6 +51,7 @@ import org.eclipse.ui.handlers.IHandlerService;
* @author Steffen Pingel
* @author Torkild U. Resheim
*/
+@SuppressWarnings("restriction")
public class TaskListServiceMessageControl extends NotificationControl implements IServiceMessageListener {
private ServiceMessage currentMessage;
@@ -67,7 +68,7 @@ public class TaskListServiceMessageControl extends NotificationControl implement
@Override
protected void closeMessage() {
- if (currentMessage != null) {
+ if (currentMessage != null && currentMessage.getId() != null && !currentMessage.getId().equals("0")) { //$NON-NLS-1$
TasksUiPlugin.getDefault()
.getPreferenceStore()
.setValue(ITasksUiPreferenceConstants.LAST_SERVICE_MESSAGE_ID, currentMessage.getId());
@@ -81,6 +82,10 @@ public class TaskListServiceMessageControl extends NotificationControl implement
IPreferenceStore preferenceStore = TasksUiPlugin.getDefault().getPreferenceStore();
preferenceStore.setValue(ITasksUiPreferenceConstants.LAST_SERVICE_MESSAGE_CHECKTIME, new Date().getTime());
String lastMessageId = preferenceStore.getString(ITasksUiPreferenceConstants.LAST_SERVICE_MESSAGE_ID);
+ if (lastMessageId != null && lastMessageId.startsWith("org.eclipse.mylyn.reset.")) { //$NON-NLS-1$
+ lastMessageId = ""; //$NON-NLS-1$
+ preferenceStore.setValue(ITasksUiPreferenceConstants.LAST_SERVICE_MESSAGE_ID, lastMessageId);
+ }
for (final ServiceMessage message : event.getMessages()) {
if (!message.isValid() || message.getId().equals("-1")) { //$NON-NLS-1$
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java
index 516bce197..bb9d70f2c 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java
@@ -852,7 +852,6 @@ public class TaskListView extends AbstractTaskListView implements IPropertyChang
message.setDescription(Messages.TaskListView_Welcome_Message);
message.setTitle(Messages.TaskListView_Welcome_Message_Title);
message.setImage(Dialog.DLG_IMG_MESSAGE_INFO);
- message.setId("0"); //$NON-NLS-1$
serviceMessageControl.setMessage(message);
}

Back to the top