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:
parent
af223d789b
commit
285aba104c
3 changed files with 13 additions and 4 deletions
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue