Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrelves2010-06-03 23:05:38 -0400
committerrelves2010-06-03 23:05:38 -0400
commit9bf7f2b34de2e5a084668a100a61c99d0faa94d9 (patch)
tree0861a64b1498d6641d84fb1cff7b5443d3984069 /org.eclipse.mylyn.tasks.ui
parent915cf74eb4c26aa3f441d7a5f68ad3b9a5a38ddf (diff)
downloadorg.eclipse.mylyn.tasks-9bf7f2b34de2e5a084668a100a61c99d0faa94d9.tar.gz
org.eclipse.mylyn.tasks-9bf7f2b34de2e5a084668a100a61c99d0faa94d9.tar.xz
org.eclipse.mylyn.tasks-9bf7f2b34de2e5a084668a100a61c99d0faa94d9.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/TasksUiPlugin.java7
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskListServiceMessageControl.java52
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/preferences/TasksUiPreferencePage.java82
3 files changed, 66 insertions, 75 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 a6ca41c66..23f46de15 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
@@ -659,9 +659,10 @@ public class TasksUiPlugin extends AbstractUIPlugin {
serviceMessageManager = new ServiceMessageManager(serviceMessageUrl, lastMod, etag, checktime);
- if (getPreferenceStore().getBoolean(ITasksUiPreferenceConstants.SERVICE_MESSAGES_ENABLED)) {
- serviceMessageManager.start();
- }
+ // Disabled for initial 3.4 release as per bug#263528
+// if (getPreferenceStore().getBoolean(ITasksUiPreferenceConstants.SERVICE_MESSAGES_ENABLED)) {
+// serviceMessageManager.start();
+// }
// trigger lazy initialization
new TasksUiInitializationJob().schedule();
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 fa207e3bb..123c57b60 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
@@ -20,7 +20,6 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceDialog;
import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
import org.eclipse.mylyn.internal.provisional.commons.ui.GradientCanvas;
import org.eclipse.mylyn.internal.tasks.core.notifications.IServiceMessageListener;
@@ -50,7 +49,6 @@ import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Link;
import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.PreferencesUtil;
import org.eclipse.ui.forms.FormColors;
import org.eclipse.ui.forms.IFormColors;
import org.eclipse.ui.forms.events.HyperlinkAdapter;
@@ -150,32 +148,30 @@ public class TaskListServiceMessageControl implements IServiceMessageListener {
buttonsComp.setLayout(gLayout);
- settingsLink = new ImageHyperlink(buttonsComp, SWT.NONE);
- settingsLink.setImage(CommonImages.getImage(CommonImages.NOTIFICATION_PREFERENCES));
-// TableWrapData data = new TableWrapData();
-// data.align = TableWrapData.RIGHT;
-// settingsLink.setLayoutData(data);
- settingsLink.addHyperlinkListener(new HyperlinkAdapter() {
- @Override
- public void linkActivated(HyperlinkEvent e) {
- PreferenceDialog pref = PreferencesUtil.createPreferenceDialogOn(
- TaskListServiceMessageControl.this.parent.getShell(),
- "org.eclipse.mylyn.tasks.ui.preferences", null, null); //$NON-NLS-1$
- if (pref != null) {
- pref.open();
- }
- }
-
- @Override
- public void linkEntered(HyperlinkEvent e) {
- settingsLink.setImage(CommonImages.getImage(CommonImages.NOTIFICATION_PREFERENCES_HOVER));
- }
-
- @Override
- public void linkExited(HyperlinkEvent e) {
- settingsLink.setImage(CommonImages.getImage(CommonImages.NOTIFICATION_PREFERENCES));
- }
- });
+ // Disabled for initial 3.4 release as per bug#263528
+// settingsLink = new ImageHyperlink(buttonsComp, SWT.NONE);
+// settingsLink.setImage(CommonImages.getImage(CommonImages.NOTIFICATION_PREFERENCES));
+// settingsLink.addHyperlinkListener(new HyperlinkAdapter() {
+// @Override
+// public void linkActivated(HyperlinkEvent e) {
+// PreferenceDialog pref = PreferencesUtil.createPreferenceDialogOn(
+// TaskListServiceMessageControl.this.parent.getShell(),
+// "org.eclipse.mylyn.tasks.ui.preferences", null, null); //$NON-NLS-1$
+// if (pref != null) {
+// pref.open();
+// }
+// }
+//
+// @Override
+// public void linkEntered(HyperlinkEvent e) {
+// settingsLink.setImage(CommonImages.getImage(CommonImages.NOTIFICATION_PREFERENCES_HOVER));
+// }
+//
+// @Override
+// public void linkExited(HyperlinkEvent e) {
+// settingsLink.setImage(CommonImages.getImage(CommonImages.NOTIFICATION_PREFERENCES));
+// }
+// });
closeLink = new ImageHyperlink(buttonsComp, SWT.NONE);
closeLink.setImage(CommonImages.getImage(CommonImages.NOTIFICATION_CLOSE));
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/preferences/TasksUiPreferencePage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/preferences/TasksUiPreferencePage.java
index 5d380bdcb..b48633a84 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/preferences/TasksUiPreferencePage.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/preferences/TasksUiPreferencePage.java
@@ -109,7 +109,8 @@ public class TasksUiPreferencePage extends PreferencePage implements IWorkbenchP
private Button taskListTooltipEnabledButton;
- private Button taskListServiceMessageEnabledButton;
+ // Disabled for initial 3.4 release as per bug#263528
+// private Button taskListServiceMessageEnabledButton;
public TasksUiPreferencePage() {
super();
@@ -210,22 +211,20 @@ public class TasksUiPreferencePage extends PreferencePage implements IWorkbenchP
getPreferenceStore().setValue(ITasksUiPreferenceConstants.TASK_LIST_TOOL_TIPS_ENABLED,
taskListTooltipEnabledButton.getSelection());
- getPreferenceStore().setValue(ITasksUiPreferenceConstants.SERVICE_MESSAGES_ENABLED,
- taskListServiceMessageEnabledButton.getSelection());
+ // Disabled for initial 3.4 release as per bug#263528
+// getPreferenceStore().setValue(ITasksUiPreferenceConstants.SERVICE_MESSAGES_ENABLED,
+// taskListServiceMessageEnabledButton.getSelection());
getPreferenceStore().setValue(ITasksUiPreferenceConstants.WEEK_START_DAY, getWeekStartValue());
//getPreferenceStore().setValue(TasksUiPreferenceConstants.PLANNING_STARTHOUR, hourDayStart.getSelection());
// getPreferenceStore().setValue(TasksUiPreferenceConstants.PLANNING_ENDHOUR, hourDayEnd.getSelection());
- MonitorUiPlugin.getDefault()
- .getPreferenceStore()
- .setValue(ActivityContextManager.ACTIVITY_TIMEOUT_ENABLED, timeoutEnabledButton.getSelection());
- MonitorUiPlugin.getDefault()
- .getPreferenceStore()
- .setValue(ActivityContextManager.ACTIVITY_TIMEOUT, timeoutMinutes.getSelection() * (60 * 1000));
+ MonitorUiPlugin.getDefault().getPreferenceStore().setValue(ActivityContextManager.ACTIVITY_TIMEOUT_ENABLED,
+ timeoutEnabledButton.getSelection());
+ MonitorUiPlugin.getDefault().getPreferenceStore().setValue(ActivityContextManager.ACTIVITY_TIMEOUT,
+ timeoutMinutes.getSelection() * (60 * 1000));
- MonitorUiPlugin.getDefault()
- .getPreferenceStore()
- .setValue(MonitorUiPlugin.ACTIVITY_TRACKING_ENABLED, activityTrackingEnabledButton.getSelection());
+ MonitorUiPlugin.getDefault().getPreferenceStore().setValue(MonitorUiPlugin.ACTIVITY_TRACKING_ENABLED,
+ activityTrackingEnabledButton.getSelection());
String taskDirectory = taskDirectoryText.getText();
taskDirectory = taskDirectory.replaceAll(BACKSLASH_MULTI, FORWARDSLASH);
@@ -284,8 +283,9 @@ public class TasksUiPreferencePage extends PreferencePage implements IWorkbenchP
taskListTooltipEnabledButton.setSelection(getPreferenceStore().getBoolean(
ITasksUiPreferenceConstants.TASK_LIST_TOOL_TIPS_ENABLED));
- taskListServiceMessageEnabledButton.setSelection(getPreferenceStore().getBoolean(
- ITasksUiPreferenceConstants.SERVICE_MESSAGES_ENABLED));
+ // Disabled for initial 3.4 release as per bug#263528
+// taskListServiceMessageEnabledButton.setSelection(getPreferenceStore().getBoolean(
+// ITasksUiPreferenceConstants.SERVICE_MESSAGES_ENABLED));
weekStartCombo.select(getPreferenceStore().getInt(ITasksUiPreferenceConstants.WEEK_START_DAY) - 1);
//hourDayStart.setSelection(getPreferenceStore().getInt(TasksUiPreferenceConstants.PLANNING_STARTHOUR));
@@ -294,13 +294,11 @@ public class TasksUiPreferencePage extends PreferencePage implements IWorkbenchP
int minutes = MonitorUiPlugin.getDefault().getPreferenceStore().getInt(ActivityContextManager.ACTIVITY_TIMEOUT)
/ MS_MINUTES;
timeoutMinutes.setSelection(minutes);
- timeoutEnabledButton.setSelection(MonitorUiPlugin.getDefault()
- .getPreferenceStore()
- .getBoolean(ActivityContextManager.ACTIVITY_TIMEOUT_ENABLED));
+ timeoutEnabledButton.setSelection(MonitorUiPlugin.getDefault().getPreferenceStore().getBoolean(
+ ActivityContextManager.ACTIVITY_TIMEOUT_ENABLED));
- activityTrackingEnabledButton.setSelection(MonitorUiPlugin.getDefault()
- .getPreferenceStore()
- .getBoolean(MonitorUiPlugin.ACTIVITY_TRACKING_ENABLED));
+ activityTrackingEnabledButton.setSelection(MonitorUiPlugin.getDefault().getPreferenceStore().getBoolean(
+ MonitorUiPlugin.ACTIVITY_TRACKING_ENABLED));
return true;
}
@@ -323,8 +321,9 @@ public class TasksUiPreferencePage extends PreferencePage implements IWorkbenchP
taskListTooltipEnabledButton.setSelection(getPreferenceStore().getDefaultBoolean(
ITasksUiPreferenceConstants.TASK_LIST_TOOL_TIPS_ENABLED));
- taskListServiceMessageEnabledButton.setSelection(getPreferenceStore().getDefaultBoolean(
- ITasksUiPreferenceConstants.SERVICE_MESSAGES_ENABLED));
+ // Disabled for initial 3.4 release as per bug#263528
+// taskListServiceMessageEnabledButton.setSelection(getPreferenceStore().getDefaultBoolean(
+// ITasksUiPreferenceConstants.SERVICE_MESSAGES_ENABLED));
// synchQueries.setSelection(getPreferenceStore().getDefaultBoolean(
// TaskListPreferenceConstants.REPOSITORY_SYNCH_ON_STARTUP));
@@ -338,18 +337,15 @@ public class TasksUiPreferencePage extends PreferencePage implements IWorkbenchP
weekStartCombo.select(getPreferenceStore().getDefaultInt(ITasksUiPreferenceConstants.WEEK_START_DAY) - 1);
// hourDayStart.setSelection(getPreferenceStore().getDefaultInt(TasksUiPreferenceConstants.PLANNING_STARTHOUR));
// hourDayEnd.setSelection(getPreferenceStore().getDefaultInt(TasksUiPreferenceConstants.PLANNING_ENDHOUR));
- int activityTimeoutMinutes = MonitorUiPlugin.getDefault()
- .getPreferenceStore()
- .getDefaultInt(ActivityContextManager.ACTIVITY_TIMEOUT)
+ int activityTimeoutMinutes = MonitorUiPlugin.getDefault().getPreferenceStore().getDefaultInt(
+ ActivityContextManager.ACTIVITY_TIMEOUT)
/ MS_MINUTES;
timeoutMinutes.setSelection(activityTimeoutMinutes);
- timeoutEnabledButton.setSelection(MonitorUiPlugin.getDefault()
- .getPreferenceStore()
- .getDefaultBoolean(ActivityContextManager.ACTIVITY_TIMEOUT_ENABLED));
+ timeoutEnabledButton.setSelection(MonitorUiPlugin.getDefault().getPreferenceStore().getDefaultBoolean(
+ ActivityContextManager.ACTIVITY_TIMEOUT_ENABLED));
- activityTrackingEnabledButton.setSelection(MonitorUiPlugin.getDefault()
- .getPreferenceStore()
- .getDefaultBoolean(MonitorUiPlugin.ACTIVITY_TRACKING_ENABLED));
+ activityTrackingEnabledButton.setSelection(MonitorUiPlugin.getDefault().getPreferenceStore().getDefaultBoolean(
+ MonitorUiPlugin.ACTIVITY_TRACKING_ENABLED));
updateRefreshGroupEnablements();
}
@@ -500,10 +496,11 @@ public class TasksUiPreferencePage extends PreferencePage implements IWorkbenchP
taskListTooltipEnabledButton.setSelection(getPreferenceStore().getBoolean(
ITasksUiPreferenceConstants.TASK_LIST_TOOL_TIPS_ENABLED));
- taskListServiceMessageEnabledButton = new Button(group, SWT.CHECK);
- taskListServiceMessageEnabledButton.setText(Messages.TasksUiPreferencePage_show_service_messages);
- taskListServiceMessageEnabledButton.setSelection(getPreferenceStore().getBoolean(
- ITasksUiPreferenceConstants.SERVICE_MESSAGES_ENABLED));
+ // Disabled for initial 3.4 release as per bug#263528
+// taskListServiceMessageEnabledButton = new Button(group, SWT.CHECK);
+// taskListServiceMessageEnabledButton.setText(Messages.TasksUiPreferencePage_show_service_messages);
+// taskListServiceMessageEnabledButton.setSelection(getPreferenceStore().getBoolean(
+// ITasksUiPreferenceConstants.SERVICE_MESSAGES_ENABLED));
}
private void createTaskActivityGroup(Composite container) {
@@ -512,13 +509,11 @@ public class TasksUiPreferencePage extends PreferencePage implements IWorkbenchP
group.setLayout(new GridLayout(3, false));
group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- boolean activityTrackingEnabled = MonitorUiPlugin.getDefault()
- .getPreferenceStore()
- .getBoolean(MonitorUiPlugin.ACTIVITY_TRACKING_ENABLED);
+ boolean activityTrackingEnabled = MonitorUiPlugin.getDefault().getPreferenceStore().getBoolean(
+ MonitorUiPlugin.ACTIVITY_TRACKING_ENABLED);
- boolean timeoutEnabled = MonitorUiPlugin.getDefault()
- .getPreferenceStore()
- .getBoolean(ActivityContextManager.ACTIVITY_TIMEOUT_ENABLED);
+ boolean timeoutEnabled = MonitorUiPlugin.getDefault().getPreferenceStore().getBoolean(
+ ActivityContextManager.ACTIVITY_TIMEOUT_ENABLED);
activityTrackingEnabledButton = new Button(group, SWT.CHECK);
activityTrackingEnabledButton.setText(Messages.TasksUiPreferencePage_Enable_Time_Tracking);
@@ -551,9 +546,8 @@ public class TasksUiPreferencePage extends PreferencePage implements IWorkbenchP
timeoutMinutes.setIncrement(5);
timeoutMinutes.setMaximum(60);
timeoutMinutes.setMinimum(1);
- long minutes = MonitorUiPlugin.getDefault()
- .getPreferenceStore()
- .getLong(ActivityContextManager.ACTIVITY_TIMEOUT)
+ long minutes = MonitorUiPlugin.getDefault().getPreferenceStore().getLong(
+ ActivityContextManager.ACTIVITY_TIMEOUT)
/ MS_MINUTES;
timeoutMinutes.setSelection((int) minutes);
timeoutMinutes.addSelectionListener(new SelectionAdapter() {

Back to the top