Remote Systems
v6.4.1

com.ibm.etools.systems.files.ui.actions
Class SystemCommandAction

java.lang.Object
  extended byAction
      extended bycom.ibm.etools.systems.core.ui.actions.SystemBaseAction
          extended bycom.ibm.etools.systems.files.ui.actions.SystemCommandAction
All Implemented Interfaces:
ISystemAction

public class SystemCommandAction
extends SystemBaseAction

Launches a shell and/or runs a shell command, displaying the output in the Remote Systems Commands view.

See Also:
Serialized Form

Nested Class Summary
 class SystemCommandAction.CommandDialog
          The command dialog used when running a command.
 
Field Summary
static String Copyright
           
 
Fields inherited from class com.ibm.etools.systems.core.ui.actions.SystemBaseAction
allowOnMultipleSelection, arrowCursor, copyright, helpId, selectionSensitive, shell, sSelection, traceSelections, traceTarget, viewer, waitCursor
 
Constructor Summary
SystemCommandAction(Shell parent)
          Constructor for SystemCommandAction
SystemCommandAction(Shell parent, boolean isShell)
          Constructor for SystemCommandAction
SystemCommandAction(Shell parent, boolean isShell, RemoteCmdSubSystem cmdSubSystem)
          Constructor for SystemCommandAction
SystemCommandAction(String title, Shell parent, boolean isShell, RemoteCmdSubSystem cmdSubSystem)
          Constructor for SystemCommandAction
SystemCommandAction(String title, String tooltip, ImageDescriptor descriptor, Shell parent, boolean isShell, RemoteCmdSubSystem cmdSubSystem)
          Constructor for SystemCommandAction
SystemCommandAction(String title, String tooltip, Shell parent, boolean isShell, RemoteCmdSubSystem cmdSubSystem)
          Constructor for SystemCommandAction
 
Method Summary
 void run()
          Runs the command action.
 boolean updateSelection(IStructuredSelection selection)
          Called when the selection changes in the systems view.
 
Methods inherited from class com.ibm.etools.systems.core.ui.actions.SystemBaseAction
allowOnMultipleSelection, checkObjectType, getAdapter, getContextMenuGroup, getCurrentTreeView, getDescription, getFirstSelection, getHelpContextId, getLabel, getNextSelection, getRemoteAdapter, getSelection, getSelectionProvider, getShell, getShell, getString, getStringOrNull, getSystemConnection, getToolTip, getViewer, isDummy, isEnabled, isSelectionSensitive, issueTraceMessage, selectionChanged, setAvailableOffline, setBusyCursor, setContextMenuGroup, setDisplayCursor, setDisplayCursor, setHelp, setInputs, setSelection, setSelectionProvider, setSelectionSensitive, setShell, setSystemConnection, setTracing, setTracing, setViewer
 
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

SystemCommandAction

public SystemCommandAction(Shell parent)
Constructor for SystemCommandAction

Parameters:
parent -

SystemCommandAction

public SystemCommandAction(Shell parent,
                           boolean isShell)
Constructor for SystemCommandAction

Parameters:
parent -
isShell - indication of whether this action launches a shell or runs a command

SystemCommandAction

public SystemCommandAction(Shell parent,
                           boolean isShell,
                           RemoteCmdSubSystem cmdSubSystem)
Constructor for SystemCommandAction

Parameters:
parent -
isShell - indication of whether this action launches a shell or runs a command
cmdSubSystem - the command subsystem to use if launching a shell

SystemCommandAction

public SystemCommandAction(String title,
                           Shell parent,
                           boolean isShell,
                           RemoteCmdSubSystem cmdSubSystem)
Constructor for SystemCommandAction

Parameters:
title - the title of the action
parent -
isShell - indication of whether this action launches a shell or runs a command
cmdSubSystem - the command subsystem to use if launching a shell

SystemCommandAction

public SystemCommandAction(String title,
                           String tooltip,
                           Shell parent,
                           boolean isShell,
                           RemoteCmdSubSystem cmdSubSystem)
Constructor for SystemCommandAction

Parameters:
title - the title of the action
tooltip - the tooltip for the action
parent -
isShell - indication of whether this action launches a shell or runs a command
cmdSubSystem - the command subsystem to use if launching a shell

SystemCommandAction

public SystemCommandAction(String title,
                           String tooltip,
                           ImageDescriptor descriptor,
                           Shell parent,
                           boolean isShell,
                           RemoteCmdSubSystem cmdSubSystem)
Constructor for SystemCommandAction

Parameters:
title - the title of the action
tooltip - the tooltip for the action
descriptor - the image descriptor for the action
parent -
isShell - indication of whether this action launches a shell or runs a command
cmdSubSystem - the command subsystem to use if launching a shell
Method Detail

run

public void run()
Runs the command action. If the action is for launching a shell, the shell is launched and the commands view shows it's output. If the action is for running a command, a dialog pops up prompting for the invocation.

Overrides:
run in class SystemBaseAction
See Also:
Action#run()

updateSelection

public boolean updateSelection(IStructuredSelection selection)
Called when the selection changes in the systems view. This determines the input object for the command and whether to enable or disable the action.

Overrides:
updateSelection in class SystemBaseAction
Parameters:
selection - the current seleciton
Returns:
whether to enable or disable the action

Remote Systems
v6.4.1

Copyright © 2005 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.