|
org.eclipse.rse.ui.actions
Class SystemNewConnectionAction
java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.jface.action.AbstractAction
org.eclipse.jface.action.Action
org.eclipse.rse.ui.actions.SystemBaseAction
org.eclipse.rse.ui.actions.SystemBaseDialogAction
org.eclipse.rse.ui.actions.SystemBaseWizardAction
org.eclipse.rse.ui.actions.SystemNewConnectionAction
-
All Implemented Interfaces:
-
IAction,
ISelectionChangedListener,
ISystemAction,
ISystemDialogAction,
ISystemWizardAction
-
public class SystemNewConnectionAction
- extends
SystemBaseWizardAction
The action that displays the New Connection wizard
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. |
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. |
Methods inherited from class org.eclipse.rse.ui.actions.
SystemBaseAction
|
allowOnMultipleSelection,
checkObjectType,
getContextMenuGroup,
getCurrentTreeView,
getFirstSelection,
getHelpContextId,
getNextSelection,
getRemoteAdapter,
getSelection,
getSelectionProvider,
getShell,
getShell,
getSystemConnection,
getViewAdapter,
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 java.lang.
Object
|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
|
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
|
SystemNewConnectionAction
public SystemNewConnectionAction(
Shell shell,
boolean fromPopupMenu,
ISelectionProvider sp)
- Constructor.
-
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
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 RSEMainNewConnectionWizard .
-
-
Specified by:
-
createWizard
in class
SystemBaseWizardAction
-
doCreateWizardDialog
protected
WizardDialog doCreateWizardDialog(
Shell shell,
IWizard wizard)
-
Description copied from class:
SystemBaseWizardAction
- Creates the dialog instance. Called from
createDialog(...) .
Gives overrides the chance to plug-in their own specialized wizard dialog
implementations.
-
-
Overrides:
-
doCreateWizardDialog
in class
SystemBaseWizardAction
-
-
Parameters:
-
shell - The shell to create the dialog in. Must be not null . -
wizard - The wizard to create the wizard dialog for. Must be not null .
-
Returns:
- The wizard dialog instance. Must be never
null .
restrictSystemTypes
public void restrictSystemTypes(
IRSESystemType[] systemTypes)
- Call this to restrict the system types that the user is allowed to choose
-
postProcessWizard
protected void postProcessWizard(
IWizard wizard)
-
Description copied from class:
SystemBaseWizardAction
- Typically, the wizard's performFinish method does the work required by
a successful finish of the wizard. However, often we also want to be
able to extract user-entered data from the wizard, by calling getters
in this action. To enable this, override this method to populate your
output instance variables from the completed wizard, which is passed
as a parameter. This is only called after successful completion of the
wizard.
-
-
Overrides:
-
postProcessWizard
in class
SystemBaseWizardAction
-
getDialogValue
protected
Object getDialogValue(
Dialog dlg)
-
Description copied from class:
SystemBaseWizardAction
- By default, we try to get the wizard's value by calling getOutputObject()
-
-
Overrides:
-
getDialogValue
in class
SystemBaseWizardAction
-
-
Parameters:
-
dlg - The dialog object, after it has returned from open.
updateSelection
public boolean updateSelection(
IStructuredSelection selection)
-
Description copied from class:
SystemBaseAction
- First opportunity to decide if the action should be enabled or not based on the
current selection. Called by default implementation of selectionChanged, which
converts the ISelection to an IStructuredSelection, which is all we support. The
return result is used to enable or disable this action.
The default implementation of this method:
- Returns false if calling checkObjectType on any object in the selection list returns false.
- Returns true otherwise.
If desired, override this method for a different algorithm to decide enablement.
-
-
Overrides:
-
updateSelection
in class
SystemBaseAction
-
Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.
|
|