Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.rse.ui.actions.popupmenu
Class SystemAbstractRemoteFilePopupMenuAction

java.lang.Object
  extended by com.ibm.etools.iseries.rse.ui.actions.popupmenu.SystemAbstractPopupMenuAction
      extended by com.ibm.etools.iseries.rse.ui.actions.popupmenu.SystemAbstractRemoteFilePopupMenuAction
Direct Known Subclasses:
ISeriesAbstractIFSPopupMenuAction

public abstract class SystemAbstractRemoteFilePopupMenuAction
extends SystemAbstractPopupMenuAction

This is a base class to simplify the creation of actions supplied via the com.ibm.etools.systems.core.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:
com.ibm.etools.systems.core.ui.view.ISystemRemoteElementAdapter, com.ibm.etools.systems.core.ui.dialogs.SystemPromptDialog

Field Summary
static String copyright
           
 
Fields inherited from class com.ibm.etools.iseries.rse.ui.actions.popupmenu.SystemAbstractPopupMenuAction
proxyAction, sel, shell, viewPart
 
Constructor Summary
SystemAbstractRemoteFilePopupMenuAction()
          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.
 RemoteFileSubSystem getRemoteFileSubSystem()
          Get the remote file subsystem from which the selected 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 com.ibm.etools.iseries.rse.ui.actions.popupmenu.SystemAbstractPopupMenuAction
getActivePart, getCommandSubSystem, getFirstSelectedRemoteObject, getFirstSelectedRemoteObjectAdapter, getProxyAction, getRemoteAdapter, getRemoteObjectName, getRemoteObjectSubSubType, getRemoteObjectSubSystemFactoryId, getRemoteObjectSubType, getRemoteObjectType, getRemoteObjectTypeCategory, getSelectedRemoteObjectAdapters, getSelectedRemoteObjects, getSelection, getSelectionCount, getShell, getSubSystem, getSubSystemConfiguration, getSystemConnection, getWorkingDirectory, printTest, run, runCommand, selectionChanged, setActivePart, setChecked, setEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values
Constructor Detail

SystemAbstractRemoteFilePopupMenuAction

public SystemAbstractRemoteFilePopupMenuAction()
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 SystemAbstractPopupMenuAction

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 SystemAbstractPopupMenuAction

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 RemoteFileSubSystem 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.


Rational Developer for Power Systems Software
V7.6

Copyright 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.