Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2013-01-26 05:07:15 -0500
committerEike Stepper2013-01-26 05:07:15 -0500
commit2a224d522dedb8c4aaa37dfecfee0b3a3feb8621 (patch)
treeaf05fd18040efaf41a1d31c599c1eab4255aa45b
parentea1c294e01cb1b9b4156c929ee48f0da2016f606 (diff)
downloadcdo-2a224d522dedb8c4aaa37dfecfee0b3a3feb8621.tar.gz
cdo-2a224d522dedb8c4aaa37dfecfee0b3a3feb8621.tar.xz
cdo-2a224d522dedb8c4aaa37dfecfee0b3a3feb8621.zip
[399157] LifecycleException during async TreeViewer refresh
https://bugs.eclipse.org/bugs/show_bug.cgi?id=399157
-rw-r--r--plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/UIUtil.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/UIUtil.java b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/UIUtil.java
index 311e72610e..6592f3914c 100644
--- a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/UIUtil.java
+++ b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/UIUtil.java
@@ -412,7 +412,7 @@ public final class UIUtil
ModalContext.run(runnable, true, monitor, PlatformUI.getWorkbench().getDisplay());
}
};
-
+
PlatformUI.getWorkbench().getProgressService().run(false, true, op);
}
catch (InvocationTargetException ex)
@@ -494,6 +494,19 @@ public final class UIUtil
{
public void run()
{
+ try
+ {
+ doRefresh(viewer, element, updateLabels);
+ }
+ catch (RuntimeException ex)
+ {
+ // An element may have been deactivated - refresh the entire tree
+ doRefresh(viewer, null, updateLabels);
+ }
+ }
+
+ private void doRefresh(final StructuredViewer viewer, final Object element, final boolean updateLabels)
+ {
if (element != null && element != viewer.getInput())
{
viewer.refresh(element, updateLabels);

Back to the top