RSE
Release 1.0

org.eclipse.rse.files.ui.actions
Class SystemAbstractRemoteFilePopupMenuExtensionAction

java.lang.Object
  extended byorg.eclipse.rse.ui.actions.SystemAbstractPopupMenuExtensionAction
      extended byorg.eclipse.rse.files.ui.actions.SystemAbstractRemoteFilePopupMenuExtensionAction
All Implemented Interfaces:
IActionDelegate, IObjectActionDelegate

public abstract class SystemAbstractRemoteFilePopupMenuExtensionAction
extends SystemAbstractPopupMenuExtensionAction
implements IObjectActionDelegate

This is a base class to simplify the creation of actions supplied via the org.eclipse.rse.ui.popupMenus extension point, targeting remote files and/or remote folders.

The only method you must implement is run(). You may optionally override getEnabled(Object[])

Convenience methods available in this class:

See also the convenience methods available in the parent class SystemAbstractPopupMenuExtensionAction

See Also:
ISystemRemoteElementAdapter, SystemPromptDialog

Field Summary
 
Fields inherited from class org.eclipse.rse.ui.actions.SystemAbstractPopupMenuExtensionAction
EMPTY_ARRAY, proxyAction, sel, shell, viewPart
 
Constructor Summary
SystemAbstractRemoteFilePopupMenuExtensionAction()
          Constructor
 
Method Summary
 boolean getEnabled(Object[] currentlySelected)
          The user has selected one or more objects.
 IRemoteFile getFirstSelectedRemoteFile()
          Retrieve the first selected object, as an IRemoteFile, for convenience.
 IRemoteFileSubSystem getRemoteFileSubSystem()
          Get the remote file subsystem from which the selected objects were resolved.
 IRemoteFileSubSystemConfiguration getRemoteFileSubSystemConfiguration()
          Returns the remote file subsystem factory which owns the subsystem from which the selected remote objects were resolved.
 IRemoteFile[] getSelectedRemoteFiles()
          Retrieve the currently selected objects as an array of IRemoteFile objects.
abstract  void run()
          The user has selected this action.
 
Methods inherited from class org.eclipse.rse.ui.actions.SystemAbstractPopupMenuExtensionAction
getActivePart, getFirstSelectedRemoteObject, getFirstSelectedRemoteObjectAdapter, getProxyAction, getRemoteAdapter, getRemoteObjectName, getRemoteObjectSubSubType, getRemoteObjectSubSystemConfigurationId, getRemoteObjectSubType, getRemoteObjectType, getRemoteObjectTypeCategory, getSelectedRemoteObjectAdapters, getSelectedRemoteObjects, getSelection, getSelectionCount, getShell, getSubSystem, getSubSystemConfiguration, getSystemConnection, printTest, run, selectionChanged, setActivePart, setChecked, setEnabled
 
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.IObjectActionDelegate
setActivePart
 
Methods inherited from interface org.eclipse.ui.IActionDelegate
run, selectionChanged
 

Constructor Detail

SystemAbstractRemoteFilePopupMenuExtensionAction

public SystemAbstractRemoteFilePopupMenuExtensionAction()
Constructor

Method Detail

run

public abstract void run()
The user has selected this action. This is where the actual code for the action goes.

Specified by:
run in class SystemAbstractPopupMenuExtensionAction

getEnabled

public boolean getEnabled(Object[] currentlySelected)
The user has selected one or more objects. This is an opportunity to enable/disable this action based on the current selection.

The default implementation of this method returns false if all the objects are not of type IRemoteFile.

Overrides:
getEnabled in class SystemAbstractPopupMenuExtensionAction

getSelectedRemoteFiles

public IRemoteFile[] getSelectedRemoteFiles()
Retrieve the currently selected objects as an array of IRemoteFile objects. Array may be length 0, but will never be null, for convenience.


getFirstSelectedRemoteFile

public IRemoteFile getFirstSelectedRemoteFile()
Retrieve the first selected object, as an IRemoteFile, for convenience. Will be null if there is nothing selected


getRemoteFileSubSystem

public IRemoteFileSubSystem getRemoteFileSubSystem()
Get the remote file subsystem from which the selected objects were resolved. This has many useful methods in it, including support to transfer files to and from the local and remote systems.


getRemoteFileSubSystemConfiguration

public IRemoteFileSubSystemConfiguration getRemoteFileSubSystemConfiguration()
Returns the remote file subsystem factory which owns the subsystem from which the selected remote objects were resolved. This has some useful methods in it, including isUnixStyle() indicating if this remote file system is unix or windows.


RSE
Release 1.0

Copyright (c) IBM Corporation and others 2000, 2006. All Rights Reserved.