Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2005-10-28 21:32:53 -0400
committermkersten2005-10-28 21:32:53 -0400
commit2c421b410c2cbb922b5f44fe4ac34646f0715bfb (patch)
treedf54be84ac71ab8b1cd28303287c9ded105eb1db /org.eclipse.mylyn.tasks.ui
parent9cdf709e2ac171ee1dd7b051a07101fdf7b80b01 (diff)
downloadorg.eclipse.mylyn.tasks-2c421b410c2cbb922b5f44fe4ac34646f0715bfb.tar.gz
org.eclipse.mylyn.tasks-2c421b410c2cbb922b5f44fe4ac34646f0715bfb.tar.xz
org.eclipse.mylyn.tasks-2c421b410c2cbb922b5f44fe4ac34646f0715bfb.zip
minor UI cleanup
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui')
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/views/TaskListView.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/views/TaskListView.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/views/TaskListView.java
index e0fe01618..7706325cc 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/views/TaskListView.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/views/TaskListView.java
@@ -156,6 +156,9 @@ public class TaskListView extends ViewPart {
private RemoveFromCategoryAction removeAction;
+ private TaskActivateAction activateAction = new TaskActivateAction();
+ private TaskDeactivateAction deactivateAction = new TaskDeactivateAction();
+
private MarkTaskCompleteAction completeTask;
private MarkTaskIncompleteAction incompleteTask;
private FilterCompletedTasksAction filterCompleteTask;
@@ -938,8 +941,10 @@ public class TaskListView extends ViewPart {
element = (ITaskListElement) selectedObject;
}
- addAction(new TaskActivateAction(), manager, element);
- addAction(new TaskDeactivateAction(), manager, element);
+ if (!(element instanceof ITaskListCategory) && !(element instanceof IQuery)) {
+ manager.add(activateAction);
+ manager.add(deactivateAction);
+ }
addAction(openAction, manager, element);
addAction(completeTask, manager, element);
addAction(incompleteTask, manager, element);
@@ -964,8 +969,7 @@ public class TaskListView extends ViewPart {
manager.add(menuToAdd);
}
}
-
-
+
private void addAction(Action action, IMenuManager manager, ITaskListElement element) {
manager.add(action);
if(element != null){
@@ -979,8 +983,7 @@ public class TaskListView extends ViewPart {
}
private void updateActionEnablement(Action action, ITaskListElement element){
-
- if(element instanceof ITask){
+ if(element instanceof ITask){
if(action instanceof MarkTaskCompleteAction){
if(element.isCompleted()){
action.setEnabled(false);
@@ -1039,7 +1042,6 @@ public class TaskListView extends ViewPart {
} else {
action.setEnabled(true);
}
-
// if(!canEnableGoInto){
// goIntoAction.setEnabled(false);
// }

Back to the top