From c32e026aebe9e1d6783b4c00fbb5ec1ea9e3d7ce Mon Sep 17 00:00:00 2001 From: spingel Date: Mon, 9 Mar 2009 23:19:37 +0000 Subject: NEW - bug 267102: link with editor causes org.eclipse.swt.SWTError: Item not added https://bugs.eclipse.org/bugs/show_bug.cgi?id=267102 --- .../mylyn/internal/tasks/ui/views/TaskListView.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 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 a2234bc81..3c0d14680 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 @@ -1590,6 +1590,8 @@ public class TaskListView extends ViewPart implements IPropertyChangeListener, I private DelayedRefreshJob refreshJob; + private boolean itemNotFoundExceptionLogged; + public void setInRenameAction(boolean b) { isInRenameAction = b; } @@ -1680,10 +1682,14 @@ public class TaskListView extends ViewPart implements IPropertyChangeListener, I 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)); + if (!itemNotFoundExceptionLogged) { + itemNotFoundExceptionLogged = true; + // 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.WARNING, TasksUiPlugin.ID_PLUGIN, + "Could not link Task List with editor", //$NON-NLS-1$ + e)); + } } } -- cgit v1.2.3