|
RSE Release 1.0 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.eclipse.rse.ui.view.AbstractSystemViewAdapter
org.eclipse.rse.processes.ui.view.SystemViewRemoteProcessAdapter
| 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.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 java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 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 |
public SystemViewRemoteProcessAdapter()
| Method Detail |
public boolean canDrag(Object element)
ISystemDragDropAdapter
canDrag in interface ISystemDragDropAdaptercanDrag in class AbstractSystemViewAdapterAbstractSystemViewAdapter.doDrag(Object,boolean,IProgressMonitor),
AbstractSystemViewAdapter.canDrop(Object),
AbstractSystemViewAdapter.doDrop(Object,Object,boolean,boolean,IProgressMonitor),
AbstractSystemViewAdapter.validateDrop(Object,Object,boolean)public boolean canDrag(SystemRemoteResourceSet elements)
ISystemDragDropAdapter
canDrag in interface ISystemDragDropAdaptercanDrag in class AbstractSystemViewAdapter
public Object doDrag(Object element,
boolean sameSystemType,
IProgressMonitor monitor)
ISystemDragDropAdapter
doDrag in interface ISystemDragDropAdapterdoDrag in class AbstractSystemViewAdapterAbstractSystemViewAdapter.canDrag(Object),
AbstractSystemViewAdapter.canDrop(Object),
AbstractSystemViewAdapter.doDrop(Object,Object,boolean,boolean,IProgressMonitor),
AbstractSystemViewAdapter.validateDrop(Object,Object,boolean)
public ISystemResourceSet doDrag(SystemRemoteResourceSet set,
IProgressMonitor monitor)
ISystemDragDropAdapter
doDrag in interface ISystemDragDropAdapterdoDrag in class AbstractSystemViewAdapterset - the set of objects to copymonitor - the progress monitor
public void addActions(SystemMenuManager menu,
IStructuredSelection selection,
Shell parent,
String menuGroup)
ISystemViewElementAdapter
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:
SystemBaseAction. For a simple action doesn't present any UI.
SystemBaseDialogAction. For an action that presents a dialog.
SystemBaseWizardAction. For an action that presents a wizard.
SystemBaseSubMenuAction. For an action that cascades into a submenu with other actions.
addActions in interface ISystemViewElementAdapteraddActions in class AbstractSystemViewAdaptermenu - the popup menu you can contribute toselection - the current selection in the calling tree or table viewparent - the shell of the calling tree or table viewmenuGroup - the default menu group to place actions into if you don't care where they. Pass this to the SystemMenuManager add method.ISystemViewElementAdapter.addActions(SystemMenuManager, IStructuredSelection, Shell, String)public ISubSystem getSubSystem(Object element)
ISystemViewElementAdapter
getSubSystem in interface ISystemViewElementAdaptergetSubSystem in class AbstractSystemViewAdapterpublic ImageDescriptor getImageDescriptor(Object element)
ISystemViewElementAdapter
getImageDescriptor in interface ISystemViewElementAdaptergetImageDescriptor in class AbstractSystemViewAdapterelement - The element for which an image is desiredpublic String getText(Object element)
ISystemViewElementAdapter
getText in interface ISystemViewElementAdaptergetText in class AbstractSystemViewAdapterAbstractSystemViewAdapter.getName(Object),
AbstractSystemViewAdapter.getAbsoluteName(Object)public String getAlternateText(Object element)
getAlternateText in interface ISystemViewElementAdaptergetAlternateText in class AbstractSystemViewAdapterAbstractSystemViewAdapter.getName(Object),
AbstractSystemViewAdapter.getAbsoluteName(Object)public String getAbsoluteName(Object object)
ISystemRemoteElementAdapter
getAbsoluteName in interface IRemoteObjectIdentifiergetAbsoluteName in class AbstractSystemViewAdapterAbstractSystemViewAdapter.getText(Object),
AbstractSystemViewAdapter.getName(Object)public String getType(Object element)
ISystemViewElementAdapter
getType in interface ISystemViewElementAdaptergetType in class AbstractSystemViewAdapterpublic Object getParent(Object element)
ISystemViewElementAdapter
getParent in interface ISystemViewElementAdaptergetParent in class AbstractSystemViewAdapterpublic boolean hasChildren(Object element)
ISystemViewElementAdapter
hasChildren in interface ISystemViewElementAdapterhasChildren in class AbstractSystemViewAdapterpublic Object[] getChildren(Object element)
ISystemViewElementAdapter
getChildren in interface ISystemViewElementAdaptergetChildren in class AbstractSystemViewAdapterprotected IPropertyDescriptor[] internalGetPropertyDescriptors()
AbstractSystemViewAdapterOverride 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:
AbstractSystemViewAdapter.isPropertySet(Object)
AbstractSystemViewAdapter.resetPropertyValue(Object)
AbstractSystemViewAdapter.setPropertyValue(Object,Object)
internalGetPropertyDescriptors in class AbstractSystemViewAdapter#createSimplePropertyDescriptor(String,ResourceBundle,String)protected Object internalGetPropertyValue(Object key)
internalGetPropertyValue in class AbstractSystemViewAdapterkey - the name of the property as named by its property descriptor
public Object getPropertyValue(Object property,
boolean formatted)
getPropertyValue in interface ISystemViewElementAdaptergetPropertyValue in class AbstractSystemViewAdapterproperty - the name or key of the property as named by its property descriptorformatted - indication of whether to return the value in formatted or raw form
protected String formatState(String state)
public String getAbsoluteParentName(Object element)
getAbsoluteParentName in interface ISystemRemoteElementAdapter
public Object getRemoteParent(Shell shell,
Object element)
throws Exception
The shell is required in order to set the cursor to a busy state if a remote trip is required.
getRemoteParent in interface ISystemRemoteElementAdapterException
public String[] getRemoteParentNamesInUse(Shell shell,
Object element)
throws Exception
getRemoteParentNamesInUse in interface ISystemRemoteElementAdapterExceptionpublic String getRemoteSubType(Object element)
ISystemRemoteElementAdapter
getRemoteSubType in interface ISystemRemoteElementAdapterpublic String getRemoteType(Object element)
ISystemRemoteElementAdapter
getRemoteType in interface ISystemRemoteElementAdapterpublic String getRemoteTypeCategory(Object element)
ISystemRemoteElementAdapter
getRemoteTypeCategory in interface ISystemRemoteElementAdapterpublic String getSubSystemConfigurationId(Object element)
getSubSystemConfigurationId in interface ISystemRemoteElementAdapter
public boolean refreshRemoteObject(Object oldElement,
Object newElement)
ISystemRemoteElementAdapterShort 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.
refreshRemoteObject in interface ISystemRemoteElementAdapteroldElement - the element that was found in the treenewElement - the updated element that was passed in the REFRESH_REMOTE event
public boolean supportsUserDefinedActions(Object object)
ISystemRemoteElementAdapter
supportsUserDefinedActions in interface ISystemRemoteElementAdapterobject - the object.
true if the object supports user defined actions, false otherwise.
|
RSE Release 1.0 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||