|
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.SystemViewRemoteFileAdapter
Adapter for displaying remote file system objects in tree views. These are children of RemoteFileSubSystem filter strings
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 | |
---|---|
SystemViewRemoteFileAdapter()
Constructor |
|
SystemViewRemoteFileAdapter(boolean foldersOnly,
boolean filesOnly)
Constructor for folders or files only |
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 filter string object. |
boolean |
canDelete(Object element)
Yes, remote file objects are deletable! |
boolean |
canDrag(Object element)
Indicates whether the specified object can be copied or not. |
boolean |
canDrop(Object element)
Indicates whether the specified object can have another object copied to it |
boolean |
canEdit(Object element)
Indicates whether the specified object can be edited or not. |
boolean |
canRename(Object element)
Yes, remote file objects are renamable! |
protected String |
checkForCollision(Shell shell,
IRemoteFile targetFolder,
String oldName)
|
protected static PropertyDescriptor |
createSimplePropertyDescriptor(String keyAndLabel)
Create and return a simple string readonly property descriptor. |
boolean |
doDelete(Shell shell,
Object element)
Perform the delete action. |
Object |
doDrag(Object element,
boolean sameSystem,
IProgressMonitor monitor)
Performs a drag copy operation. |
Object |
doDrop(Object src,
Object target,
boolean sameSystemType,
boolean sameSystem,
int sourceType,
IProgressMonitor monitor)
Perform a copy via drag and drop. |
boolean |
doRename(Shell shell,
Object element,
String newName)
Perform the rename action. |
String |
getAbsoluteName(Object element)
Return fully qualified name that uniquely identifies this object within its subsystem |
String |
getAbsoluteParentName(Object element)
Return fully qualified name that uniquely identifies this remote object's remote parent within its subsystem |
String |
getCanonicalNewName(Object element,
String newName)
Parent override. |
Object[] |
getChildren(IProgressMonitor monitor,
Object element)
Return the children of this object. |
Object[] |
getChildren(Object element)
Return the children of this object. |
ISystemEditableRemoteObject |
getEditableRemoteObject(Object element)
Return the remote edit wrapper for this object. |
String |
getFilterString()
Get the current filter string being used to subset the list by. |
String |
getFilterStringFor(Object object)
Return a filter string that corresponds to this object. |
ImageDescriptor |
getImageDescriptor(Object element)
Returns an image descriptor for the image. |
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 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 the untranslated sub-subtype for this object. |
String |
getRemoteSubType(Object element)
Return the untranslated subtype for this object. |
String |
getRemoteType(Object element)
Return the untranslated type for this object. |
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 |
getStatusLineText(Object element)
Return the string to display in the status line when the given object is selected. |
SubSystem |
getSubSystem(Object element)
Return subsystem |
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. |
protected SystemFetchOperation |
getSystemFetchOperation(Object o,
IElementCollector collector)
Returns the SystemFetchOperation to be used in performing a query. |
String |
getText(Object element)
Return the label for this object. |
String |
getType(Object element)
Return the type label 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. |
boolean |
handleDoubleClick(Object element)
User has double clicked on an object. |
boolean |
hasChildren(Object element)
Return true if this object has children. |
protected IPropertyDescriptor[] |
internalGetPropertyDescriptors()
Return our unique property descriptors |
protected Object |
internalGetPropertyValue(Object key)
Returns the current value for the named property. |
boolean |
namesAreEqual(Object element,
String newName)
Parent override. |
boolean |
refreshRemoteObject(Object oldElement,
Object newElement)
Some view has updated the name or properties of this remote object. |
void |
setFilterString(String filterString)
Set a filter string to subset the list by. |
boolean |
supportsDeferredQueries()
Return whether deferred queries are supported. |
boolean |
supportsUserDefinedActions(Object object)
Returns false if the file is a virtual file, otherwise defaults to asking the subsystem
factory. |
boolean |
testAttribute(Object target,
String name,
String value)
From IActionFilter, it exposes properties for decorator and popupMenus extension points. |
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 |
---|
getChildrenUsingExpandToFilter, getInput, getInputMementoHandle, getMementoHandle, getShell, getViewer, isPromptable, saveExpansionState, selectionChanged, setInput, setPropertySourceInput, setShell, setViewer, showDelete, showGenericShowInTableAction, showOpenViewActions, showRefresh, showRename |
Methods inherited from interface com.ibm.etools.systems.core.ui.view.ISystemDragDropAdapter |
---|
doDrop |
Field Detail |
public static final String copyright
Constructor Detail |
public SystemViewRemoteFileAdapter()
public SystemViewRemoteFileAdapter(boolean foldersOnly, boolean filesOnly)
Method Detail |
public void setFilterString(String filterString)
setFilterString
in interface ISystemViewElementAdapter
setFilterString
in class AbstractSystemViewAdapter
public String getFilterString()
getFilterString
in interface ISystemViewElementAdapter
getFilterString
in class AbstractSystemViewAdapter
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 getName(Object element)
Called by common rename and delete actions.
getName
in interface ISystemViewElementAdapter
getName
in class AbstractSystemViewAdapter
AbstractSystemViewAdapter.getText(Object)
,
AbstractSystemViewAdapter.getAbsoluteName(Object)
public String getType(Object element)
getType
in interface ISystemViewElementAdapter
getType
in class AbstractSystemViewAdapter
public String getStatusLineText(Object element)
getStatusLineText
in interface ISystemViewElementAdapter
getStatusLineText
in class AbstractSystemViewAdapter
public Object getParent(Object element)
getParent
in interface ISystemViewElementAdapter
getParent
in class AbstractSystemViewAdapter
public Object[] getChildren(IProgressMonitor monitor, Object element)
getChildren
in interface ISystemViewElementAdapter
getChildren
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 IPropertyDescriptor[] getUniquePropertyDescriptors()
ISystemViewElementAdapter
getUniquePropertyDescriptors
in interface ISystemViewElementAdapter
getUniquePropertyDescriptors
in class AbstractSystemViewAdapter
protected IPropertyDescriptor[] internalGetPropertyDescriptors()
internalGetPropertyDescriptors
in class AbstractSystemViewAdapter
AbstractSystemViewAdapter.createSimplePropertyDescriptor(String,ResourceBundle,String)
protected static PropertyDescriptor createSimplePropertyDescriptor(String keyAndLabel)
protected Object internalGetPropertyValue(Object key)
internalGetPropertyValue
in class AbstractSystemViewAdapter
key
- the name of the property as named by its property descriptor
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
public boolean canDrag(Object element)
canDrag
in interface ISystemDragDropAdapter
canDrag
in class AbstractSystemViewAdapter
element
- the object we want to try to copy
AbstractSystemViewAdapter.doDrag(Object,boolean,IProgressMonitor)
,
AbstractSystemViewAdapter.canDrop(Object)
,
AbstractSystemViewAdapter.doDrop(Object,Object,boolean,boolean,IProgressMonitor)
,
AbstractSystemViewAdapter.validateDrop(Object,Object,boolean)
public boolean canDrop(Object element)
canDrop
in interface ISystemDragDropAdapter
canDrop
in class AbstractSystemViewAdapter
element
- the object we want to try 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 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 doDrag(Object element, boolean sameSystem, IProgressMonitor monitor)
doDrag
in interface ISystemDragDropAdapter
doDrag
in class AbstractSystemViewAdapter
element
- the object which is being copiedsameSystem
- an indication whether a transfer is being made between the same types of systems.monitor
- a progress monitor
AbstractSystemViewAdapter.canDrag(Object)
,
AbstractSystemViewAdapter.canDrop(Object)
,
AbstractSystemViewAdapter.doDrop(Object,Object,boolean,boolean,IProgressMonitor)
,
AbstractSystemViewAdapter.validateDrop(Object,Object,boolean)
public Object doDrop(Object src, Object target, boolean sameSystemType, boolean sameSystem, int sourceType, 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)
protected String checkForCollision(Shell shell, IRemoteFile targetFolder, String oldName)
public boolean canDelete(Object element)
canDelete
in interface ISystemViewElementAdapter
canDelete
in class AbstractSystemViewAdapter
AbstractSystemViewAdapter.showDelete(Object)
,
AbstractSystemViewAdapter.doDelete(Shell,Object)
public boolean doDelete(Shell shell, Object element) throws Exception
doDelete
in interface ISystemViewElementAdapter
doDelete
in class AbstractSystemViewAdapter
Exception
AbstractSystemViewAdapter.showDelete(Object)
,
AbstractSystemViewAdapter.canDelete(Object)
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 newName) throws Exception
doRename
in interface ISystemViewElementAdapter
doRename
in class AbstractSystemViewAdapter
Exception
AbstractSystemViewAdapter.showRename(Object)
,
AbstractSystemViewAdapter.canRename(Object)
public ISystemValidator getNameValidator(Object element)
getNameValidator
in interface ISystemViewElementAdapter
getNameValidator
in class AbstractSystemViewAdapter
AbstractSystemViewAdapter.canRename(Object)
public String getCanonicalNewName(Object element, String newName)
Form and return a new canonical (unique) name for this object, given a candidate for the new name. This is called by the generic multi-rename dialog to test that all new names are unique. To do this right, sometimes more than the raw name itself is required to do uniqueness checking.
Returns newName, but uppercased for Windows file systems
getCanonicalNewName
in interface ISystemViewElementAdapter
getCanonicalNewName
in class AbstractSystemViewAdapter
AbstractSystemViewAdapter.canRename(Object)
public boolean namesAreEqual(Object element, String newName)
Compare the name of the given element to the given new name to decide if they are equal. Allows adapters to consider case and quotes as appropriate.
For Unix/Linux, returns the result of getName(element).equals(newName), which is to say, it is a case sensitive compare. For windows, it is case insensitive (equalsIgnoreCase).
namesAreEqual
in interface ISystemViewElementAdapter
namesAreEqual
in class AbstractSystemViewAdapter
AbstractSystemViewAdapter.canRename(Object)
public String getMementoHandleKey(Object element)
getMementoHandleKey
in interface ISystemViewElementAdapter
getMementoHandleKey
in class AbstractSystemViewAdapter
public String getAbsoluteName(Object element)
getAbsoluteName
in interface IRemoteObjectIdentifier
getAbsoluteName
in class AbstractSystemViewAdapter
AbstractSystemViewAdapter.getText(Object)
,
AbstractSystemViewAdapter.getName(Object)
public String getAbsoluteParentName(Object element)
getAbsoluteParentName
in interface ISystemRemoteElementAdapter
public SubSystem getSubSystem(Object element)
getSubSystem
in interface ISystemViewElementAdapter
getSubSystem
in class AbstractSystemViewAdapter
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)
For files, this returns the extension. For folders, it returns null.
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
The shell is required in order to set the cursor to a busy state if a remote trip is required.
getRemoteParent
in interface ISystemRemoteElementAdapter
Exception
public String[] getRemoteParentNamesInUse(Shell shell, Object element) throws Exception
getRemoteParentNamesInUse
in interface ISystemRemoteElementAdapter
Exception
public boolean handleDoubleClick(Object element)
handleDoubleClick
in interface ISystemViewElementAdapter
handleDoubleClick
in class AbstractSystemViewAdapter
public boolean canEdit(Object element)
ISystemRemoteElementAdapter
canEdit
in interface ISystemRemoteElementAdapter
canEdit
in class AbstractSystemViewAdapter
element
- the object to edit
public ISystemEditableRemoteObject getEditableRemoteObject(Object element)
ISystemRemoteElementAdapter
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 testAttribute(Object target, String name, String value)
true
, then returns true
if the target is a root file.
If the given value is false
, then returns true
if the target is not root.true
, then returns true
if the target is a file.
If the given value is false
, then returns true
if the target is not a file.true
, then returns true
if the target is a directory.
If the given value is false
, then returns true
if the target is not a directory.true
, then returns true
if the target is a hidden file.
If the given value is false
, then returns true
if the target is not a hidden file.true
, then returns true
if the target is readable.
If the given value is false
, then returns true
if the target is not readable.true
, then returns true
if the target is writable.
If the given value is false
, then returns true
if the target is not writable.true
, then returns true
if the target is a binary file.
If the given value is false
, then returns true
if the target is not a binary file.true
, then returns true
if the target is a text file.
If the given value is false
, then returns true
if the target is not a text file.true
, then returns true
if the target is an archive file.
If the given value is false
, then returns true
if the target is not an archive file.true
, then returns true
if the target is a virtual file.
If the given value is false
, then returns true
if the target is not a virtual file.
testAttribute
in class AbstractSystemViewAdapter
IActionFilter
public boolean supportsDeferredQueries()
ISystemViewElementAdapter
supportsDeferredQueries
in interface ISystemViewElementAdapter
supportsDeferredQueries
in class AbstractSystemViewAdapter
protected SystemFetchOperation getSystemFetchOperation(Object o, IElementCollector collector)
AbstractSystemViewAdapter
getSystemFetchOperation
in class AbstractSystemViewAdapter
o
- collector
-
public boolean supportsUserDefinedActions(Object object)
false
if the file is a virtual file, otherwise defaults to asking the subsystem
factory.
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 |