RSE
Release 1.0

org.eclipse.rse.ui.filters.actions
Class SystemFilterCopyFilterPoolAction

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.SystemBaseCopyAction
                          extended byorg.eclipse.rse.ui.filters.actions.SystemFilterCopyFilterPoolAction
All Implemented Interfaces:
IAction, IRunnableWithProgress, ISelectionChangedListener, ISystemAction, ISystemCopyTargetSelectionCallback, ISystemDialogAction

public class SystemFilterCopyFilterPoolAction
extends SystemBaseCopyAction

Copy a filter pool action.


Field Summary
 
Fields inherited from class org.eclipse.rse.ui.actions.SystemBaseCopyAction
copiedOk, mgr, mode, MODE_COPY, MODE_MOVE, newNames, oldNames, oldObjects, runCount, runException, sr, targetContainer
 
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
SystemFilterCopyFilterPoolAction(Shell parent)
          Constructor
 
Method Summary
protected  String checkForCollision(Shell shell, IProgressMonitor monitor, Object targetContainer, Object oldObject, String oldName)
           
protected  boolean doCopy(IProgressMonitor monitor, Object targetContainer, Object oldObject, String newName)
          DO THE ACTUAL COPY OR MOVE.
 SystemMessage getCompletionMessage(Object targetContainer, String[] oldNames, String[] newNames)
          Return complete message
protected  SystemMessage getCopyingMessage()
          Get the generic "Copying..." or "Moving..." message
protected  SystemMessage getCopyingMessage(String oldName)
          Get the specific "Copying %1..." or "Moving %1..." message
protected  ISystemFilterPool getFirstSelectedFilterPool()
          Get the first selected filter pool
protected  String[] getOldNames()
           
protected  Object[] getOldObjects()
           
protected  SystemSimpleContentElement getPoolMgrTreeModel(ISystemFilterPoolManagerProvider poolMgrProvider, ISystemFilterPoolManager poolMgr)
          Create and return data model to populate selection tree with.
protected  String getPromptString()
          Get the verbage prompt to show on line one of the copy dialog
protected  ISystemFilterPool[] getSelectedFilterPools()
          Get the currently selected filter pools
protected  SystemSimpleContentElement getTreeInitialSelection()
           
protected  SystemSimpleContentElement getTreeModel()
           
 boolean isValidTargetParent(SystemSimpleContentElement selectedElement)
          This method is a callback from the select-target-parent dialog, allowing us to decide whether the current selected object is a valid parent object.
protected  void reset()
          Reset.
 void setHelpContextId(String id)
          Set the help context Id (infoPop) for this action.
 void setPromptString(String promptString)
          Set the prompt string that shows up at the top of the copy-destination dialog.
 boolean updateSelection(IStructuredSelection selection)
          We override from parent to do unique checking...
 
Methods inherited from class org.eclipse.rse.ui.actions.SystemBaseCopyAction
copyComplete, createDialog, getDialogValue, getRunnableContext, getTargetContainer, preCheckForCollision, preCheckForCollision, run, showOperationCancelledMessage, showOperationErrorMessage, showOperationErrorMessage, showOperationMessage
 
Methods inherited from class org.eclipse.rse.ui.actions.SystemBaseDialogAction
getDialogHelpContextId, getNeedsProgressMonitor, getProcessAllSelections, getValue, run, setDialogHelp, setNeedsProgressMonitor, setProcessAllSelections, setValue, wasCancelled, 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.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, 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

SystemFilterCopyFilterPoolAction

public SystemFilterCopyFilterPoolAction(Shell parent)
Constructor

Method Detail

reset

protected void reset()
Reset. This is a re-run of this action

Overrides:
reset in class SystemBaseCopyAction

setHelpContextId

public void setHelpContextId(String id)
Set the help context Id (infoPop) for this action. This must be fully qualified by plugin ID.

Same as #setHelp(String)

See Also:
#getHelpContextId()

updateSelection

public boolean updateSelection(IStructuredSelection selection)
We override from parent to do unique checking...

Overrides:
updateSelection in class SystemBaseAction
See Also:
SystemBaseAction#updateSelection(IStructuredSelection)

isValidTargetParent

public boolean isValidTargetParent(SystemSimpleContentElement selectedElement)
This method is a callback from the select-target-parent dialog, allowing us to decide whether the current selected object is a valid parent object. This affects the enabling of the OK button on that dialog.

Specified by:
isValidTargetParent in interface ISystemCopyTargetSelectionCallback
Overrides:
isValidTargetParent in class SystemBaseCopyAction

checkForCollision

protected String checkForCollision(Shell shell,
                                   IProgressMonitor monitor,
                                   Object targetContainer,
                                   Object oldObject,
                                   String oldName)
Specified by:
checkForCollision in class SystemBaseCopyAction
See Also:
SystemBaseCopyAction.checkForCollision(Shell, IProgressMonitor, Object, Object, String)

doCopy

protected boolean doCopy(IProgressMonitor monitor,
                         Object targetContainer,
                         Object oldObject,
                         String newName)
                  throws Exception
Description copied from class: SystemBaseCopyAction
DO THE ACTUAL COPY OR MOVE. THIS MUST BE IMPLEMENTED BY CHILD CLASSES

Specified by:
doCopy in class SystemBaseCopyAction
Throws:
Exception
See Also:
SystemBaseCopyAction.doCopy(IProgressMonitor, Object, Object, String)

getTreeModel

protected SystemSimpleContentElement getTreeModel()
Specified by:
getTreeModel in class SystemBaseCopyAction
See Also:
SystemBaseCopyAction.getTreeModel()

getTreeInitialSelection

protected SystemSimpleContentElement getTreeInitialSelection()
Specified by:
getTreeInitialSelection in class SystemBaseCopyAction
See Also:
SystemBaseCopyAction.getTreeInitialSelection()

setPromptString

public void setPromptString(String promptString)
Set the prompt string that shows up at the top of the copy-destination dialog.


getPromptString

protected String getPromptString()
Description copied from class: SystemBaseCopyAction
Get the verbage prompt to show on line one of the copy dialog

Overrides:
getPromptString in class SystemBaseCopyAction
See Also:
SystemBaseCopyAction.getPromptString()

getCopyingMessage

protected SystemMessage getCopyingMessage()
Description copied from class: SystemBaseCopyAction
Get the generic "Copying..." or "Moving..." message

Overrides:
getCopyingMessage in class SystemBaseCopyAction
See Also:
SystemBaseCopyAction.getCopyingMessage()

getCopyingMessage

protected SystemMessage getCopyingMessage(String oldName)
Description copied from class: SystemBaseCopyAction
Get the specific "Copying %1..." or "Moving %1..." message

Overrides:
getCopyingMessage in class SystemBaseCopyAction
See Also:
SystemBaseCopyAction.getCopyingMessage(String)

getCompletionMessage

public SystemMessage getCompletionMessage(Object targetContainer,
                                          String[] oldNames,
                                          String[] newNames)
Return complete message

Overrides:
getCompletionMessage in class SystemBaseCopyAction

getOldObjects

protected Object[] getOldObjects()
Specified by:
getOldObjects in class SystemBaseCopyAction
See Also:
SystemBaseCopyAction.getOldObjects()

getOldNames

protected String[] getOldNames()
Specified by:
getOldNames in class SystemBaseCopyAction
See Also:
SystemBaseCopyAction.getOldNames()

getSelectedFilterPools

protected ISystemFilterPool[] getSelectedFilterPools()
Get the currently selected filter pools


getFirstSelectedFilterPool

protected ISystemFilterPool getFirstSelectedFilterPool()
Get the first selected filter pool


getPoolMgrTreeModel

protected SystemSimpleContentElement getPoolMgrTreeModel(ISystemFilterPoolManagerProvider poolMgrProvider,
                                                         ISystemFilterPoolManager poolMgr)
Create and return data model to populate selection tree with.

Parameters:
poolMgrProvider - The provider who will give us the list of filter pool managers to populate the list with
poolMgr - The SystemFilterPoolManager whose tree model element is to be pre-selected

RSE
Release 1.0

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