|
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.SystemViewRemoteSearchResultAdapter
Adapter class to enable the output of a search to be "live" in that it has actions and properties.
Field Summary | |
---|---|
protected IPropertyDescriptor[] |
_propertyDescriptors
|
static String |
Copyright
|
Fields inherited from class com.ibm.etools.systems.core.ui.view.AbstractSystemViewAdapter |
---|
_lastResults, _lastSelected, canceledObject, copyright, 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.ISystemRemoteElementAdapter |
---|
copyright |
Fields inherited from interface com.ibm.etools.systems.commands.ISystemOutputRemoteTypes |
---|
copyright, TYPE_COMMAND, TYPE_DIRECTORY, TYPE_ENVVAR, TYPE_ENVVAR_LIBPATH, TYPE_ENVVAR_PATH, TYPE_ERROR, TYPE_FILE, TYPE_GREP, TYPE_INFORMATIONAL, TYPE_PROCESS, TYPE_PROMPT, TYPE_WARNING, TYPECATEGORY |
Fields inherited from interface com.ibm.etools.systems.core.ui.view.ISystemViewElementAdapter |
---|
noActions |
Constructor Summary | |
---|---|
SystemViewRemoteSearchResultAdapter()
|
Method Summary | |
---|---|
void |
addActions(SystemMenuManager menu,
IStructuredSelection selection,
Shell shell,
String menuGroup)
Contributed context menu actions for a remote search result |
void |
addCommonRemoteActions(SystemMenuManager menu,
IStructuredSelection selection,
Shell shell,
String menuGroup)
We should not add common actions such as compile and user actions for this adapter. |
boolean |
canDelete(Object element)
Return true if this object is deletable by the user. |
boolean |
canDrag(Object element)
Indicates whether the specified object can be copied |
boolean |
canDrop(Object element)
Indicates whether the specified object can have another object copied to it |
boolean |
canEdit(Object element)
Indicates whether the search result can be opened in an editor |
boolean |
canRename(Object element)
Return true if this object is renamable by the user. |
Object |
doDrag(Object element,
boolean sameSystemType,
IProgressMonitor monitor)
Copy the specified remote output object. |
Object |
doDrop(Object src,
Object target,
boolean sameSystemType,
boolean sameSystem,
int srcType,
IProgressMonitor monitor)
Perform a copy via drag and drop. |
boolean |
doRename(Shell shell,
Object element,
String name)
Perform the rename action. |
String |
getAbsoluteName(Object element)
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 |
Object[] |
getChildren(Object element)
Returns nothing |
ISystemEditableRemoteObject |
getEditableRemoteObject(Object element)
Returns the associated remote editable object for this search result |
String |
getFilterStringFor(Object object)
Return a filter string that corresponds to this object. |
ImageDescriptor |
getImageDescriptor(Object element)
Returns the associated image descriptor for a search result |
Object |
getParent(Object element)
Returns the parent of the search result (i.e. |
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 |
getRemoteSourceType(Object element)
Return the source type of the selected object. |
String |
getRemoteSubSubType(Object element)
Return a value for the sub-subtype property for this object. |
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. |
SubSystem |
getSubSystem(Object element)
Returns the associated subsystem for this search result |
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)
Returns the display text for this search result |
String |
getType(Object element)
Returns nothing |
IPropertyDescriptor[] |
getUniquePropertyDescriptors()
Callable by subclasses. |
boolean |
handleDoubleClick(Object element)
Opens the appropriate editor for a remote search result object |
boolean |
hasChildren(Object element)
Returns false. |
protected org.eclipse.ui.views.properties.IPropertyDescriptor[] |
internalGetPropertyDescriptors()
Returns the unique property descriptors for a search result |
protected Object |
internalGetPropertyValue(Object key)
Returns the current collection of property descriptors. |
static IRemoteFile |
outputToFile(IRemoteSearchResult output)
Returns the associated remote file for a search result |
boolean |
refreshRemoteObject(Object oldElement,
Object newElement)
Some view has updated the name or properties of this remote object. |
boolean |
showDelete(Object element)
Return true if we should show the delete 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 |
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.ISystemRemoteElementAdapter |
---|
getName |
Field Detail |
public static final String Copyright
protected IPropertyDescriptor[] _propertyDescriptors
Constructor Detail |
public SystemViewRemoteSearchResultAdapter()
Method Detail |
public void addCommonRemoteActions(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup)
addCommonRemoteActions
in class AbstractSystemViewAdapter
menu
- The menu to contribute actions toselection
- The window's current selection.shell
- of viewer calling this. Most dialogs require a shell.menuGroup
- recommended menu group to add actions to. If added to another group, you must be sure to create that group first.com.ibm.etools.systems.core.ui.view.AbstractSystemViewAdapter#addCommonRemoteActions(com.ibm.etools.systems.core.ui.SystemMenuManager, org.eclipse.jface.viewers.IStructuredSelection, org.eclipse.swt.widgets.Shell, java.lang.String)
public void addActions(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup)
addActions
in interface ISystemViewElementAdapter
addActions
in class AbstractSystemViewAdapter
menu
- the popup menu you can contribute toselection
- the current selection in the calling tree or table viewshell
- 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 Object getParent(Object element)
getParent
in interface ISystemViewElementAdapter
getParent
in class AbstractSystemViewAdapter
public String getText(Object element)
getText
in interface ISystemViewElementAdapter
getText
in class AbstractSystemViewAdapter
AbstractSystemViewAdapter.getName(Object)
,
AbstractSystemViewAdapter.getAbsoluteName(Object)
public String getType(Object element)
getType
in interface ISystemViewElementAdapter
getType
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 static IRemoteFile outputToFile(IRemoteSearchResult output)
output
- the search result
public boolean handleDoubleClick(Object element)
handleDoubleClick
in interface ISystemViewElementAdapter
handleDoubleClick
in class AbstractSystemViewAdapter
public SubSystem getSubSystem(Object element)
getSubSystem
in interface ISystemRemoteElementAdapter
getSubSystem
in class AbstractSystemViewAdapter
public String getAbsoluteName(Object element)
getAbsoluteName
in interface ISystemRemoteElementAdapter
getAbsoluteName
in class AbstractSystemViewAdapter
AbstractSystemViewAdapter.getText(Object)
,
AbstractSystemViewAdapter.getName(Object)
public String getAbsoluteParentName(Object element)
getAbsoluteParentName
in interface ISystemRemoteElementAdapter
public String getSubSystemFactoryId(Object element)
getSubSystemFactoryId
in interface ISystemRemoteElementAdapter
public String getRemoteTypeCategory(Object element)
getRemoteTypeCategory
in interface ISystemRemoteElementAdapter
public String getRemoteType(Object element)
getRemoteType
in interface ISystemRemoteElementAdapter
public String getRemoteSubType(Object element)
getRemoteSubType
in interface ISystemRemoteElementAdapter
public String getRemoteSubSubType(Object element)
getRemoteSubSubType
in interface ISystemRemoteElementAdapter
getRemoteSubSubType
in class AbstractSystemViewAdapter
public String getRemoteSourceType(Object element)
getRemoteSourceType
in interface ISystemRemoteElementAdapter
getRemoteSourceType
in class AbstractSystemViewAdapter
public boolean refreshRemoteObject(Object oldElement, Object newElement)
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
getRemoteParent
in interface ISystemRemoteElementAdapter
Exception
public String[] getRemoteParentNamesInUse(Shell shell, Object element) throws Exception
getRemoteParentNamesInUse
in interface ISystemRemoteElementAdapter
Exception
public IPropertyDescriptor[] getUniquePropertyDescriptors()
AbstractSystemViewAdapter
If internalGetPropertyDescriptors() returns non-null, then returns that, else computes the difference.
This is called by the table views like SystemTableView
.
getUniquePropertyDescriptors
in interface ISystemViewElementAdapter
getUniquePropertyDescriptors
in class AbstractSystemViewAdapter
protected org.eclipse.ui.views.properties.IPropertyDescriptor[] internalGetPropertyDescriptors()
internalGetPropertyDescriptors
in class AbstractSystemViewAdapter
AbstractSystemViewAdapter.createSimplePropertyDescriptor(String,ResourceBundle,String)
protected Object internalGetPropertyValue(Object key)
internalGetPropertyValue
in class AbstractSystemViewAdapter
key
- the name of the property as named by its property descriptor
public ImageDescriptor getImageDescriptor(Object element)
getImageDescriptor
in interface ISystemViewElementAdapter
getImageDescriptor
in class AbstractSystemViewAdapter
element
- The element for which an image is desiredpublic boolean showDelete(Object element)
showDelete
in interface ISystemViewElementAdapter
showDelete
in class AbstractSystemViewAdapter
AbstractSystemViewAdapter.canDelete(Object)
,
AbstractSystemViewAdapter.doDelete(Shell,Object)
public boolean canDelete(Object element)
canDelete
in interface ISystemViewElementAdapter
canDelete
in class AbstractSystemViewAdapter
AbstractSystemViewAdapter.showDelete(Object)
,
AbstractSystemViewAdapter.doDelete(Shell,Object)
public boolean showRefresh(Object element)
showRefresh
in interface ISystemViewElementAdapter
showRefresh
in class AbstractSystemViewAdapter
public boolean showOpenViewActions(Object element)
showOpenViewActions
in interface ISystemViewElementAdapter
showOpenViewActions
in class AbstractSystemViewAdapter
public boolean showRename(Object element)
showRename
in interface ISystemViewElementAdapter
showRename
in class AbstractSystemViewAdapter
AbstractSystemViewAdapter.canRename(Object)
,
AbstractSystemViewAdapter.doRename(Shell,Object,String)
public boolean canRename(Object element)
canRename
in interface ISystemViewElementAdapter
canRename
in class AbstractSystemViewAdapter
AbstractSystemViewAdapter.showRename(Object)
,
AbstractSystemViewAdapter.doRename(Shell,Object,String)
,
AbstractSystemViewAdapter.getNameValidator(Object)
,
AbstractSystemViewAdapter.getCanonicalNewName(Object,String)
,
AbstractSystemViewAdapter.namesAreEqual(Object,String)
public boolean doRename(Shell shell, Object element, String name) throws Exception
doRename
in interface ISystemViewElementAdapter
doRename
in class AbstractSystemViewAdapter
Exception
AbstractSystemViewAdapter.showRename(Object)
,
AbstractSystemViewAdapter.canRename(Object)
public boolean canDrop(Object element)
canDrop
in interface ISystemDragDropAdapter
canDrop
in class AbstractSystemViewAdapter
element
- the object to copy to
AbstractSystemViewAdapter.canDrag(Object)
,
AbstractSystemViewAdapter.doDrag(Object,boolean,IProgressMonitor)
,
AbstractSystemViewAdapter.doDrop(Object,Object,boolean,boolean,IProgressMonitor)
,
AbstractSystemViewAdapter.validateDrop(Object,Object,boolean)
public boolean canDrag(Object element)
canDrag
in interface ISystemDragDropAdapter
canDrag
in class AbstractSystemViewAdapter
element
- the object to copyAbstractSystemViewAdapter.doDrag(Object,boolean,IProgressMonitor)
,
AbstractSystemViewAdapter.canDrop(Object)
,
AbstractSystemViewAdapter.doDrop(Object,Object,boolean,boolean,IProgressMonitor)
,
AbstractSystemViewAdapter.validateDrop(Object,Object,boolean)
public Object doDrag(Object element, boolean sameSystemType, IProgressMonitor monitor)
doDrag
in interface ISystemDragDropAdapter
doDrag
in class AbstractSystemViewAdapter
element
- the output to copysameSystemType
- not applicable for remote outputmonitor
- the progress monitorAbstractSystemViewAdapter.canDrag(Object)
,
AbstractSystemViewAdapter.canDrop(Object)
,
AbstractSystemViewAdapter.doDrop(Object,Object,boolean,boolean,IProgressMonitor)
,
AbstractSystemViewAdapter.validateDrop(Object,Object,boolean)
public boolean validateDrop(Object src, Object target, boolean sameSystem)
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
AbstractSystemViewAdapter.canDrag(Object)
,
AbstractSystemViewAdapter.doDrag(Object,boolean,IProgressMonitor)
,
AbstractSystemViewAdapter.canDrop(Object)
,
AbstractSystemViewAdapter.doDrop(Object,Object,boolean,boolean,IProgressMonitor)
public Object doDrop(Object src, Object target, boolean sameSystemType, boolean sameSystem, int srcType, IProgressMonitor monitor)
doDrop
in interface ISystemDragDropAdapter
doDrop
in class AbstractSystemViewAdapter
src
- the object to be copied. If the target and source are not on the same system, then this is a
temporary object produced by the doDrag.target
- the object to be copied to.sameSystem
- an indication whether the target and source reside on the same type of systemmonitor
- the progress monitor
AbstractSystemViewAdapter.canDrag(Object)
,
AbstractSystemViewAdapter.doDrag(Object,boolean,IProgressMonitor)
,
AbstractSystemViewAdapter.canDrop(Object)
,
AbstractSystemViewAdapter.validateDrop(Object,Object,boolean)
public boolean canEdit(Object element)
canEdit
in interface ISystemRemoteElementAdapter
canEdit
in class AbstractSystemViewAdapter
element
- the object to edit
public ISystemEditableRemoteObject getEditableRemoteObject(Object element)
getEditableRemoteObject
in interface ISystemRemoteElementAdapter
getEditableRemoteObject
in class AbstractSystemViewAdapter
element
- the object to edit
public String getFilterStringFor(Object object)
getFilterStringFor
in interface ISystemRemoteElementAdapter
getFilterStringFor
in class AbstractSystemViewAdapter
object
- the object to obtain a filter string for
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)
public Object getPropertyValue(Object property, boolean formatted)
getPropertyValue
in interface ISystemViewElementAdapter
getPropertyValue
in class AbstractSystemViewAdapter
property
- 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
|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |