Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2009-03-04 15:59:22 -0500
committermkersten2009-03-04 15:59:22 -0500
commit90252050c73d250d41745f82555c3b0606a5b213 (patch)
treedf5b1b51dae690160f5a406cb5a1880f7a4cb1f7
parent96470e3b8e83fe9cc6c2a583c80522e3a62f0ae5 (diff)
downloadorg.eclipse.mylyn.tasks-90252050c73d250d41745f82555c3b0606a5b213.tar.gz
org.eclipse.mylyn.tasks-90252050c73d250d41745f82555c3b0606a5b213.tar.xz
org.eclipse.mylyn.tasks-90252050c73d250d41745f82555c3b0606a5b213.zip
NEW - bug 267102: link with editor causes org.eclipse.swt.SWTError: Item not added
https://bugs.eclipse.org/bugs/show_bug.cgi?id=267102
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java
index 3164edab1..a2234bc81 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java
@@ -124,6 +124,7 @@ import org.eclipse.mylyn.tasks.ui.TasksUi;
import org.eclipse.mylyn.tasks.ui.TasksUiImages;
import org.eclipse.mylyn.tasks.ui.editors.TaskEditorInput;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.SWTError;
import org.eclipse.swt.SWTException;
import org.eclipse.swt.dnd.DND;
import org.eclipse.swt.dnd.FileTransfer;
@@ -1676,7 +1677,14 @@ public class TaskListView extends ViewPart implements IPropertyChangeListener, I
saveSelection();
IStructuredSelection selection = restoreSelection(task);
- getViewer().setSelection(selection, true);
+ try {
+ getViewer().setSelection(selection, true);
+ } catch (SWTError e) {
+ // It's probably not worth displaying this to the user since the item
+ // is not there in this case, so consider removing.
+ StatusHandler.log(new Status(IStatus.INFO, TasksUiPlugin.ID_PLUGIN, "Could not link Task List with editor", //$NON-NLS-1$
+ e));
+ }
}
private void saveSelection() {

Back to the top