|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This is the interface for an adapter on objects in the system viewer. Any input into the system viewer must register an adapter that implements this interface.
This interface supports a union of all the methods needed to support a TreeViewer
content provider and label provider. The SystemViewLabelAndContentProvider
delegates to objects of this interface almost completely. It gets such an
object by calling:
isve = object.getAdapter(ISystemViewElementAdapter.class);
interestingInfo = isve.getXXXX(object);
This interface also supports IPropertySource via inheritance, so we can feed the PropertySheet.
For remote resource objects, their adapter should also implement
ISystemRemoteElementAdapter
AbstractSystemViewAdapter
Field Summary | |
---|---|
static String |
copyright
|
static IAction[] |
noActions
|
Fields inherited from interface com.ibm.etools.systems.subsystems.IRemoteObjectIdentifier |
---|
Copyright |
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 |
canDelete(Object element)
Return true if this object is deletable by the user. |
boolean |
canRename(Object element)
Return true if this object is renamable by the user. |
boolean |
doDelete(Shell shell,
Object element)
Perform the delete on the given item. |
boolean |
doRename(Shell shell,
Object element,
String name)
Perform the rename on the given item. |
String |
getCanonicalNewName(Object element,
String newName)
Form and return a new canonical (unique) name for this object, given a candidate for the new name. |
Object[] |
getChildren(IProgressMonitor monitor,
Object element)
Return the children of this object. |
Object[] |
getChildren(Object element)
Return the children of this object |
Object[] |
getChildrenUsingExpandToFilter(Object element,
String expandToFilter)
Return the children of this object, using the given Expand-To filter |
String |
getFilterString()
|
ImageDescriptor |
getImageDescriptor(Object element)
Returns an image descriptor for the image. |
ISystemViewInputProvider |
getInput()
Get the input object used to populate the viewer with the roots. |
String |
getInputMementoHandle(Object element)
Return what to save to disk to identify this element when it is the input object to a secondary Remote Systems Explorer perspective. |
String |
getMementoHandle(Object element)
Return what to save to disk to identify this element in the persisted list of expanded elements. |
String |
getMementoHandleKey(Object element)
Return a short string to uniquely identify the type of resource. |
String |
getName(Object element)
Return the name of this object, which may be different than the display text ({#link #getText(Object)}. |
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 |
getPropertyValue(Object key,
boolean formatted)
Wrapper to getPropertyValue(Object key) that takes an argument for determining whether to return a raw value or formatted value. |
Shell |
getShell()
Get the shell currently hosting the objects in this adapter, as last set by the label or content provider that retrieved this adapter. |
String |
getStatusLineText(Object element)
Return the string to display in the status line when the given object is selected |
SubSystem |
getSubSystem(Object element)
Get the subsystem that corresponds to this object if one exists. |
String |
getText(Object element)
Return the label for this object |
String |
getType(Object element)
Return a value for the type property for this object |
IPropertyDescriptor[] |
getUniquePropertyDescriptors()
Returns the list of property descriptors that are unique for this particular adapter - that is the difference between the default property descriptors and the total list of property descriptors. |
Viewer |
getViewer()
Return the current viewer, as set via setViewer or its deduced from the setInput input object if set. |
boolean |
handleDoubleClick(Object element)
User has double clicked on an object. |
boolean |
hasChildren(Object element)
Return true if this object has children |
boolean |
isPromptable(Object element)
Return true if this object is a "prompting" object that prompts the user when expanded. |
boolean |
namesAreEqual(Object element,
String newName)
Compare the name of the given element to the given new name to decide if they are equal. |
boolean |
saveExpansionState(Object element)
Somtimes we don't want to remember an element's expansion state, such as for temporarily inserted messages. |
void |
selectionChanged(Object element)
|
void |
setFilterString(String filterString)
|
void |
setInput(ISystemViewInputProvider input)
Set the input object used to populate the viewer with the roots. |
void |
setPropertySourceInput(Object propertySourceInput)
Set input object for property source queries. |
void |
setShell(Shell shell)
Set the shell to be used by any method that requires it. |
void |
setViewer(Viewer viewer)
Set the viewer that is driving this adapter. |
boolean |
showDelete(Object element)
Return true if we should show the delete action in the popup for the given element. |
boolean |
showGenericShowInTableAction(Object element)
Return true if we should show the generic show in table action in the popup for the given element. |
boolean |
showOpenViewActions(Object element)
Return true if we should show the refresh action in the popup for the given element. |
boolean |
showRefresh(Object element)
Return true if we should show the refresh action in the popup for the given element. |
boolean |
showRename(Object element)
Return true if we should show the rename action in the popup for the given element. |
boolean |
supportsDeferredQueries()
Return whether deferred queries are supported. |
Methods inherited from interface com.ibm.etools.systems.core.ui.view.ISystemDragDropAdapter |
---|
canDrag, canDrop, doDrag, doDrop, doDrop, validateDrop |
Methods inherited from interface com.ibm.etools.systems.subsystems.IRemoteObjectIdentifier |
---|
getAbsoluteName |
Field Detail |
public static final String copyright
public static final IAction[] noActions
Method Detail |
public void setShell(Shell shell)
public void setViewer(Viewer viewer)
public void setInput(ISystemViewInputProvider input)
public Shell getShell()
public Viewer getViewer()
public ISystemViewInputProvider getInput()
public SubSystem getSubSystem(Object element)
getSubSystem
in interface ISystemDragDropAdapter
public Object getPropertyValue(Object key, boolean formatted)
public IPropertyDescriptor[] getUniquePropertyDescriptors()
public void addActions(SystemMenuManager menu, IStructuredSelection selection, Shell parent, String menuGroup)
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.
menu
- 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.public ImageDescriptor getImageDescriptor(Object element)
element
- The element for which an image is desiredpublic String getText(Object element)
public String getName(Object element)
public String getType(Object element)
public String getStatusLineText(Object element)
public Object getParent(Object element)
public Object[] getChildren(Object element)
public Object[] getChildren(IProgressMonitor monitor, Object element)
public Object[] getChildrenUsingExpandToFilter(Object element, String expandToFilter)
public boolean hasChildren(Object element)
public boolean isPromptable(Object element)
public void setPropertySourceInput(Object propertySourceInput)
public boolean handleDoubleClick(Object element)
public boolean showDelete(Object element)
public boolean canDelete(Object element)
public boolean doDelete(Shell shell, Object element) throws Exception
Exception
public boolean showRename(Object element)
public boolean canRename(Object element)
public boolean doRename(Shell shell, Object element, String name) throws Exception
Exception
public ISystemValidator getNameValidator(Object element)
public String getCanonicalNewName(Object element, String newName)
For example, two connections or filter pools can have the same name if they are in different profiles. Two iSeries QSYS objects can have the same name if their object types are different.
This method returns a name that can be used for uniqueness checking because it is qualified sufficiently to make it unique.
public boolean namesAreEqual(Object element, String newName)
public boolean showRefresh(Object element)
public boolean showOpenViewActions(Object element)
public boolean showGenericShowInTableAction(Object element)
public String getMementoHandle(Object element)
public String getInputMementoHandle(Object element)
public String getMementoHandleKey(Object element)
public boolean saveExpansionState(Object element)
public void selectionChanged(Object element)
public void setFilterString(String filterString)
public String getFilterString()
public boolean supportsDeferredQueries()
true
if it supports deferred queries, false
otherwise.
|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |