mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-03 14:25:37 +02:00
[170728] changing to use IRemoteObjectIdentifier and/or ISystemViewelementAdapter instead of ISystemRemoteElementAdapter in system table view.
This commit is contained in:
parent
8d9f1b8d54
commit
af223d789b
2 changed files with 14 additions and 5 deletions
|
@ -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)
|
||||
|
|
|
@ -49,6 +49,7 @@ import org.eclipse.rse.core.filters.ISystemFilterReference;
|
|||
import org.eclipse.rse.core.model.IHost;
|
||||
import org.eclipse.rse.core.model.ISystemContainer;
|
||||
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;
|
||||
|
@ -1491,7 +1492,7 @@ public class SystemTableView
|
|||
Object element = null;
|
||||
|
||||
ISystemViewElementAdapter adapter = null;
|
||||
ISystemRemoteElementAdapter remoteAdapter = null;
|
||||
IRemoteObjectIdentifier remoteAdapter = null;
|
||||
String oldFullName = null;
|
||||
boolean ok = true;
|
||||
try
|
||||
|
@ -1503,7 +1504,7 @@ public class SystemTableView
|
|||
adapter = getAdapter(element);
|
||||
Object parentElement = getParentForContent(element);
|
||||
|
||||
remoteAdapter = getRemoteAdapter(element);
|
||||
remoteAdapter = getRemoteObjectIdentifier(element);
|
||||
if (remoteAdapter != null)
|
||||
oldFullName = remoteAdapter.getAbsoluteName(element);
|
||||
// pre-rename
|
||||
|
@ -1518,7 +1519,7 @@ public class SystemTableView
|
|||
{
|
||||
updateItem(widget, element);
|
||||
}
|
||||
sr.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED, element, parentElement, remoteAdapter.getSubSystem(element), oldFullName, this);
|
||||
sr.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED, element, parentElement, adapter.getSubSystem(element), oldFullName, this);
|
||||
|
||||
}
|
||||
else
|
||||
|
@ -1559,6 +1560,15 @@ public class SystemTableView
|
|||
((ISystemViewElementAdapter) adapter).setViewer(this);
|
||||
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.
|
||||
|
|
Loading…
Add table
Reference in a new issue