1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-06 00:25:25 +02:00

Bug 154524: Local node is shown in RSE even though the Local subsystem is not installed

This commit is contained in:
Kushal Munir 2006-10-11 14:29:04 +00:00
parent abad039f47
commit 46c9cb3331
2 changed files with 15 additions and 5 deletions

View file

@ -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);
}
}
}

View file

@ -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);
}
}
}
}