Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2005-11-04 00:10:38 -0500
committermkersten2005-11-04 00:10:38 -0500
commitcfdffb680b35cb357ad820597dfcfa6afef307e3 (patch)
treeec2a0aeeb04a9a0a57db4164f797aa79628c9e13 /org.eclipse.mylyn.tasks.ui
parentf73a0dbb7f97d633d93e00a377812fa41425a8c6 (diff)
downloadorg.eclipse.mylyn.tasks-cfdffb680b35cb357ad820597dfcfa6afef307e3.tar.gz
org.eclipse.mylyn.tasks-cfdffb680b35cb357ad820597dfcfa6afef307e3.tar.xz
org.eclipse.mylyn.tasks-cfdffb680b35cb357ad820597dfcfa6afef307e3.zip
Fixed Bugzilla Bug 114318: Task in task list disappearing
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui')
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/internal/DefaultTaskListExternalizer.java7
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/actions/TaskActivateAction.java4
2 files changed, 9 insertions, 2 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/internal/DefaultTaskListExternalizer.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/internal/DefaultTaskListExternalizer.java
index e6a7c26d1..817162ae1 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/internal/DefaultTaskListExternalizer.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/internal/DefaultTaskListExternalizer.java
@@ -218,7 +218,12 @@ public class DefaultTaskListExternalizer implements ITaskListExternalizer {
if (element.getAttribute(ACTIVE).compareTo(TRUE) == 0) {
task.setActive(true, false);
tlist.setActive(task, true, false);
- new TaskActivateAction().run(task);
+ try {
+ // TODO: move this
+ new TaskActivateAction().run(task);
+ } catch (Throwable t) {
+ // ignore an activation failure since it's a UI issue
+ }
} else {
task.setActive(false, false);
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/actions/TaskActivateAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/actions/TaskActivateAction.java
index b147f04cb..312e31bfa 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/actions/TaskActivateAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/actions/TaskActivateAction.java
@@ -50,7 +50,9 @@ public class TaskActivateAction extends Action implements IViewActionDelegate {
public void run(ITask task) {
if (task != null) {
MylarTasklistPlugin.getTaskListManager().activateTask(task);
- TaskListView.getDefault().getViewer().refresh();
+ if (TaskListView.getDefault() != null) {
+ TaskListView.getDefault().getViewer().refresh();
+ }
}
}

Back to the top