1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-09-10 12:03:16 +02:00

[174942] some adapter issues - use ISystemViewElementAdapter instead of IRemoteObjectIdentifier

This commit is contained in:
David McKnight 2007-02-21 16:07:48 +00:00
parent 920041498e
commit de0ba15f98

View file

@ -2094,12 +2094,12 @@ public class SystemView extends SafeTreeViewer implements ISystemTree, ISystemRe
Object remoteResourceParent = event.getResourceParent(); Object remoteResourceParent = event.getResourceParent();
Object remoteResource = event.getResource(); Object remoteResource = event.getResource();
boolean originatedHere = (event.getOriginatingViewer() == this); boolean originatedHere = (event.getOriginatingViewer() == this);
Vector remoteResourceNames = null; List remoteResourceNames = null;
if (remoteResource instanceof Vector) { if (remoteResource instanceof List) {
remoteResourceNames = (Vector) remoteResource; remoteResourceNames = (List) remoteResource;
remoteResource = remoteResourceNames.elementAt(0); remoteResource = remoteResourceNames.get(0);
} }
getRemoteResourceAbsoluteName(remoteResourceParent); // DWD may not be necessary // getRemoteResourceAbsoluteName(remoteResourceParent); // DWD may not be necessary
String remoteResourceName = getRemoteResourceAbsoluteName(remoteResource); String remoteResourceName = getRemoteResourceAbsoluteName(remoteResource);
if (remoteResourceName == null) return; if (remoteResourceName == null) return;
@ -2175,7 +2175,7 @@ public class SystemView extends SafeTreeViewer implements ISystemTree, ISystemRe
// delete all existing references to the remote object(s)... // delete all existing references to the remote object(s)...
if (remoteResourceNames != null) { if (remoteResourceNames != null) {
for (int idx = 0; idx < remoteResourceNames.size(); idx++) for (int idx = 0; idx < remoteResourceNames.size(); idx++)
deleteRemoteObject(remoteResourceNames.elementAt(idx), ss); deleteRemoteObject(remoteResourceNames.get(idx), ss);
} else } else
deleteRemoteObject(remoteResourceName, ss); deleteRemoteObject(remoteResourceName, ss);
@ -2272,7 +2272,7 @@ public class SystemView extends SafeTreeViewer implements ISystemTree, ISystemRe
Iterator i = selection.iterator(); Iterator i = selection.iterator();
while (i.hasNext()) { while (i.hasNext()) {
Object element = i.next(); Object element = i.next();
IRemoteObjectIdentifier ra = getRemoteAdapter(element); ISystemViewElementAdapter ra = getViewAdapter(element);
if (ra != null) { if (ra != null) {
if (prevSelection == null) prevSelection = new Vector(); if (prevSelection == null) prevSelection = new Vector();
prevSelection.addElement(ra.getAbsoluteName(element)); prevSelection.addElement(ra.getAbsoluteName(element));
@ -2290,7 +2290,7 @@ public class SystemView extends SafeTreeViewer implements ISystemTree, ISystemRe
if (remoteResource instanceof String) if (remoteResource instanceof String)
remoteResourceName = (String) remoteResource; remoteResourceName = (String) remoteResource;
else { else {
IRemoteObjectIdentifier ra = getRemoteAdapter(remoteResource); ISystemViewElementAdapter ra = getViewAdapter(remoteResource);
if (ra == null) return null; if (ra == null) return null;
remoteResourceName = ra.getAbsoluteName(remoteResource); remoteResourceName = ra.getAbsoluteName(remoteResource);
} }