From 5855b156d0b6ff2bc2fb0fc30e1e60403c320187 Mon Sep 17 00:00:00 2001 From: David McKnight Date: Mon, 14 May 2007 20:58:36 +0000 Subject: [PATCH] [186880] allow deletion of all local and deletion of connected local --- .../ui/view/SystemViewConnectionAdapter.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewConnectionAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewConnectionAdapter.java index af52df69486..980c8db6be6 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewConnectionAdapter.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewConnectionAdapter.java @@ -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.