1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-04 23:55:26 +02:00

[170728] changing to use IRemoteObjectIdentifier and/or ISystemViewelementAdapter instead of ISystemRemoteElementAdapter in system table view.

This commit is contained in:
David McKnight 2007-02-15 21:27:10 +00:00
parent af223d789b
commit 285aba104c
3 changed files with 13 additions and 4 deletions

View file

@ -49,6 +49,7 @@ import org.eclipse.rse.core.SystemBasePlugin;
import org.eclipse.rse.core.filters.ISystemFilterReference;
import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.core.model.ISystemRegistry;
import org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier;
import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.model.ISystemRemoteChangeEvent;
import org.eclipse.rse.model.ISystemRemoteChangeEvents;
@ -1046,7 +1047,7 @@ implements IMenuListener, ISystemDeleteTarget, ISystemRenameTarget, ISystemSelec
remoteResourceName = (String) remoteResource;
else
{
ISystemRemoteElementAdapter ra = getRemoteAdapter(remoteResource);
IRemoteObjectIdentifier ra = getRemoteObjectIdentifier(remoteResource);
if (ra == null)
return null;
remoteResourceName = ra.getAbsoluteName(remoteResource);
@ -1427,6 +1428,15 @@ implements IMenuListener, ISystemDeleteTarget, ISystemRenameTarget, ISystemSelec
return adapter;
}
/**
* Returns the implementation of IRemoteObjectIdentifier for the given
* object. Returns null if this object does not adaptable to this.
*/
protected IRemoteObjectIdentifier getRemoteObjectIdentifier(Object o)
{
return (IRemoteObjectIdentifier)((IAdaptable)o).getAdapter(IRemoteObjectIdentifier.class);
}
/**
* Return true if select all should be enabled for the given object.
* For a tree view, you should return true if and only if the selected object has children.

View file

@ -1155,7 +1155,7 @@ public class SystemTableView
remoteResourceName = (String) remoteResource;
else
{
ISystemRemoteElementAdapter ra = getRemoteAdapter(remoteResource);
IRemoteObjectIdentifier ra = getRemoteObjectIdentifier(remoteResource);
if (ra == null)
return null;
remoteResourceName = ra.getAbsoluteName(remoteResource);

View file

@ -1260,13 +1260,12 @@ public class SystemView extends SafeTreeViewer implements ISystemTree, ISystemRe
}
/**
* Returns the implementation of ISystemRemoteElement for the given
* Returns the implementation of IRemoteObjectIdentifier for the given
* object. Returns null if this object does not adaptable to this.
*/
protected IRemoteObjectIdentifier getRemoteAdapter(Object o)
{
return (IRemoteObjectIdentifier)((IAdaptable)o).getAdapter(IRemoteObjectIdentifier.class);
//return SystemAdapterHelpers.getRemoteAdapter(o, this);
}
protected ISystemViewElementAdapter getViewAdapter(Object o)