RSE
Release 1.0

org.eclipse.rse.processes.ui.view
Class SystemViewRemoteProcessAdapter

java.lang.Object
  extended byorg.eclipse.rse.ui.view.AbstractSystemViewAdapter
      extended byorg.eclipse.rse.processes.ui.view.SystemViewRemoteProcessAdapter
All Implemented Interfaces:
IActionFilter, IBasicPropertyConstants, IDeferredWorkbenchAdapter, IPropertySource, IRemoteObjectIdentifier, ISystemDragDropAdapter, ISystemProcessPropertyConstants, ISystemProcessRemoteConstants, ISystemPropertyConstants, ISystemRemoteElementAdapter, ISystemViewActionFilter, ISystemViewElementAdapter, IWorkbenchAdapter

public class SystemViewRemoteProcessAdapter
extends AbstractSystemViewAdapter
implements ISystemViewElementAdapter, ISystemRemoteElementAdapter, ISystemProcessPropertyConstants, ISystemProcessRemoteConstants


Field Summary
 
Fields inherited from class org.eclipse.rse.ui.view.AbstractSystemViewAdapter
_lastResults, _lastSelected, canceledObject, EMPTY_STRING_LIST, emptyList, errorObject, filterString, MEMENTO_DELIM, MSG_SUB_PREFIX, MSG_SUB1, MSG_SUB2, msgList, nullObject, propertySourceInput, shell, viewer
 
Fields inherited from interface org.eclipse.rse.ui.view.ISystemViewElementAdapter
noActions
 
Fields inherited from interface org.eclipse.rse.processes.ui.view.ISystemProcessPropertyConstants
P_PREFIX, P_PROCESS_GID, P_PROCESS_NAME, P_PROCESS_PID, P_PROCESS_PPID, P_PROCESS_STATE, P_PROCESS_TGID, P_PROCESS_TRACERPID, P_PROCESS_UID, P_PROCESS_USERNAME, P_PROCESS_VMRSS, P_PROCESS_VMSIZE
 
Fields inherited from interface org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants
ALL_STATES, ALL_STATES_STR, PROCESS_ATTRIBUTES_COUNT, PROCESS_ATTRIBUTES_INDEX_EXENAME, PROCESS_ATTRIBUTES_INDEX_GID, PROCESS_ATTRIBUTES_INDEX_PID, PROCESS_ATTRIBUTES_INDEX_PPID, PROCESS_ATTRIBUTES_INDEX_STATUS, PROCESS_ATTRIBUTES_INDEX_TGID, PROCESS_ATTRIBUTES_INDEX_TRACERPID, PROCESS_ATTRIBUTES_INDEX_UID, PROCESS_ATTRIBUTES_INDEX_USERNAME, PROCESS_ATTRIBUTES_INDEX_VMRSS, PROCESS_ATTRIBUTES_INDEX_VMSIZE, PROCESS_MINER_ERROR_NO_HANDLER, PROCESS_MINER_SUCCESS, PROCESS_SIGNAL_TYPE_DEFAULT, STATE_ACTIVE, STATE_ACTIVE_INDEX, STATE_ENDING_INDEX, STATE_IDLE, STATE_IDLE_INDEX, STATE_NONEXISTENT, STATE_NONEXISTENT_INDEX, STATE_PAGING, STATE_PAGING_INDEX, STATE_RUNNING, STATE_RUNNING_INDEX, STATE_SLEEPING, STATE_SLEEPING_INDEX, STATE_STARTING_INDEX, STATE_TRACED, STATE_TRACED_INDEX, STATE_WAITING, STATE_WAITING_INDEX, STATE_ZOMBIE, STATE_ZOMBIE_INDEX, STATE_ZOS_ASYNCHRONOUSTHREAD, STATE_ZOS_ASYNCHRONOUSTHREAD_INDEX, STATE_ZOS_CANCELLED, STATE_ZOS_CANCELLED_INDEX, STATE_ZOS_COMSYSKERNELWAIT, STATE_ZOS_COMSYSKERNELWAIT_INDEX, STATE_ZOS_DETACHED, STATE_ZOS_DETACHED_INDEX, STATE_ZOS_ENDING_INDEX, STATE_ZOS_FILESYSKERNELWAIT, STATE_ZOS_FILESYSKERNELWAIT_INDEX, STATE_ZOS_FORKING, STATE_ZOS_FORKING_INDEX, STATE_ZOS_INITIALPROCESSTHREAD, STATE_ZOS_INITIALPROCESSTHREAD_INDEX, STATE_ZOS_MEDIUMWEIGHTTHREAD, STATE_ZOS_MEDIUMWEIGHTTHREAD_INDEX, STATE_ZOS_MSGQRECEIVEWAIT, STATE_ZOS_MSGQRECEIVEWAIT_INDEX, STATE_ZOS_MSGQSENDWAIT, STATE_ZOS_MSGQSENDWAIT_INDEX, STATE_ZOS_MULTITHREAD, STATE_ZOS_MULTITHREAD_INDEX, STATE_ZOS_MVSPAUSEWAIT, STATE_ZOS_MVSPAUSEWAIT_INDEX, STATE_ZOS_MVSWAIT, STATE_ZOS_MVSWAIT_INDEX, STATE_ZOS_OTHERKERNELWAIT, STATE_ZOS_OTHERKERNELWAIT_INDEX, STATE_ZOS_PTHREADCREATED, STATE_ZOS_PTHREADCREATED_INDEX, STATE_ZOS_PTHREADCREATEDTASKS, STATE_ZOS_PTHREADCREATEDTASKS_INDEX, STATE_ZOS_PTRACEKERNELWAIT, STATE_ZOS_PTRACEKERNELWAIT_INDEX, STATE_ZOS_QUIESCEFROZEN, STATE_ZOS_QUIESCEFROZEN_INDEX, STATE_ZOS_RUNNING, STATE_ZOS_RUNNING_INDEX, STATE_ZOS_SEMAPHOREWAIT, STATE_ZOS_SEMAPHOREWAIT_INDEX, STATE_ZOS_SINGLE, STATE_ZOS_SINGLE_INDEX, STATE_ZOS_SLEEPING, STATE_ZOS_SLEEPING_INDEX, STATE_ZOS_STARTING_INDEX, STATE_ZOS_STOPPED, STATE_ZOS_STOPPED_INDEX, STATE_ZOS_SWAPPEDOUT, STATE_ZOS_SWAPPEDOUT_INDEX, STATE_ZOS_WAITINGFORCHILD, STATE_ZOS_WAITINGFORCHILD_INDEX, STATE_ZOS_ZOMBIE, STATE_ZOS_ZOMBIE_INDEX
 
Fields inherited from interface org.eclipse.rse.ui.view.ISystemPropertyConstants
P_ARCHIVE_COMMENT, P_ARCHIVE_EXPANDEDSIZE, P_CCSID, P_COMMAND, P_COMMENT, P_COMPILETYPE_TYPES, P_DEFAULTUSERID, P_DESCRIPTION, P_ENVLIST, P_ERROR, P_ERROR_FILENAME, P_ERROR_LINENO, P_FILE_CANONICAL_PATH, P_FILE_CLASSIFICATION, P_FILE_HIDDEN, P_FILE_LASTMODIFIED, P_FILE_PATH, P_FILE_READABLE, P_FILE_READONLY, P_FILE_SIZE, P_FILE_WRITABLE, P_FILTER, P_FILTERS, P_FILTERSTRING, P_FILTERSTRINGS, P_FILTERSTRINGS_COUNT, P_HAS_CHILDREN, P_HOSTNAME, P_IS_ACTIVE, P_IS_CONNECTED, P_IS_CONNECTION_PRIVATE, P_NBRCHILDREN, P_NEWNAME, P_OK, P_ORIGIN, P_PARENT_FILTER, P_PARENT_FILTERPOOL, P_PASSWORD, P_PORT, P_PREFIX, P_PROFILE, P_RELATED_CONNECTION, P_SEARCH_LINE, P_SHELL_CONTEXT, P_SHELL_STATUS, P_SYSTEMTYPE, P_TYPE, P_USERACTION_DOMAIN, P_USERID, P_VENDOR, P_VIRTUAL_COMMENT, P_VIRTUAL_COMPRESSEDSIZE, P_VIRTUAL_COMPRESSIONMETHOD, P_VIRTUAL_COMPRESSIONRATIO, P_VRM
 
Fields inherited from interface org.eclipse.jface.viewers.IBasicPropertyConstants
P_CHILDREN, P_IMAGE, P_PARENT, P_TEXT
 
Constructor Summary
SystemViewRemoteProcessAdapter()
           
 
Method Summary
 void addActions(SystemMenuManager menu, IStructuredSelection selection, Shell parent, String menuGroup)
          This is your opportunity to add actions to the popup menu for the given selection.
 boolean canDrag(Object element)
          Return true if this object can be copied to another location via drag and drop, or clipboard copy.
 boolean canDrag(SystemRemoteResourceSet elements)
          Return true if these objects can be copied to another location via drag and drop, or clipboard copy.
 Object doDrag(Object element, boolean sameSystemType, IProgressMonitor monitor)
          Perform the drag on the given object.
 ISystemResourceSet doDrag(SystemRemoteResourceSet set, IProgressMonitor monitor)
          Perform the drag on the given objects.
protected  String formatState(String state)
           
 String getAbsoluteName(Object object)
          Return the fully qualified name of this remote object.
 String getAbsoluteParentName(Object element)
          Return fully qualified name that uniquely identifies this remote object's remote parent within its subsystem
 String getAlternateText(Object element)
          Used for stuff like clipboard text copy
 Object[] getChildren(Object element)
          Return the children of this object
 ImageDescriptor getImageDescriptor(Object element)
          Returns an image descriptor for the image.
 Object getParent(Object element)
          Return the parent of this object
 Object getPropertyValue(Object property, boolean formatted)
          Returns the current value for the named property.
 Object getRemoteParent(Shell shell, Object element)
          Given a remote object, returns it remote parent object.
 String[] getRemoteParentNamesInUse(Shell shell, Object element)
          Given a remote object, return the unqualified names of the objects contained in that parent.
 String getRemoteSubType(Object element)
          Return a value for the subtype property for this object.
 String getRemoteType(Object element)
          Return a value for the type property for this object The value must not be translated, so that property pages registered via xml can subset by it.
 String getRemoteTypeCategory(Object element)
          Return a value for the type category property for this object The value must not be translated, so that property pages registered via xml can subset by it.
 ISubSystem getSubSystem(Object element)
          Get the subsystem that corresponds to this object if one exists.
 String getSubSystemConfigurationId(Object element)
          Return the subsystem factory id that owns this remote object The value must not be translated, so that property pages registered via xml can subset by it.
 String getText(Object element)
          Return the label for this object
 String getType(Object element)
          Return a value for the type property for this object
 boolean hasChildren(Object element)
          Return true if this object has children
protected  IPropertyDescriptor[] internalGetPropertyDescriptors()
          Abstract.
protected  Object internalGetPropertyValue(Object key)
          Returns the current value for the named property.
 boolean refreshRemoteObject(Object oldElement, Object newElement)
          Short answer: treat this like clone(), and just copy any important instance variables Imagine the same remote resource is shown multiple times in the same tree view.... say because multiple filters resolve to it, or there are two connections to the same host.
 boolean supportsUserDefinedActions(Object object)
          Returns whether user defined actions should be shown for the object.
 
Methods inherited from class org.eclipse.rse.ui.view.AbstractSystemViewAdapter
addCommonRemoteActions, addDynamicPopupMenuActions, canDelete, canDrop, canEdit, canRename, checkForNull, createSimplePropertyDescriptor, doDelete, doDelete, doDeleteBatch, doDrop, doDrop, doDrop, doRename, fetchDeferredChildren, getAdapter, getCancelledMessageObject, getCanonicalNewName, getChildren, getChildrenUsingExpandToFilter, getCurrentTreeView, getDefaultDescriptors, getEditableRemoteObject, getEditableValue, getEmptyMessageObject, getFailedMessageObject, getFilterString, getFilterStringFor, getFirstSelection, getInput, getInputMementoHandle, getLabel, getMementoHandle, getMementoHandleKey, getName, getNameValidator, getPropertyDescriptors, getPropertyValue, getRemoteAdapter, getRemoteSourceType, getRemoteSubSubType, getRule, getShell, getStatusLineText, getSystemFetchOperation, getSystemTree, getTranslatedFalse, getTranslatedNo, getTranslatedNotApplicable, getTranslatedNotAvailable, getTranslatedTrue, getTranslatedYes, getUniquePropertyDescriptors, getViewer, handleDoubleClick, initMsgObjects, isContainer, isPromptable, isPropertySet, namesAreEqual, resetPropertyValue, saveExpansionState, selectionChanged, setFilterString, setInput, setPropertySourceInput, setPropertyValue, setShell, setViewer, showDelete, showGenericShowInTableAction, showOpenViewActions, showRefresh, showRename, sub, supportsDeferredQueries, testAttribute, validateDrop, validateDrop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.rse.ui.view.ISystemViewElementAdapter
canDelete, canRename, doDelete, doDelete, doDeleteBatch, doRename, getCanonicalNewName, getChildren, getChildrenUsingExpandToFilter, getFilterString, getInput, getInputMementoHandle, getMementoHandle, getMementoHandleKey, getName, getNameValidator, getShell, getStatusLineText, getUniquePropertyDescriptors, getViewer, handleDoubleClick, isPromptable, namesAreEqual, saveExpansionState, selectionChanged, setFilterString, setInput, setPropertySourceInput, setShell, setViewer, showDelete, showGenericShowInTableAction, showOpenViewActions, showRefresh, showRename, supportsDeferredQueries
 
Methods inherited from interface org.eclipse.ui.views.properties.IPropertySource
getEditableValue, getPropertyDescriptors, getPropertyValue, isPropertySet, resetPropertyValue, setPropertyValue
 
Methods inherited from interface org.eclipse.rse.ui.view.ISystemDragDropAdapter
canDrop, doDrop, doDrop, validateDrop, validateDrop
 
Methods inherited from interface org.eclipse.ui.IActionFilter
testAttribute
 
Methods inherited from interface org.eclipse.rse.ui.view.ISystemRemoteElementAdapter
canEdit, getEditableRemoteObject, getFilterStringFor, getName, getRemoteSourceType, getRemoteSubSubType
 

Constructor Detail

SystemViewRemoteProcessAdapter

public SystemViewRemoteProcessAdapter()
Method Detail

canDrag

public boolean canDrag(Object element)
Description copied from interface: ISystemDragDropAdapter
Return true if this object can be copied to another location via drag and drop, or clipboard copy.

Specified by:
canDrag in interface ISystemDragDropAdapter
Overrides:
canDrag in class AbstractSystemViewAdapter
See Also:
AbstractSystemViewAdapter.doDrag(Object,boolean,IProgressMonitor), AbstractSystemViewAdapter.canDrop(Object), AbstractSystemViewAdapter.doDrop(Object,Object,boolean,boolean,IProgressMonitor), AbstractSystemViewAdapter.validateDrop(Object,Object,boolean)

canDrag

public boolean canDrag(SystemRemoteResourceSet elements)
Description copied from interface: ISystemDragDropAdapter
Return true if these objects can be copied to another location via drag and drop, or clipboard copy.

Specified by:
canDrag in interface ISystemDragDropAdapter
Overrides:
canDrag in class AbstractSystemViewAdapter

doDrag

public Object doDrag(Object element,
                     boolean sameSystemType,
                     IProgressMonitor monitor)
Description copied from interface: ISystemDragDropAdapter
Perform the drag on the given object.

Specified by:
doDrag in interface ISystemDragDropAdapter
Overrides:
doDrag in class AbstractSystemViewAdapter
See Also:
AbstractSystemViewAdapter.canDrag(Object), AbstractSystemViewAdapter.canDrop(Object), AbstractSystemViewAdapter.doDrop(Object,Object,boolean,boolean,IProgressMonitor), AbstractSystemViewAdapter.validateDrop(Object,Object,boolean)

doDrag

public ISystemResourceSet doDrag(SystemRemoteResourceSet set,
                                 IProgressMonitor monitor)
Description copied from interface: ISystemDragDropAdapter
Perform the drag on the given objects.

Specified by:
doDrag in interface ISystemDragDropAdapter
Overrides:
doDrag in class AbstractSystemViewAdapter
Parameters:
set - the set of objects to copy
monitor - the progress monitor
Returns:
a temporary workspace copies of the object that was copied

addActions

public void addActions(SystemMenuManager menu,
                       IStructuredSelection selection,
                       Shell parent,
                       String menuGroup)
Description copied from interface: ISystemViewElementAdapter
This is your opportunity to add actions to the popup menu for the given selection.

To put your action into the given menu, use the menu's add method. If you don't care where it goes within the popup, just pass the given menuGroup location id, otherwise pass one of the GROUP_XXX values from ISystemContextMenuConstants. If you pass one that identifies a pre-defined cascading menu, such as GROUP_OPENWITH, your action will magically appear in that cascading menu, even if it was otherwise empty.

For the actions themselves, you will probably use one of the base action classes:

Specified by:
addActions in interface ISystemViewElementAdapter
Specified by:
addActions in class AbstractSystemViewAdapter
Parameters:
menu - the popup menu you can contribute to
selection - the current selection in the calling tree or table view
parent - the shell of the calling tree or table view
menuGroup - the default menu group to place actions into if you don't care where they. Pass this to the SystemMenuManager add method.
See Also:
ISystemViewElementAdapter.addActions(SystemMenuManager, IStructuredSelection, Shell, String)

getSubSystem

public ISubSystem getSubSystem(Object element)
Description copied from interface: ISystemViewElementAdapter
Get the subsystem that corresponds to this object if one exists.

Specified by:
getSubSystem in interface ISystemViewElementAdapter
Overrides:
getSubSystem in class AbstractSystemViewAdapter

getImageDescriptor

public ImageDescriptor getImageDescriptor(Object element)
Description copied from interface: ISystemViewElementAdapter
Returns an image descriptor for the image. More efficient than getting the image.

Specified by:
getImageDescriptor in interface ISystemViewElementAdapter
Specified by:
getImageDescriptor in class AbstractSystemViewAdapter
Parameters:
element - The element for which an image is desired

getText

public String getText(Object element)
Description copied from interface: ISystemViewElementAdapter
Return the label for this object

Specified by:
getText in interface ISystemViewElementAdapter
Specified by:
getText in class AbstractSystemViewAdapter
See Also:
AbstractSystemViewAdapter.getName(Object), AbstractSystemViewAdapter.getAbsoluteName(Object)

getAlternateText

public String getAlternateText(Object element)
Used for stuff like clipboard text copy

Specified by:
getAlternateText in interface ISystemViewElementAdapter
Overrides:
getAlternateText in class AbstractSystemViewAdapter
See Also:
AbstractSystemViewAdapter.getName(Object), AbstractSystemViewAdapter.getAbsoluteName(Object)

getAbsoluteName

public String getAbsoluteName(Object object)
Description copied from interface: ISystemRemoteElementAdapter
Return the fully qualified name of this remote object. Unlike getName, this should include the full path to the name. This should be enough information to uniquely identify this object within its subsystem.

Specified by:
getAbsoluteName in interface IRemoteObjectIdentifier
Specified by:
getAbsoluteName in class AbstractSystemViewAdapter
See Also:
AbstractSystemViewAdapter.getText(Object), AbstractSystemViewAdapter.getName(Object)

getType

public String getType(Object element)
Description copied from interface: ISystemViewElementAdapter
Return a value for the type property for this object

Specified by:
getType in interface ISystemViewElementAdapter
Specified by:
getType in class AbstractSystemViewAdapter

getParent

public Object getParent(Object element)
Description copied from interface: ISystemViewElementAdapter
Return the parent of this object

Specified by:
getParent in interface ISystemViewElementAdapter
Specified by:
getParent in class AbstractSystemViewAdapter

hasChildren

public boolean hasChildren(Object element)
Description copied from interface: ISystemViewElementAdapter
Return true if this object has children

Specified by:
hasChildren in interface ISystemViewElementAdapter
Specified by:
hasChildren in class AbstractSystemViewAdapter

getChildren

public Object[] getChildren(Object element)
Description copied from interface: ISystemViewElementAdapter
Return the children of this object

Specified by:
getChildren in interface ISystemViewElementAdapter
Specified by:
getChildren in class AbstractSystemViewAdapter

internalGetPropertyDescriptors

protected IPropertyDescriptor[] internalGetPropertyDescriptors()
Description copied from class: AbstractSystemViewAdapter
Abstract.
Implement this to return the property descriptors for the properties in the property sheet. This is beyond the Name, Type and NbrOfChildren properties which already implemented and done for you.

Override if want to include more properties in the property sheet,

If you override this for readonly properties, you must also override:

If you override this for editable properties, you must also override:

Specified by:
internalGetPropertyDescriptors in class AbstractSystemViewAdapter
Returns:
an array containing all descriptors to be added to the default set of descriptors, or null if no additional properties desired.
See Also:
#createSimplePropertyDescriptor(String,ResourceBundle,String)

internalGetPropertyValue

protected Object internalGetPropertyValue(Object key)
Returns the current value for the named property.

Specified by:
internalGetPropertyValue in class AbstractSystemViewAdapter
Parameters:
key - the name of the property as named by its property descriptor
Returns:
the current value of the given property

getPropertyValue

public Object getPropertyValue(Object property,
                               boolean formatted)
Returns the current value for the named property.

Specified by:
getPropertyValue in interface ISystemViewElementAdapter
Overrides:
getPropertyValue in class AbstractSystemViewAdapter
Parameters:
property - the name or key of the property as named by its property descriptor
formatted - indication of whether to return the value in formatted or raw form
Returns:
the current value of the given property

formatState

protected String formatState(String state)

getAbsoluteParentName

public String getAbsoluteParentName(Object element)
Return fully qualified name that uniquely identifies this remote object's remote parent within its subsystem

Specified by:
getAbsoluteParentName in interface ISystemRemoteElementAdapter

getRemoteParent

public Object getRemoteParent(Shell shell,
                              Object element)
                       throws Exception
Given a remote object, returns it remote parent object. Eg, given a process, return the process that spawned it.

The shell is required in order to set the cursor to a busy state if a remote trip is required.

Specified by:
getRemoteParent in interface ISystemRemoteElementAdapter
Returns:
an IRemoteProcess object for the parent
Throws:
Exception

getRemoteParentNamesInUse

public String[] getRemoteParentNamesInUse(Shell shell,
                                          Object element)
                                   throws Exception
Given a remote object, return the unqualified names of the objects contained in that parent. This is used for testing for uniqueness on a rename operation, for example. Sometimes, it is not enough to just enumerate all the objects in the parent for this purpose, because duplicate names are allowed if the types are different, such as on iSeries. In this case return only the names which should be used to do name-uniqueness validation on a rename operation.

Specified by:
getRemoteParentNamesInUse in interface ISystemRemoteElementAdapter
Returns:
an array of all file and folder names in the parent of the given IRemoteFile object
Throws:
Exception

getRemoteSubType

public String getRemoteSubType(Object element)
Description copied from interface: ISystemRemoteElementAdapter
Return a value for the subtype property for this object. Not all object types support a subtype, so returning null is ok. The value must not be translated, so that property pages registered via xml can subset by it.

Specified by:
getRemoteSubType in interface ISystemRemoteElementAdapter

getRemoteType

public String getRemoteType(Object element)
Description copied from interface: ISystemRemoteElementAdapter
Return a value for the type property for this object The value must not be translated, so that property pages registered via xml can subset by it.

Specified by:
getRemoteType in interface ISystemRemoteElementAdapter

getRemoteTypeCategory

public String getRemoteTypeCategory(Object element)
Description copied from interface: ISystemRemoteElementAdapter
Return a value for the type category property for this object The value must not be translated, so that property pages registered via xml can subset by it.

Specified by:
getRemoteTypeCategory in interface ISystemRemoteElementAdapter

getSubSystemConfigurationId

public String getSubSystemConfigurationId(Object element)
Return the subsystem factory id that owns this remote object The value must not be translated, so that property pages registered via xml can subset by it.

Specified by:
getSubSystemConfigurationId in interface ISystemRemoteElementAdapter

refreshRemoteObject

public boolean refreshRemoteObject(Object oldElement,
                                   Object newElement)
Description copied from interface: ISystemRemoteElementAdapter

Short answer: treat this like clone(), and just copy any important instance variables

Imagine the same remote resource is shown multiple times in the same tree view.... say because multiple filters resolve to it, or there are two connections to the same host. Typically it is a different object in memory within the tree, but it refers to the same remote resource.
Now imagine one of the references is selected by the user and renamed via the rename action. This might only update the selected reference. What about the other objects which refer to the same remote resource... they need to update their in-memory "name" variable too.
That is what this method. Every reference to the same remote resource is found (they have the same absolute name and come from a system with the same hostname) and this method is called on those other references. This is your opportunity to copy the attributes from the new element to the old element.

Some view has updated the name or properties of this remote object. As a result, the remote object's contents need to be refreshed. You are given the old remote object that has old data, and you are given the new remote object that has the new data. For example, on a rename the old object still has the old name attribute while the new object has the new new attribute. You can copy the new name into the old object. Similar for any properties you allow the user to edit via the property sheet.

This is called by viewers like SystemView in response to rename and property change events.

Specified by:
refreshRemoteObject in interface ISystemRemoteElementAdapter
Parameters:
oldElement - the element that was found in the tree
newElement - the updated element that was passed in the REFRESH_REMOTE event
Returns:
true if you want the viewer that called this to refresh the children of this object, such as is needed on a rename of a folder, say, if the child object cache the parent folder name or an absolute file name.

supportsUserDefinedActions

public boolean supportsUserDefinedActions(Object object)
Description copied from interface: ISystemRemoteElementAdapter
Returns whether user defined actions should be shown for the object.

Specified by:
supportsUserDefinedActions in interface ISystemRemoteElementAdapter
Parameters:
object - the object.
Returns:
true if the object supports user defined actions, false otherwise.

RSE
Release 1.0

Copyright (c) IBM Corporation and others 2000, 2006. All Rights Reserved.