mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-03 07:05:24 +02:00
[186880] allow deletion of all local and deletion of connected local
This commit is contained in:
parent
e972c253f0
commit
5855b156d0
1 changed files with 6 additions and 8 deletions
|
@ -713,20 +713,18 @@ public class SystemViewConnectionAdapter
|
|||
{
|
||||
if (element instanceof IHost)
|
||||
{
|
||||
IHost sysCon = (IHost) element;
|
||||
if (sysCon.getSystemType().isLocal()) return existsMoreThanOneLocalConnection();
|
||||
ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
|
||||
if (((IHost)element).getSystemType().isLocal())
|
||||
{
|
||||
// local is always connected so always allow delete
|
||||
return true;
|
||||
}
|
||||
return !sr.isAnySubSystemConnected((IHost)element);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
protected boolean existsMoreThanOneLocalConnection()
|
||||
{
|
||||
IRSESystemType localType = RSECorePlugin.getTheCoreRegistry().getSystemTypeById(IRSESystemType.SYSTEMTYPE_LOCAL_ID);
|
||||
IHost[] localCons = RSECorePlugin.getTheSystemRegistry().getHostsBySystemType(localType);
|
||||
return localCons.length > 1;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Perform the delete action.
|
||||
|
|
Loading…
Add table
Reference in a new issue