1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-20 22:55:51 +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

@ -447,11 +447,14 @@ public class SystemViewPart
// assume this is the primary RSE view // assume this is the primary RSE view
// WE GET ALL THE WAY HERE, BUT THESE LINES OF CODE ARE INEFFECTIVE FOR SOME REASON!! // 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]; TreeItem firstItem = systemView.getTree().getItems()[0];
systemView.setSelection(new StructuredSelection(firstItem.getData())); systemView.setSelection(new StructuredSelection(firstItem.getData()));
systemView.setExpandedState(firstItem.getData(), true); systemView.setExpandedState(firstItem.getData(), true);
} }
} }
}
/** /**
* Creates the frame source and frame list, and connects them. * Creates the frame source and frame list, and connects them.

View file

@ -254,10 +254,17 @@ 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 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)); RSESystemTypeAdapter adapter = (RSESystemTypeAdapter)(sysType.getAdapter(IRSESystemType.class));
if (adapter.isEnabled(sysType)) { if (adapter.isEnabled(sysType)) {
// 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); result.add(con);
} }
} }
} }
}
return result.toArray(); return result.toArray();
} }
/** /**