diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCommonDeleteAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCommonDeleteAction.java index ccf23841c42..cab13714f90 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCommonDeleteAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCommonDeleteAction.java @@ -13,12 +13,13 @@ * Contributors: * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry * Kevin Doyle (IBM) - [188637] Handle the caught exception in DeleteJob.run when file fails to be deleted + * Kevin Doyle (IBM) - [196582] ClassCastException when doing copy/paste with Remote Search view open ********************************************************************************/ package org.eclipse.rse.internal.ui.actions; -import java.util.ArrayList; import java.util.Iterator; import java.util.List; +import java.util.Vector; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; @@ -110,8 +111,8 @@ public class SystemCommonDeleteAction public IStatus run(IProgressMonitor monitor) { boolean ok = true; - List localDeletedObjects = new ArrayList(); - List remoteDeletedObjects = new ArrayList(); + List localDeletedObjects = new Vector(); + List remoteDeletedObjects = new Vector(); // local delete is pretty straight-forward for (int l = 0; l < _localResources.size() && ok; l++) @@ -190,7 +191,7 @@ public class SystemCommonDeleteAction setProcessAllSelections(true); setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORGANIZE); setHelp(RSEUIPlugin.HELPPREFIX+"actn0021"); //$NON-NLS-1$ - _setList = new ArrayList(); + _setList = new Vector(); } /** @@ -280,7 +281,7 @@ public class SystemCommonDeleteAction if (selection instanceof IStructuredSelection) { // keep track of the current set - List localSet = new ArrayList(); + List localSet = new Vector(); // divide up all objects to delete IStructuredSelection ssel = (IStructuredSelection)selection; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableTreeView.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableTreeView.java index fccc4c78bbf..1b2bcbd1816 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableTreeView.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableTreeView.java @@ -1428,8 +1428,8 @@ public class SystemTableTreeView } /** - * Returns the implementation of ISystemRemoteElement for the given - * object. Returns null if this object does not adaptable to this. + * Returns the implementation of ISystemRemoteElementAdapter for the given + * object. Returns null if this object is not adaptable to this. */ protected ISystemRemoteElementAdapter getRemoteAdapter(Object o) { @@ -1445,7 +1445,10 @@ public class SystemTableTreeView /** * Returns the implementation of IRemoteObjectIdentifier for the given - * object. Returns null if this object does not adaptable to this. + * object. Returns null if this object is not adaptable to this. + * + * @deprecated should use getViewAdapter(Object) as IRemoteObjectIdentifier + * is not defined in the adapter factories */ protected IRemoteObjectIdentifier getRemoteObjectIdentifier(Object o) { diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemView.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemView.java index 17d3da2f5df..7b677425c8a 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemView.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemView.java @@ -38,6 +38,7 @@ * Tobias Schwarz (Wind River) - [197484] Provide ContextObject for queries on all levels * David McKnight (IBM) - [196662] Avoid main thread query to check exists when remote refreshing * Kevin Doyle (IBM) - [198576] Renaming a folder directly under a Filter doesn't update children + * Kevin Doyle (IBM) - [196582] Depreciated getRemoteObjectIdentifier ********************************************************************************/ package org.eclipse.rse.internal.ui.view; @@ -1349,14 +1350,21 @@ public class SystemView extends SafeTreeViewer } } + /** + * Returns the implementation of IRemoteObjectIdentifier for the given + * object. Returns null if this object is not adaptable to this. + * + * @deprecated should use getViewAdapter(Object) as IRemoteObjectIdentifier + * is not defined in the adapter factories + */ protected IRemoteObjectIdentifier getRemoteObjectIdentifier(Object o) { return (IRemoteObjectIdentifier)((IAdaptable)o).getAdapter(IRemoteObjectIdentifier.class); } /** - * Returns the implementation of IRemoteObjectIdentifier for the given - * object. Returns null if this object does not adaptable to this. + * Returns the implementation of ISystemRemoteElementAdapter for the given + * object. Returns null if this object is not adaptable to this. */ protected ISystemRemoteElementAdapter getRemoteAdapter(Object o) { diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/SystemMonitorViewPart.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/SystemMonitorViewPart.java index 79124bbf777..ae1d628d740 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/SystemMonitorViewPart.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/SystemMonitorViewPart.java @@ -16,6 +16,7 @@ * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry * Kevin Doyle (IBM) - [177587] Made MonitorViewPart a SelectionProvider * Kevin Doyle (IBM) - [160378] Subset action should be disabled when there are no tabs in Monitor + * Kevin Doyle (IBM) - [196582] ClassCastException when doing copy/paste ********************************************************************************/ package org.eclipse.rse.internal.ui.view.monitor; @@ -926,11 +927,11 @@ class SubSetAction extends BrowseAction int eventType = event.getEventType(); Object remoteResource = event.getResource(); - Vector remoteResourceNames = null; - if (remoteResource instanceof Vector) + java.util.List remoteResourceNames = null; + if (remoteResource instanceof java.util.List) { - remoteResourceNames = (Vector) remoteResource; - remoteResource = remoteResourceNames.elementAt(0); + remoteResourceNames = (java.util.List) remoteResource; + remoteResource = remoteResourceNames.get(0); } Object child = event.getResource();