Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2005-11-03 13:15:15 -0500
committermkersten2005-11-03 13:15:15 -0500
commitf27860f0bf7134dab26b4179b2c2e399ce92fc9d (patch)
treec47b67c83e35acc5813bb5077461ac15ff599a8d /org.eclipse.mylyn.tasks.ui
parentad433d9e6dbc5d836b8c1a35b3d9b79ad6d43ae5 (diff)
downloadorg.eclipse.mylyn.tasks-f27860f0bf7134dab26b4179b2c2e399ce92fc9d.tar.gz
org.eclipse.mylyn.tasks-f27860f0bf7134dab26b4179b2c2e399ce92fc9d.tar.xz
org.eclipse.mylyn.tasks-f27860f0bf7134dab26b4179b2c2e399ce92fc9d.zip
Fixed Bugzilla Bug 114853: group Add actions into a submenu on the popup menu
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui')
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/actions/CreateTaskAction.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/actions/CreateTaskAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/actions/CreateTaskAction.java
index 5dafff438..e5503e249 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/actions/CreateTaskAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/actions/CreateTaskAction.java
@@ -52,8 +52,8 @@ public class CreateTaskAction extends Action {
newTask.setReminderDate(dialog.getReminderDate());
newTask.setIssueReportURL(dialog.getIssueURL());
- Object selectedObject = ((IStructuredSelection) this.view
- .getViewer().getSelection()).getFirstElement();
+ Object selectedObject = ((IStructuredSelection)view.getViewer().getSelection()).getFirstElement();
+
if (selectedObject instanceof TaskCategory) {
newTask.setCategory((TaskCategory) selectedObject);
((TaskCategory) selectedObject).addTask(newTask);
@@ -62,14 +62,14 @@ public class CreateTaskAction extends Action {
if (task.getCategory() != null) {
newTask.setCategory(task.getCategory());
((TaskCategory)task.getCategory()).addTask(newTask);
- }
- } else if (view.getDrilledIntoCategory() != null) {
- newTask.setCategory(view.getDrilledIntoCategory());
- ((TaskCategory)view.getDrilledIntoCategory()).addTask(newTask);
- } else {
- MylarTasklistPlugin.getTaskListManager().addRootTask(newTask);
- }
- this.view.getViewer().refresh();
+ } else if (view.getDrilledIntoCategory() != null) {
+ newTask.setCategory(view.getDrilledIntoCategory());
+ ((TaskCategory)view.getDrilledIntoCategory()).addTask(newTask);
+ } else {
+ MylarTasklistPlugin.getTaskListManager().addRootTask(newTask);
+ }
+ }
+ view.getViewer().refresh();
}
}
} \ No newline at end of file

Back to the top