RSE
Release 1.0

org.eclipse.rse.ui.actions
Class SystemNewConnectionAction

java.lang.Object
  extended byorg.eclipse.core.commands.common.EventManager
      extended byorg.eclipse.jface.action.AbstractAction
          extended byorg.eclipse.jface.action.Action
              extended byorg.eclipse.rse.ui.actions.SystemBaseAction
                  extended byorg.eclipse.rse.ui.actions.SystemBaseDialogAction
                      extended byorg.eclipse.rse.ui.actions.SystemBaseWizardAction
                          extended byorg.eclipse.rse.ui.actions.SystemNewConnectionAction
All Implemented Interfaces:
IAction, ISelectionChangedListener, ISystemAction, ISystemDialogAction, ISystemWizardAction
Direct Known Subclasses:
SystemNewConnectionFromExistingConnectionAction

public class SystemNewConnectionAction
extends SystemBaseWizardAction

The action that displays the New Connection wizard


Field Summary
 
Fields inherited from class org.eclipse.rse.ui.actions.SystemBaseDialogAction
cancelled, dlgHelpId, needsProgressMonitor, needsProgressMonitorSet, processAll, value
 
Fields inherited from class org.eclipse.rse.ui.actions.SystemBaseAction
allowOnMultipleSelection, arrowCursor, helpId, selectionSensitive, shell, sSelection, traceSelections, traceTarget, viewer, waitCursor
 
Fields inherited from interface org.eclipse.jface.action.IAction
AS_CHECK_BOX, AS_DROP_DOWN_MENU, AS_PUSH_BUTTON, AS_RADIO_BUTTON, AS_UNSPECIFIED, CHECKED, DESCRIPTION, ENABLED, HANDLED, IMAGE, RESULT, TEXT, TOOL_TIP_TEXT
 
Constructor Summary
SystemNewConnectionAction(Shell shell, boolean fromPopupMenu, boolean wantIcon, ISelectionProvider sp)
          Constructor for SystemNewConnectionAction when you don't want the icon.
SystemNewConnectionAction(Shell shell, boolean fromPopupMenu, ISelectionProvider sp)
          Constructor for SystemNewConnectionAction
SystemNewConnectionAction(Shell shell, String label, String tooltip, boolean fromPopupMenu, boolean wantIcon, ISelectionProvider sp)
          Constructor for SystemNewConnectionAction when you possibly don't want the icon, and want to supply your own label.
 
Method Summary
protected  IWizard createWizard()
          The default processing for the run method calls createDialog, which in turn calls this method to return an instance of our wizard.
 void restrictSystemType(String systemType)
          Call this to restrict the system type that the user is allowed to choose
 void restrictSystemTypes(String[] systemTypes)
          Call this to restrict the system types that the user is allowed to choose
 void setConnectionName(String name)
          Preset the connection name
 void setCurrentConnection(IHost conn)
          Set the current selected connection so we can better intelligently set the defaults.
 void setHostName(String name)
          Preset the host name
 boolean updateSelection(IStructuredSelection selection)
          Override of parent method so we can deduce currently selected connection (direct or indirect if child object selected).
 
Methods inherited from class org.eclipse.rse.ui.actions.SystemBaseWizardAction
createDialog, getDialogValue, getWizardPageTitle, postProcessWizard, setMinimumPageSize, setWizardImage, setWizardPageTitle, setWizardTitle, wasCancelled
 
Methods inherited from class org.eclipse.rse.ui.actions.SystemBaseDialogAction
getDialogHelpContextId, getNeedsProgressMonitor, getProcessAllSelections, getValue, run, setDialogHelp, setNeedsProgressMonitor, setProcessAllSelections, setValue, wasNeedsProgressMonitorSet
 
Methods inherited from class org.eclipse.rse.ui.actions.SystemBaseAction
allowOnMultipleSelection, checkObjectType, getAdapter, getContextMenuGroup, getCurrentTreeView, getFirstSelection, getHelpContextId, getNextSelection, getRemoteAdapter, getSelection, getSelectionProvider, getShell, getShell, getSystemConnection, getViewer, isDummy, isEnabled, isSelectionSensitive, issueTraceMessage, selectionChanged, setAvailableOffline, setBusyCursor, setContextMenuGroup, setDisplayCursor, setDisplayCursor, setHelp, setHost, setInputs, setSelection, setSelectionProvider, setSelectionSensitive, setShell, setTracing, setTracing, setViewer
 
Methods inherited from class org.eclipse.jface.action.Action
convertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isHandled, notifyResult, removeAcceleratorText, removeMnemonics, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText
 
Methods inherited from class org.eclipse.jface.action.AbstractAction
addPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListener
 
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.rse.ui.actions.ISystemDialogAction
getValue, setProcessAllSelections, setValue
 
Methods inherited from interface org.eclipse.rse.ui.actions.ISystemAction
allowOnMultipleSelection, getContextMenuGroup, getHelpContextId, getSelection, getShell, getViewer, isDummy, isSelectionSensitive, setContextMenuGroup, setHelp, setInputs, setSelection, setSelectionSensitive, setShell, setViewer
 
Methods inherited from interface org.eclipse.jface.action.IAction
addPropertyChangeListener, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, isHandled, removePropertyChangeListener, run, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText
 
Methods inherited from interface org.eclipse.jface.viewers.ISelectionChangedListener
selectionChanged
 

Constructor Detail

SystemNewConnectionAction

public SystemNewConnectionAction(Shell shell,
                                 boolean fromPopupMenu,
                                 ISelectionProvider sp)
Constructor for SystemNewConnectionAction

Parameters:
shell - The parent shell to host the new wizard
fromPopupMenu - true if being launched from the Remote System Explorer view directly, false if being launched from a dialog
sp - The selection provider that will supply the selection via getSelection, if fromPopupMenu is false

SystemNewConnectionAction

public SystemNewConnectionAction(Shell shell,
                                 boolean fromPopupMenu,
                                 boolean wantIcon,
                                 ISelectionProvider sp)
Constructor for SystemNewConnectionAction when you don't want the icon.

Parameters:
shell - The parent shell to host the new wizard
fromPopupMenu - true if being launched from the Remote System Explorer view directly, false if being launched from a dialog
wantIcon - true if you want the icon to show beside the action, false if not
sp - The selection provider that will supply the selection via getSelection, if fromPopupMenu is false

SystemNewConnectionAction

public SystemNewConnectionAction(Shell shell,
                                 String label,
                                 String tooltip,
                                 boolean fromPopupMenu,
                                 boolean wantIcon,
                                 ISelectionProvider sp)
Constructor for SystemNewConnectionAction when you possibly don't want the icon, and want to supply your own label. This is the "full" flavoured constructor!

Parameters:
shell - The parent shell to host the new wizard
label - The label for the action
tooltip - the tooltip for the action
fromPopupMenu - true if being launched from the Remote System Explorer view directly, false if being launched from a dialog
wantIcon - true if you want the icon to show beside the action, false if not
sp - The selection provider that will supply the selection via getSelection, if fromPopupMenu is false
Method Detail

createWizard

protected IWizard createWizard()
The default processing for the run method calls createDialog, which in turn calls this method to return an instance of our wizard.

Our default implementation is to return SystemNewConnectionWizard.

Specified by:
createWizard in class SystemBaseWizardAction

setCurrentConnection

public void setCurrentConnection(IHost conn)
Set the current selected connection so we can better intelligently set the defaults.


restrictSystemType

public void restrictSystemType(String systemType)
Call this to restrict the system type that the user is allowed to choose


restrictSystemTypes

public void restrictSystemTypes(String[] systemTypes)
Call this to restrict the system types that the user is allowed to choose


setConnectionName

public void setConnectionName(String name)
Preset the connection name


setHostName

public void setHostName(String name)
Preset the host name


updateSelection

public boolean updateSelection(IStructuredSelection selection)
Override of parent method so we can deduce currently selected connection (direct or indirect if child object selected).

Overrides:
updateSelection in class SystemBaseAction

RSE
Release 1.0

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