diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemView.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemView.java index 87f2640dfa9..0f9b5f16e6f 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemView.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemView.java @@ -2105,6 +2105,39 @@ public class SystemView extends SafeTreeViewer // make the src the parent of the src src = adapter.getParent(src); } + else + { + // get up-to-date version of the container (need to make sure it still exists) + if (ss == null) + { + ss = adapter.getSubSystem(src); + } + if (ss != null) + { + String key = adapter.getAbsoluteName(src); + if (key != null) + { + try + { + Object srcParent = adapter.getParent(src); // get parent before we query + // because if after query src doesn't exist, + // we can't get parent + + src = ss.getObjectWithAbsoluteName(key); + hasChildren = adapter.hasChildren((IAdaptable)src); + if (!hasChildren) + { + // make the src the parent of the src + src = srcParent; + } + } + catch (Exception e) + { + e.printStackTrace(); + } + } + } + } } refreshRemoteObject(src, parent, originatedHere);