RSE
Release 1.0

org.eclipse.rse.files.ui.actions
Class SystemAddToArchiveAction

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.files.ui.actions.SystemAddToArchiveAction
All Implemented Interfaces:
IAction, ISelectionChangedListener, ISystemAction

public class SystemAddToArchiveAction
extends SystemBaseAction


Nested Class Summary
protected  class SystemAddToArchiveAction.CopyRunnable
           
 
Field Summary
protected  Shell _parent
           
protected  List _selected
           
 
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
SystemAddToArchiveAction(Shell parent)
           
SystemAddToArchiveAction(Shell parent, String label, String tooltip)
           
 
Method Summary
 void addToArchive(IRemoteFile source, IRemoteFile destinationArchive, boolean saveFullPathInfo, String relativeTo)
           
protected  boolean destinationInSource(IRemoteFile destination)
           
protected  String getLowestCommonPath(String str1, String str2, boolean caseSensitive)
           
protected  String[] getRelativePaths()
           
protected  String[] getRelativePaths(String lcp, char separator)
           
protected  IRunnableContext getRunnableContext(Shell shell)
           
protected  boolean isAncestorOf(IRemoteFile ancestor, IRemoteFile descendant)
           
 void run()
          This is the method called when the user selects this action.
 boolean updateSelection(IStructuredSelection selection)
          Called when the selection changes in the systems view.
 
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.jface.action.IAction
addPropertyChangeListener, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isHandled, removePropertyChangeListener, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText
 

Field Detail

_selected

protected List _selected

_parent

protected Shell _parent
Constructor Detail

SystemAddToArchiveAction

public SystemAddToArchiveAction(Shell parent)

SystemAddToArchiveAction

public SystemAddToArchiveAction(Shell parent,
                                String label,
                                String tooltip)
Method Detail

run

public void run()
Description copied from class: SystemBaseAction
This is the method called when the user selects this action. Child classes need to override this. If you need the parent shell, call getShell. If you need to know the current selection, call getSelection(), or getFirstSelection() followed by getNextSelection() until null is returned.

Specified by:
run in interface IAction
Overrides:
run in class SystemBaseAction
See Also:
Action.run()

addToArchive

public void addToArchive(IRemoteFile source,
                         IRemoteFile destinationArchive,
                         boolean saveFullPathInfo,
                         String relativeTo)

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

getRunnableContext

protected IRunnableContext getRunnableContext(Shell shell)

destinationInSource

protected boolean destinationInSource(IRemoteFile destination)

isAncestorOf

protected boolean isAncestorOf(IRemoteFile ancestor,
                               IRemoteFile descendant)

getRelativePaths

protected String[] getRelativePaths()

getRelativePaths

protected String[] getRelativePaths(String lcp,
                                    char separator)

getLowestCommonPath

protected String getLowestCommonPath(String str1,
                                     String str2,
                                     boolean caseSensitive)

RSE
Release 1.0

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