|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.etools.systems.core.ui.view.AbstractSystemViewAdapter
com.ibm.etools.systems.core.ui.view.SystemViewScratchpadAdapter
Adapter for the root-providing object of the SystemView tree viewer.
Field Summary | |
---|---|
static String |
copyright
|
Fields inherited from class com.ibm.etools.systems.core.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 com.ibm.etools.systems.core.ui.view.ISystemViewElementAdapter |
---|
noActions |
Fields inherited from interface com.ibm.etools.systems.subsystems.IRemoteObjectIdentifier |
---|
Copyright |
Constructor Summary | |
---|---|
SystemViewScratchpadAdapter()
Ctor. |
Method Summary | |
---|---|
void |
addActions(SystemMenuManager menu,
IStructuredSelection selection,
Shell shell,
String menuGroup)
Returns any actions that should be contributed to the popup menu for the given element. |
boolean |
canDrop(Object element)
Return true if another object can be copied into this object |
Object |
doDrop(Object from,
Object to,
boolean sameSystemType,
boolean sameSystem,
int srcType,
IProgressMonitor monitor)
Perform drop from the "from" object to the "to" object |
String |
getAbsoluteName(Object element)
Return the absolute name, versus just display name, of this object. |
String |
getAbsoluteParentName(Object element)
Return fully qualified name that uniquely identifies this remote object's remote parent within its subsystem. |
Object[] |
getChildren(Object element)
Return the children of this object |
ImageDescriptor |
getImageDescriptor(Object element)
Returns an image descriptor for the image. |
ISystemValidator |
getNameValidator(Object element)
Return a validator for verifying the new name is correct. |
Object |
getParent(Object element)
Return the parent of this object |
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. |
String |
getSubSystemFactoryId(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 the type label for this object |
boolean |
hasChildren(Object element)
Return true if this object has children |
protected org.eclipse.ui.views.properties.IPropertyDescriptor[] |
internalGetPropertyDescriptors()
Return our unique property descriptors |
Object |
internalGetPropertyValue(Object key)
Return our unique property values |
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 |
showDelete(Object element)
We don't support delete at all. |
boolean |
showRename(Object element)
We don't support rename at all. |
boolean |
supportsUserDefinedActions(Object object)
Returns false . |
boolean |
validateDrop(Object src,
Object target,
boolean sameSystem)
Return true if it is valid for the src object to be dropped in the target |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.ibm.etools.systems.core.ui.view.ISystemViewElementAdapter |
---|
canDelete, canRename, doDelete, doRename, getCanonicalNewName, getChildren, getChildrenUsingExpandToFilter, getFilterString, getInput, getInputMementoHandle, getMementoHandle, getMementoHandleKey, getName, getPropertyValue, getShell, getStatusLineText, getSubSystem, getUniquePropertyDescriptors, getViewer, handleDoubleClick, isPromptable, namesAreEqual, saveExpansionState, selectionChanged, setFilterString, setInput, setPropertySourceInput, setShell, setViewer, showGenericShowInTableAction, showOpenViewActions, showRefresh, supportsDeferredQueries |
Methods inherited from interface com.ibm.etools.systems.core.ui.view.ISystemDragDropAdapter |
---|
canDrag, doDrag, doDrop |
Methods inherited from interface com.ibm.etools.systems.core.ui.view.ISystemRemoteElementAdapter |
---|
canEdit, getEditableRemoteObject, getFilterStringFor, getName, getRemoteSourceType, getRemoteSubSubType, getSubSystem |
Field Detail |
public static final String copyright
Constructor Detail |
public SystemViewScratchpadAdapter()
Method Detail |
public void addActions(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup)
addActions
in interface ISystemViewElementAdapter
addActions
in class AbstractSystemViewAdapter
menu
- The menu to contribute actions toselection
- The window's current selection.shell
- Shell of viewermenuGroup
- recommended menu group to add actions to. If added to another group, you must be sure to create that group first.ISystemViewElementAdapter.addActions(SystemMenuManager, IStructuredSelection, Shell, String)
public ImageDescriptor getImageDescriptor(Object element)
getImageDescriptor
in interface ISystemViewElementAdapter
getImageDescriptor
in class AbstractSystemViewAdapter
element
- The element for which an image is desiredpublic String getText(Object element)
getText
in interface ISystemViewElementAdapter
getText
in class AbstractSystemViewAdapter
AbstractSystemViewAdapter.getName(Object)
,
AbstractSystemViewAdapter.getAbsoluteName(Object)
public String getAbsoluteName(Object element)
getAbsoluteName
in interface IRemoteObjectIdentifier
getAbsoluteName
in class AbstractSystemViewAdapter
AbstractSystemViewAdapter.getText(Object)
,
AbstractSystemViewAdapter.getName(Object)
public String getType(Object element)
getType
in interface ISystemViewElementAdapter
getType
in class AbstractSystemViewAdapter
public Object getParent(Object element)
getParent
in interface ISystemViewElementAdapter
getParent
in class AbstractSystemViewAdapter
public Object[] getChildren(Object element)
getChildren
in interface ISystemViewElementAdapter
getChildren
in class AbstractSystemViewAdapter
public boolean hasChildren(Object element)
hasChildren
in interface ISystemViewElementAdapter
hasChildren
in class AbstractSystemViewAdapter
public boolean showDelete(Object element)
showDelete
in interface ISystemViewElementAdapter
showDelete
in class AbstractSystemViewAdapter
AbstractSystemViewAdapter.canDelete(Object)
,
AbstractSystemViewAdapter.doDelete(Shell,Object)
public boolean showRename(Object element)
showRename
in interface ISystemViewElementAdapter
showRename
in class AbstractSystemViewAdapter
AbstractSystemViewAdapter.canRename(Object)
,
AbstractSystemViewAdapter.doRename(Shell,Object,String)
public ISystemValidator getNameValidator(Object element)
getNameValidator
in interface ISystemViewElementAdapter
getNameValidator
in class AbstractSystemViewAdapter
AbstractSystemViewAdapter.canRename(Object)
protected org.eclipse.ui.views.properties.IPropertyDescriptor[] internalGetPropertyDescriptors()
internalGetPropertyDescriptors
in class AbstractSystemViewAdapter
AbstractSystemViewAdapter.createSimplePropertyDescriptor(String,ResourceBundle,String)
public Object internalGetPropertyValue(Object key)
internalGetPropertyValue
in class AbstractSystemViewAdapter
key
- the name of the property as named by its property descriptor
public boolean canDrop(Object element)
ISystemDragDropAdapter
canDrop
in interface ISystemDragDropAdapter
canDrop
in class AbstractSystemViewAdapter
AbstractSystemViewAdapter.canDrag(Object)
,
AbstractSystemViewAdapter.doDrag(Object,boolean,IProgressMonitor)
,
AbstractSystemViewAdapter.doDrop(Object,Object,boolean,boolean,IProgressMonitor)
,
AbstractSystemViewAdapter.validateDrop(Object,Object,boolean)
public Object doDrop(Object from, Object to, boolean sameSystemType, boolean sameSystem, int srcType, IProgressMonitor monitor)
ISystemDragDropAdapter
doDrop
in interface ISystemDragDropAdapter
doDrop
in class AbstractSystemViewAdapter
AbstractSystemViewAdapter.canDrag(Object)
,
AbstractSystemViewAdapter.doDrag(Object,boolean,IProgressMonitor)
,
AbstractSystemViewAdapter.canDrop(Object)
,
AbstractSystemViewAdapter.validateDrop(Object,Object,boolean)
public String getAbsoluteParentName(Object element)
ISystemRemoteElementAdapter
getAbsoluteParentName
in interface ISystemRemoteElementAdapter
public String getSubSystemFactoryId(Object element)
ISystemRemoteElementAdapter
getSubSystemFactoryId
in interface ISystemRemoteElementAdapter
public String getRemoteTypeCategory(Object element)
ISystemRemoteElementAdapter
getRemoteTypeCategory
in interface ISystemRemoteElementAdapter
public String getRemoteType(Object element)
ISystemRemoteElementAdapter
getRemoteType
in interface ISystemRemoteElementAdapter
public String getRemoteSubType(Object element)
ISystemRemoteElementAdapter
getRemoteSubType
in interface ISystemRemoteElementAdapter
public boolean refreshRemoteObject(Object oldElement, Object newElement)
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.
refreshRemoteObject
in interface ISystemRemoteElementAdapter
oldElement
- the element that was found in the treenewElement
- the updated element that was passed in the REFRESH_REMOTE event
public Object getRemoteParent(Shell shell, Object element) throws Exception
ISystemRemoteElementAdapter
getRemoteParent
in interface ISystemRemoteElementAdapter
Exception
public String[] getRemoteParentNamesInUse(Shell shell, Object element) throws Exception
ISystemRemoteElementAdapter
getRemoteParentNamesInUse
in interface ISystemRemoteElementAdapter
Exception
public boolean validateDrop(Object src, Object target, boolean sameSystem)
ISystemDragDropAdapter
validateDrop
in interface ISystemDragDropAdapter
validateDrop
in class AbstractSystemViewAdapter
src
- the object to droptarget
- the object which src is dropped insameSystem
- whether this is the same system or not
AbstractSystemViewAdapter.canDrag(Object)
,
AbstractSystemViewAdapter.doDrag(Object,boolean,IProgressMonitor)
,
AbstractSystemViewAdapter.canDrop(Object)
,
AbstractSystemViewAdapter.doDrop(Object,Object,boolean,boolean,IProgressMonitor)
public boolean supportsUserDefinedActions(Object object)
false
.
supportsUserDefinedActions
in interface ISystemRemoteElementAdapter
object
- the object.
true
if the object supports user defined actions, false
otherwise.ISystemRemoteElementAdapter.supportsUserDefinedActions(java.lang.Object)
|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |