Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsminto2005-07-20 23:22:19 +0000
committersminto2005-07-20 23:22:19 +0000
commit6f01a2028ba96990d51973c5614c1c581172a00f (patch)
treeb3832e7328f356f089d71d05879ca983c997683e /org.eclipse.mylyn.tasks.ui
parent4e715109bc79f1edba2624d20cbe84fd00f944b5 (diff)
downloadorg.eclipse.mylyn.tasks-6f01a2028ba96990d51973c5614c1c581172a00f.tar.gz
org.eclipse.mylyn.tasks-6f01a2028ba96990d51973c5614c1c581172a00f.tar.xz
org.eclipse.mylyn.tasks-6f01a2028ba96990d51973c5614c1c581172a00f.zip
kens patch for Bug 104260 merge TaskListManager and TaskList
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/TaskListManager.java19
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/internal/TaskList.java81
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/actions/CreateCategoryAction.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/actions/CreateTaskAction.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/actions/FilterCompletedTasksAction.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/actions/TaskActivateAction.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/preferences/MylarTaskPreferencePage.java12
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/views/TaskListView.java110
9 files changed, 135 insertions, 105 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 9ccf6f6e4..62a4588f2 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
@@ -56,6 +56,7 @@ public class MylarTasksPlugin extends AbstractUIPlugin {
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";
+ public static final String MULTIPLE_ACTIVE_TASKS = "org.eclipse.mylar.tasks.active.multipe";
public static final String FILE_EXTENSION = ".xml";
public static final String TASK_ID = "org.eclipse.mylar.tasks.userid";
@@ -209,6 +210,7 @@ public class MylarTasksPlugin extends AbstractUIPlugin {
store.setDefault(REPORT_OPEN_EDITOR, true);
store.setDefault(REPORT_OPEN_INTERNAL, false);
store.setDefault(REPORT_OPEN_EXTERNAL, false);
+ store.setDefault(MULTIPLE_ACTIVE_TASKS, false);
}
@@ -362,4 +364,8 @@ public class MylarTasksPlugin extends AbstractUIPlugin {
return false;
}
}
+
+ public boolean isMultipleMode() {
+ return getPrefs().getBoolean(MULTIPLE_ACTIVE_TASKS);
+ }
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/TaskListManager.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/TaskListManager.java
index 2f651b47b..faf870fdd 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/TaskListManager.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/TaskListManager.java
@@ -41,8 +41,9 @@ public class TaskListManager {
nextTaskId = 1;
}
}
-
+
public TaskList createNewTaskList() {
+ taskList = new TaskList();
return taskList;
}
@@ -85,6 +86,14 @@ public class TaskListManager {
this.taskList = taskList;
}
+ public void addRootTask(ITask task) {
+ taskList.addRootTask(task);
+ }
+
+ public void addCategory(AbstractCategory cat) {
+ taskList.addCategory(cat);
+ }
+
public void deleteTask(ITask task) {
taskList.setActive(task, false);
taskList.deleteTask(task);
@@ -157,8 +166,8 @@ public class TaskListManager {
}
this.taskListFile = f;
}
-
- public File getTaskListFile() {
- return taskListFile;
- }
+
+ public ITask getTaskForHandle(String handle) {
+ return taskList.getTaskForHandle(handle);
+ }
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/internal/TaskList.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/internal/TaskList.java
index b79495e83..d5c46e422 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/internal/TaskList.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/internal/TaskList.java
@@ -19,9 +19,7 @@ import java.util.List;
import org.eclipse.mylar.tasks.AbstractCategory;
import org.eclipse.mylar.tasks.ITask;
-import org.eclipse.mylar.tasks.ITaskFilter;
import org.eclipse.mylar.tasks.ITaskListElement;
-import org.eclipse.mylar.tasks.Task;
/**
@@ -34,10 +32,9 @@ public class TaskList implements Serializable {
private List<ITask> rootTasks = new ArrayList<ITask>();
private List<AbstractCategory> categories = new ArrayList<AbstractCategory>();
private transient List<ITask> activeTasks = new ArrayList<ITask>();
- private List<ITaskFilter> filters = new ArrayList<ITaskFilter>();
public void addRootTask(ITask task) {
- rootTasks.add(task);
+ rootTasks.add(task);
}
public void addCategory(AbstractCategory cat) {
@@ -52,7 +49,7 @@ public class TaskList implements Serializable {
activeTasks.remove(task);
}
}
-
+
public void deleteTask(ITask task) {
boolean deleted = deleteTaskHelper(rootTasks, task);
if (!deleted) {
@@ -81,9 +78,7 @@ public class TaskList implements Serializable {
public void deleteCategory(AbstractCategory category) {
categories.remove(category);
}
- /**
- * TODO: make data structure handle this traversal
- */
+
public ITask getTaskForHandle(String handle) {
ITask t = null;
for (AbstractCategory cat : categories) {
@@ -150,67 +145,11 @@ public class TaskList implements Serializable {
public List<Object> getRoots() {
List<Object> roots = new ArrayList<Object>();
- for (ITask t : rootTasks) {
- if (!filter(t)) {
- roots.add(t);
- }
- }
- for (AbstractCategory cat : categories) {
- if (selectCategory(cat)) {
- roots.add(cat);
- }
- }
+ for (ITask t : rootTasks) roots.add(t);
+ for (AbstractCategory cat : categories) roots.add(cat);
return roots;
}
- private boolean selectCategory(AbstractCategory cat) {
- List<? extends ITaskListElement> list = cat.getChildren();
- if (list.size() == 0) {
- return true;
- }
- for (int i = 0; i < list.size(); i++) {
- if (!filter(list.get(i))) {
- return true;
- }
- }
- return false;
- }
-
- public List<Object> getFilteredChildrenFor(Object parent) {
- List<Object> children = new ArrayList<Object>();
- if (parent instanceof AbstractCategory) {
- List<? extends ITaskListElement> list = ((AbstractCategory)parent).getChildren();
- for (int i = 0; i < list.size(); i++) {
- if (!filter(list.get(i))) {
- children.add(list.get(i));
- }
- }
- return children;
- } else if (parent instanceof Task) {
- List<ITask> subTasks = ((Task)parent).getChildren();
- for (ITask t : subTasks) {
- if (!filter(t)) {
- children.add(t);
- }
- }
- return children;
- }
- return new ArrayList<Object>();
- }
-
- private boolean filter(Object obj){
- for (ITaskFilter filter : filters) {
- if (!filter.select(obj)) {
- return true;
- }
- }
- return false;
- }
- public void createCategory(String description) {
- TaskCategory c = new TaskCategory(description);
- categories.add(c);
- }
-
public List<TaskCategory> getTaskCategories() {
List<TaskCategory> cats = new ArrayList<TaskCategory>();
for (AbstractCategory cat : categories) {
@@ -225,13 +164,5 @@ public class TaskList implements Serializable {
activeTasks.clear();
categories.clear();
rootTasks.clear();
- }
-
- public void addFilter(ITaskFilter filter) {
- if (!filters.contains(filter)) filters.add(filter);
- }
-
- public void removeFilter(ITaskFilter filter) {
- filters.remove(filter);
- }
+ }
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/actions/CreateCategoryAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/actions/CreateCategoryAction.java
index 67cbcc74d..323ac0468 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/actions/CreateCategoryAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/actions/CreateCategoryAction.java
@@ -42,7 +42,7 @@ public class CreateCategoryAction extends Action {
String label = input[0];
if(label == null) return;
TaskCategory cat = new TaskCategory(label);
- MylarTasksPlugin.getTaskListManager().getTaskList().addCategory(cat);
+ MylarTasksPlugin.getTaskListManager().addCategory(cat);
this.view.getViewer().refresh();
}
} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/actions/CreateTaskAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/actions/CreateTaskAction.java
index 829d7483b..813dfaf5f 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/actions/CreateTaskAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/actions/CreateTaskAction.java
@@ -59,7 +59,7 @@ public class CreateTaskAction extends Action {
// t.addSubTask(newTask);
// }
else {
- MylarTasksPlugin.getTaskListManager().getTaskList().addRootTask(newTask);
+ MylarTasksPlugin.getTaskListManager().addRootTask(newTask);
}
// MylarUiPlugin.getDefault().setHighlighterMapping(
// newTask.getHandle(),
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/actions/FilterCompletedTasksAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/actions/FilterCompletedTasksAction.java
index be8309caf..e8fceca82 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/actions/FilterCompletedTasksAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/actions/FilterCompletedTasksAction.java
@@ -38,11 +38,11 @@ public class FilterCompletedTasksAction extends Action {
// MylarPlugin.getDefault().actionObserved(this);
MylarTasksPlugin.getDefault().setFilterCompleteMode(isChecked());
if (isChecked()) {
- MylarTasksPlugin.getTaskListManager().getTaskList().addFilter(this.view.getCompleteFilter());
+ view.addFilter(this.view.getCompleteFilter());
// filterInCompleteTask.setChecked(false);
// viewer.removeFilter(inCompleteFilter);
} else {
- MylarTasksPlugin.getTaskListManager().getTaskList().removeFilter(this.view.getCompleteFilter());
+ view.removeFilter(this.view.getCompleteFilter());
}
this.view.getViewer().refresh();
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/actions/TaskActivateAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/actions/TaskActivateAction.java
index 1983b0d3c..b6a7e82bf 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/actions/TaskActivateAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/actions/TaskActivateAction.java
@@ -29,7 +29,7 @@ public class TaskActivateAction extends Action {
setId(ID);
}
- public void run() {
- MylarTasksPlugin.getTaskListManager().activateTask(task);
+ public void run() {
+ MylarTasksPlugin.getTaskListManager().activateTask(task);
}
} \ No newline at end of file
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 0f8f22811..3a0566b2b 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
@@ -34,6 +34,7 @@ public class MylarTaskPreferencePage extends PreferencePage implements
private Button reportEditor = null;
private Button reportInternal = null;
private Button reportExternal = null;
+ private Button multipleActive = null;
public MylarTaskPreferencePage() {
super();
@@ -62,7 +63,11 @@ public class MylarTaskPreferencePage extends PreferencePage implements
container.setLayout(gl);
closeEditors = new Button(container, SWT.CHECK);
closeEditors.setText("Close all editors on task deactivation (defaults to close only editors of interesting resources)");
- closeEditors.setSelection(getPreferenceStore().getBoolean(MylarPlugin.CLOSE_EDITORS));
+ closeEditors.setSelection(getPreferenceStore().getBoolean(MylarPlugin.CLOSE_EDITORS));
+
+ multipleActive = new Button(container, SWT.CHECK);
+ multipleActive.setText("Enable multiple task contexts to be active");
+ multipleActive.setSelection(getPreferenceStore().getBoolean(MylarTasksPlugin.MULTIPLE_ACTIVE_TASKS));
}
private void createBugzillaReportOption(Composite parent) {
@@ -87,6 +92,7 @@ public class MylarTaskPreferencePage extends PreferencePage implements
getPreferenceStore().setValue(MylarTasksPlugin.REPORT_OPEN_EDITOR, reportEditor.getSelection());
getPreferenceStore().setValue(MylarTasksPlugin.REPORT_OPEN_INTERNAL, reportInternal.getSelection());
getPreferenceStore().setValue(MylarTasksPlugin.REPORT_OPEN_EXTERNAL, reportExternal.getSelection());
+ getPreferenceStore().setValue(MylarTasksPlugin.MULTIPLE_ACTIVE_TASKS, multipleActive.getSelection());
return true;
}
@Override
@@ -95,6 +101,7 @@ public class MylarTaskPreferencePage extends PreferencePage implements
reportEditor.setSelection(getPreferenceStore().getBoolean(MylarTasksPlugin.REPORT_OPEN_EDITOR));
reportInternal.setSelection(getPreferenceStore().getBoolean(MylarTasksPlugin.REPORT_OPEN_INTERNAL));
reportExternal.setSelection(getPreferenceStore().getBoolean(MylarTasksPlugin.REPORT_OPEN_EXTERNAL));
+ multipleActive.setSelection(getPreferenceStore().getBoolean(MylarTasksPlugin.MULTIPLE_ACTIVE_TASKS));
return true;
}
@@ -103,6 +110,7 @@ public class MylarTaskPreferencePage extends PreferencePage implements
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));
+ reportExternal.setSelection(getPreferenceStore().getDefaultBoolean(MylarTasksPlugin.REPORT_OPEN_EXTERNAL));
+ multipleActive.setSelection(getPreferenceStore().getDefaultBoolean(MylarTasksPlugin.MULTIPLE_ACTIVE_TASKS));
}
}
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 45720adf5..c3c844966 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
@@ -12,6 +12,7 @@
package org.eclipse.mylar.tasks.ui.views;
import java.io.IOException;
+import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -49,6 +50,7 @@ import org.eclipse.mylar.core.MylarPlugin;
import org.eclipse.mylar.dt.MylarWebRef;
import org.eclipse.mylar.tasks.AbstractCategory;
import org.eclipse.mylar.tasks.ITask;
+import org.eclipse.mylar.tasks.ITaskFilter;
import org.eclipse.mylar.tasks.ITaskHandler;
import org.eclipse.mylar.tasks.ITaskListDynamicSubMenuContributor;
import org.eclipse.mylar.tasks.ITaskListElement;
@@ -131,6 +133,7 @@ public class TaskListView extends ViewPart {
// private PriorityFilter priorityFilter = new PriorityFilter();
private static TaskPriorityFilter PRIORITY_FILTER = new TaskPriorityFilter();
private static TaskCompleteFilter COMPLETE_FILTER = new TaskCompleteFilter();
+ private List<ITaskFilter> filters = new ArrayList<ITaskFilter>();
protected String[] columnNames = new String[] { "", ".", "!", "Description" };
protected int[] columnWidths = new int[] { 70, 20, 20, 120 };
@@ -373,7 +376,8 @@ public class TaskListView extends ViewPart {
}
public Object[] getElements(Object parent) {
if (parent.equals(getViewSite())) {
- return MylarTasksPlugin.getTaskListManager().getTaskList().getRoots().toArray();
+ return applyFilter(MylarTasksPlugin.getTaskListManager().getTaskList().getRoots()).toArray();
+// return MylarTasksPlugin.getTaskListManager().getTaskList().getRoots().toArray();
}
return getChildren(parent);
}
@@ -389,7 +393,7 @@ public class TaskListView extends ViewPart {
return null;
}
public Object [] getChildren(Object parent) {
- return MylarTasksPlugin.getTaskListManager().getTaskList().getFilteredChildrenFor(parent).toArray();
+ return getFilteredChildrenFor(parent).toArray();
}
public boolean hasChildren(Object parent) {
if (parent instanceof AbstractCategory) {
@@ -401,6 +405,65 @@ public class TaskListView extends ViewPart {
}
return false;
}
+ private List<Object> applyFilter(List<Object> list) {
+ List<Object> filteredRoots = new ArrayList<Object>();
+ for (int i = 0; i < list.size(); i++) {
+ if (list.get(i) instanceof ITask) {
+ if (!filter(list.get(i))) {
+ filteredRoots.add(list.get(i));
+ }
+ } else if (list.get(i) instanceof AbstractCategory) {
+ if (selectCategory((AbstractCategory)list.get(i))) {
+ filteredRoots.add(list.get(i));
+ }
+ }
+ }
+ return filteredRoots;
+ }
+
+ private boolean selectCategory(AbstractCategory cat) {
+ List<? extends ITaskListElement> list = cat.getChildren();
+ if (list.size() == 0) {
+ return true;
+ }
+ for (int i = 0; i < list.size(); i++) {
+ if (!filter(list.get(i))) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private List<Object> getFilteredChildrenFor(Object parent) {
+ List<Object> children = new ArrayList<Object>();
+ if (parent instanceof AbstractCategory) {
+ List<? extends ITaskListElement> list = ((AbstractCategory)parent).getChildren();
+ for (int i = 0; i < list.size(); i++) {
+ if (!filter(list.get(i))) {
+ children.add(list.get(i));
+ }
+ }
+ return children;
+ } else if (parent instanceof Task) {
+ List<ITask> subTasks = ((Task)parent).getChildren();
+ for (ITask t : subTasks) {
+ if (!filter(t)) {
+ children.add(t);
+ }
+ }
+ return children;
+ }
+ return new ArrayList<Object>();
+ }
+
+ private boolean filter(Object obj){
+ for (ITaskFilter filter : filters) {
+ if (!filter.select(obj)) {
+ return true;
+ }
+ }
+ return false;
+ }
}
public TaskListView() {
@@ -651,11 +714,11 @@ public class TaskListView extends ViewPart {
}
viewer.setSorter(new TaskListTableSorter(columnNames[sortIndex]));
}
- MylarTasksPlugin.getTaskListManager().getTaskList().addFilter(PRIORITY_FILTER);
+ addFilter(PRIORITY_FILTER);
// if (MylarTasksPlugin.getDefault().isFilterInCompleteMode())
// MylarTasksPlugin.getTaskListManager().getTaskList().addFilter(inCompleteFilter);
if (MylarTasksPlugin.getDefault().isFilterCompleteMode())
- MylarTasksPlugin.getTaskListManager().getTaskList().addFilter(COMPLETE_FILTER);
+ addFilter(COMPLETE_FILTER);
viewer.refresh();
}
@@ -957,19 +1020,20 @@ public class TaskListView extends ViewPart {
* children
*/
protected boolean lookForId(String taskId) {
- for (ITask task : MylarTasksPlugin.getTaskListManager().getTaskList().getRootTasks()) {
- if (task.getHandle().equals(taskId)) {
- return true;
- }
- }
- for (TaskCategory cat : MylarTasksPlugin.getTaskListManager().getTaskList().getTaskCategories()) {
- for (ITask task : cat.getChildren()) {
- if (task.getHandle().equals(taskId)) {
- return true;
- }
- }
- }
- return false;
+ return (MylarTasksPlugin.getTaskListManager().getTaskForHandle(taskId) == null);
+// for (ITask task : MylarTasksPlugin.getTaskListManager().getTaskList().getRootTasks()) {
+// if (task.getHandle().equals(taskId)) {
+// return true;
+// }
+// }
+// for (TaskCategory cat : MylarTasksPlugin.getTaskListManager().getTaskList().getTaskCategories()) {
+// for (ITask task : cat.getChildren()) {
+// if (task.getHandle().equals(taskId)) {
+// return true;
+// }
+// }
+// }
+// return false;
}
public void closeTaskEditors(ITask task, IWorkbenchPage page) throws LoginException, IOException{
@@ -1081,6 +1145,7 @@ public class TaskListView extends ViewPart {
public TaskPriorityFilter getPriorityFilter() {
return PRIORITY_FILTER;
}
+
public class TaskInputDialog extends Dialog {
private String taskName = "";
private String priority = "P3";
@@ -1161,6 +1226,17 @@ public class TaskListView extends ViewPart {
manager.update(true);
}
+ public void addFilter(ITaskFilter filter) {
+ if (!filters.contains(filter)) filters.add(filter);
+ }
+
+ public void removeFilter(ITaskFilter filter) {
+ filters.remove(filter);
+ }
+
+ public TaskListContentProvider getContentProvider() {
+ return new TaskListContentProvider();
+ }
// public void resetToolbarsAndPopups() {
// getViewSite().getActionBars().getMenuManager().removeAll();
// fillLocalPullDown(getViewSite().getActionBars().getMenuManager());

Back to the top