diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewPart.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewPart.java index a9dd3cb1bc8..6ebe4c8029b 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewPart.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewPart.java @@ -446,10 +446,13 @@ public class SystemViewPart { // assume this is the primary RSE view - // WE GET ALL THE WAY HERE, BUT THESE LINES OF CODE ARE INEFFECTIVE FOR SOME REASON!! - TreeItem firstItem = systemView.getTree().getItems()[0]; - systemView.setSelection(new StructuredSelection(firstItem.getData())); - systemView.setExpandedState(firstItem.getData(), true); + // WE GET ALL THE WAY HERE, BUT THESE LINES OF CODE ARE INEFFECTIVE FOR SOME REASON!! + + if (systemView.getTree().getItemCount() > 0) { + TreeItem firstItem = systemView.getTree().getItems()[0]; + systemView.setSelection(new StructuredSelection(firstItem.getData())); + systemView.setExpandedState(firstItem.getData(), true); + } } } diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemRegistry.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemRegistry.java index 6a74adb4121..0415e3872ac 100644 --- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemRegistry.java +++ b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemRegistry.java @@ -254,7 +254,14 @@ public class SystemRegistry implements ISystemRegistryUI, ISystemModelChangeEven if (sysType != null) { // sysType can be null if workspace contains a host that is no longer defined by the workbench RSESystemTypeAdapter adapter = (RSESystemTypeAdapter)(sysType.getAdapter(IRSESystemType.class)); if (adapter.isEnabled(sysType)) { - result.add(con); + + // Bug 154524 Local node is shown in RSE even though the Local subsystem is not installed + // so we check for subsystems + ISubSystem[] subsystems = con.getSubSystems(); + + if (subsystems != null && subsystems.length != 0) { + result.add(con); + } } } }