Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrelves2010-05-31 22:53:16 -0400
committerrelves2010-05-31 22:53:16 -0400
commit942b949cf8a665691e5628b28100b1b874e9cb31 (patch)
tree7701e9048d4aab321f3fdd317cbe33174cd55914 /org.eclipse.mylyn.tasks.ui
parent6f2694057e3b5113831d3a26cc35242720002f7c (diff)
downloadorg.eclipse.mylyn.tasks-942b949cf8a665691e5628b28100b1b874e9cb31.tar.gz
org.eclipse.mylyn.tasks-942b949cf8a665691e5628b28100b1b874e9cb31.tar.xz
org.eclipse.mylyn.tasks-942b949cf8a665691e5628b28100b1b874e9cb31.zip
NEW - bug 263528: display a repository service message to warn users of problems, updates, and other relevant information
https://bugs.eclipse.org/bugs/show_bug.cgi?id=263528
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui')
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskRepositoryUtil.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java15
2 files changed, 15 insertions, 2 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskRepositoryUtil.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskRepositoryUtil.java
index 37fe79554..fd7c7b431 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskRepositoryUtil.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskRepositoryUtil.java
@@ -56,7 +56,7 @@ public class TaskRepositoryUtil {
/**
* Template exists and is auto add enabled
*/
- private static boolean isAddAutomatically(String repositoryUrl) {
+ public static boolean isAddAutomatically(String repositoryUrl) {
for (AbstractRepositoryConnector connector : TasksUi.getRepositoryManager().getRepositoryConnectors()) {
for (RepositoryTemplate template : TasksUiPlugin.getRepositoryTemplateManager().getTemplates(
connector.getConnectorKind())) {
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 624b2307b..b1acd9c1e 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
@@ -76,6 +76,7 @@ import org.eclipse.mylyn.internal.tasks.ui.ScheduledPresentation;
import org.eclipse.mylyn.internal.tasks.ui.TaskArchiveFilter;
import org.eclipse.mylyn.internal.tasks.ui.TaskCompletionFilter;
import org.eclipse.mylyn.internal.tasks.ui.TaskPriorityFilter;
+import org.eclipse.mylyn.internal.tasks.ui.TaskRepositoryUtil;
import org.eclipse.mylyn.internal.tasks.ui.TaskWorkingSetFilter;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.mylyn.internal.tasks.ui.actions.CollapseAllAction;
@@ -106,6 +107,7 @@ import org.eclipse.mylyn.tasks.core.ITaskActivityListener;
import org.eclipse.mylyn.tasks.core.ITaskContainer;
import org.eclipse.mylyn.tasks.core.TaskActivationAdapter;
import org.eclipse.mylyn.tasks.core.TaskActivityAdapter;
+import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
import org.eclipse.mylyn.tasks.ui.ITasksUiConstants;
import org.eclipse.mylyn.tasks.ui.TaskElementLabelProvider;
@@ -943,10 +945,21 @@ public class TaskListView extends ViewPart implements IPropertyChangeListener, I
TasksUiPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(tasksUiPreferenceListener);
serviceMessageControl = new TaskListServiceMessageControl(body);
+
+ List<TaskRepository> repos = TasksUi.getRepositoryManager().getAllRepositories();
+ boolean showMessage = true;
+ for (TaskRepository repository : repos) {
+ if (!repository.getConnectorKind().equals("local") //$NON-NLS-1$
+ && !TaskRepositoryUtil.isAddAutomatically(repository.getRepositoryUrl())) {
+ showMessage = false;
+ break;
+ }
+ }
+
String lastClosedId = TasksUiPlugin.getDefault().getPreferenceStore().getString(
ITasksUiPreferenceConstants.LAST_SERVICE_MESSAGE_ID);
- if (lastClosedId.equals("")) { //$NON-NLS-1$
+ if (showMessage && lastClosedId.equals("")) { //$NON-NLS-1$
ServiceMessage message = new ServiceMessage();
message.setDescription("<a href=\"connect\">Connect</a> to your task and ALM tools."); //$NON-NLS-1$
message.setTitle("Connect Mylyn"); //$NON-NLS-1$

Back to the top