Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2005-07-13 21:06:30 -0400
committermkersten2005-07-13 21:06:30 -0400
commit558f5947e5ce6131ceb84a99d4bd66e22efcc5e5 (patch)
tree6182f6452a30fb6d936cb1733a6785dab4ad774a /org.eclipse.mylyn.tasks.ui
parent12714d5f4debdb50129f9ee38a6314b28842fc20 (diff)
downloadorg.eclipse.mylyn.tasks-558f5947e5ce6131ceb84a99d4bd66e22efcc5e5.tar.gz
org.eclipse.mylyn.tasks-558f5947e5ce6131ceb84a99d4bd66e22efcc5e5.tar.xz
org.eclipse.mylyn.tasks-558f5947e5ce6131ceb84a99d4bd66e22efcc5e5.zip
Ken's patch for Bugzilla Bug 103680
create preference page for the monitor
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui')
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/MylarTasksPlugin.java6
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/preferences/MylarTaskPreferencePage.java17
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/views/TaskListView.java30
3 files changed, 22 insertions, 31 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/MylarTasksPlugin.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/MylarTasksPlugin.java
index 9af78859b..c63f5be38 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/MylarTasksPlugin.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/MylarTasksPlugin.java
@@ -45,7 +45,6 @@ public class MylarTasksPlugin extends AbstractUIPlugin {
public static final Font BOLD = new Font(null, "Tahoma", 8, SWT.BOLD);
public static final Font ITALIC = new Font(null, "Tahoma", 8, SWT.ITALIC);
- public static final String REFRESH_QUERIES = "org.eclipse.mylar.tasks.queries.refresh";
public static final String REPORT_OPEN_EDITOR = "org.eclipse.mylar.tasks.report.open.editor";
public static final String REPORT_OPEN_INTERNAL = "org.eclipse.mylar.tasks.report.open.internal";
public static final String REPORT_OPEN_EXTERNAL = "org.eclipse.mylar.tasks.report.open.external";
@@ -200,7 +199,6 @@ public class MylarTasksPlugin extends AbstractUIPlugin {
protected void initializeDefaultPreferences(IPreferenceStore store) {
store.setDefault(SELECTED_PRIORITY, "P5");
store.setDefault(MylarPlugin.CLOSE_EDITORS, true);
- store.setDefault(REFRESH_QUERIES, false);
store.setDefault(REPORT_OPEN_EDITOR, false);
store.setDefault(REPORT_OPEN_INTERNAL, true);
store.setDefault(REPORT_OPEN_EXTERNAL, false);
@@ -282,10 +280,6 @@ public class MylarTasksPlugin extends AbstractUIPlugin {
return false;
}
}
-
- public boolean refreshOnStartUpEnabled() {
- return getPrefs().getBoolean(REFRESH_QUERIES);
- }
public Report_Open_Mode getReportMode() {
if (getPrefs().getBoolean(REPORT_OPEN_EDITOR)) {
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/preferences/MylarTaskPreferencePage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/preferences/MylarTaskPreferencePage.java
index bd2c137e4..a2adf5002 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/preferences/MylarTaskPreferencePage.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/preferences/MylarTaskPreferencePage.java
@@ -29,8 +29,7 @@ import org.eclipse.ui.IWorkbenchPreferencePage;
*/
public class MylarTaskPreferencePage extends PreferencePage implements
IWorkbenchPreferencePage {
-
- private Button refreshQueries = null;
+
private Button closeEditors = null;
private Button reportEditor = null;
private Button reportInternal = null;
@@ -63,10 +62,7 @@ public class MylarTaskPreferencePage extends PreferencePage implements
container.setLayout(gl);
closeEditors = new Button(container, SWT.CHECK);
closeEditors.setText("Close all editors automatically on task deactivation");
- closeEditors.setSelection(getPreferenceStore().getBoolean(MylarPlugin.CLOSE_EDITORS));
- refreshQueries = new Button(container, SWT.CHECK);
- refreshQueries.setText("Automatically refresh Bugzilla reports and queries on startup");
- refreshQueries.setSelection(getPreferenceStore().getBoolean(MylarTasksPlugin.REFRESH_QUERIES));
+ closeEditors.setSelection(getPreferenceStore().getBoolean(MylarPlugin.CLOSE_EDITORS));
}
private void createBugzillaReportOption(Composite parent) {
@@ -87,8 +83,7 @@ public class MylarTaskPreferencePage extends PreferencePage implements
@Override
public boolean performOk() {
- getPreferenceStore().setValue(MylarPlugin.CLOSE_EDITORS, closeEditors.getSelection());
- getPreferenceStore().setValue(MylarTasksPlugin.REFRESH_QUERIES, refreshQueries.getSelection());
+ getPreferenceStore().setValue(MylarPlugin.CLOSE_EDITORS, closeEditors.getSelection());
getPreferenceStore().setValue(MylarTasksPlugin.REPORT_OPEN_EDITOR, reportEditor.getSelection());
getPreferenceStore().setValue(MylarTasksPlugin.REPORT_OPEN_INTERNAL, reportInternal.getSelection());
getPreferenceStore().setValue(MylarTasksPlugin.REPORT_OPEN_EXTERNAL, reportExternal.getSelection());
@@ -96,8 +91,7 @@ public class MylarTaskPreferencePage extends PreferencePage implements
}
@Override
public boolean performCancel() {
- closeEditors.setSelection(getPreferenceStore().getBoolean(MylarPlugin.CLOSE_EDITORS));
- refreshQueries.setSelection(getPreferenceStore().getBoolean(MylarTasksPlugin.REFRESH_QUERIES));
+ closeEditors.setSelection(getPreferenceStore().getBoolean(MylarPlugin.CLOSE_EDITORS));
reportEditor.setSelection(getPreferenceStore().getBoolean(MylarTasksPlugin.REPORT_OPEN_EDITOR));
reportInternal.setSelection(getPreferenceStore().getBoolean(MylarTasksPlugin.REPORT_OPEN_INTERNAL));
reportExternal.setSelection(getPreferenceStore().getBoolean(MylarTasksPlugin.REPORT_OPEN_EXTERNAL));
@@ -106,8 +100,7 @@ public class MylarTaskPreferencePage extends PreferencePage implements
public void performDefaults() {
super.performDefaults();
- closeEditors.setSelection(getPreferenceStore().getDefaultBoolean(MylarPlugin.CLOSE_EDITORS));
- refreshQueries.setSelection(getPreferenceStore().getDefaultBoolean(MylarTasksPlugin.REFRESH_QUERIES));
+ closeEditors.setSelection(getPreferenceStore().getDefaultBoolean(MylarPlugin.CLOSE_EDITORS));
reportEditor.setSelection(getPreferenceStore().getDefaultBoolean(MylarTasksPlugin.REPORT_OPEN_EDITOR));
reportInternal.setSelection(getPreferenceStore().getDefaultBoolean(MylarTasksPlugin.REPORT_OPEN_INTERNAL));
reportExternal.setSelection(getPreferenceStore().getDefaultBoolean(MylarTasksPlugin.REPORT_OPEN_EXTERNAL));
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/views/TaskListView.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/views/TaskListView.java
index d820005da..74ad740aa 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/views/TaskListView.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/views/TaskListView.java
@@ -96,11 +96,9 @@ import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IMemento;
import org.eclipse.ui.IViewSite;
-import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.internal.Workbench;
import org.eclipse.ui.part.DrillDownAdapter;
import org.eclipse.ui.part.ViewPart;
@@ -601,7 +599,7 @@ public class TaskListView extends ViewPart {
}
@Override
- public void init(IViewSite site,IMemento memento) throws PartInitException {
+ public void init(IViewSite site, IMemento memento) throws PartInitException {
init(site);
this.taskListMemento = memento;
}
@@ -660,8 +658,7 @@ public class TaskListView extends ViewPart {
* to create the viewer and initialize it.
*/
@Override
- public void createPartControl(Composite parent) {
- System.err.println(">>>> creating");
+ public void createPartControl(Composite parent) {
viewer = new TreeViewer(parent, SWT.VERTICAL | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION | SWT.HIDE_SELECTION);
viewer.getTree().setHeaderVisible(true);
viewer.getTree().setLinesVisible(true);
@@ -1186,20 +1183,27 @@ public class TaskListView extends ViewPart {
}
public void resetToolbarsAndPopups() {
- final IWorkbench workbench = PlatformUI.getWorkbench();
- workbench.getDisplay().asyncExec(new Runnable() {
- public void run() {
+// init(getSite());
+// try {
+// this.
+// init(this.getViewSite());
+// } catch (PartInitException e) {
+// MylarPlugin.log(e, "Could not reset");
+// }
+// final IWorkbench workbench = PlatformUI.getWorkbench();
+// workbench.getDisplay().asyncExec(new Runnable() {
+// public void run() {
getViewSite().getActionBars().getToolBarManager().removeAll();
getViewSite().getActionBars().getMenuManager().removeAll();
fillLocalToolBar(getViewSite().getActionBars().getToolBarManager());
fillContextMenu(getViewSite().getActionBars().getMenuManager());
IActionBars bars = getViewSite().getActionBars();
bars.updateActionBars();
- getViewSite().getActionBars().getMenuManager().update(true);
- getViewSite().getActionBars().getToolBarManager().update(true);
- viewer.refresh();
- }
- });
+// getViewSite().getActionBars().getMenuManager().update(true);
+// getViewSite().getActionBars().getToolBarManager().update(true);
+// viewer.refresh();
+// }
+// });
}
}

Back to the top