Class MoveResourceAction

All Implemented Interfaces:
IAction, ISelectionChangedListener, ISelectionValidator

public class MoveResourceAction extends CopyResourceAction
Standard action for moving the currently selected resources elsewhere in the workspace. All resources being moved as a group must be siblings.

This class may be instantiated; it is not intended to be subclassed.

Restriction:
This class is not intended to be subclassed by clients.
  • Field Details

    • ID

      public static final String ID
      The id of this action.
      See Also:
    • destinations

      protected List<IPath> destinations
      Keep a list of destinations so that any required update can be done after the move.
  • Constructor Details

    • MoveResourceAction

      @Deprecated public MoveResourceAction(Shell shell)
      Creates a new action.
      Parameters:
      shell - the shell for any dialogs
    • MoveResourceAction

      public MoveResourceAction(IShellProvider provider)
      Creates a new action.
      Parameters:
      provider - the shell for any dialogs.
      Since:
      3.4
  • Method Details

    • createOperation

      protected CopyFilesAndFoldersOperation createOperation()
      Description copied from class: CopyResourceAction
      Returns the operation to perform when this action runs.
      Overrides:
      createOperation in class CopyResourceAction
      Returns:
      the operation to perform when this action runs.
    • getDestinations

      protected List getDestinations()
      Returns the destination resources for the resources that have been moved so far.
      Returns:
      list of destination IResources
    • getResources

      protected IResource[] getResources(List<? extends IResource> resourceList)
      Description copied from class: CopyResourceAction
      Returns an array of resources to use for the operation from the provided list.
      Overrides:
      getResources in class CopyResourceAction
      Parameters:
      resourceList - The list of resources to converted into an array.
      Returns:
      an array of resources to use for the operation
    • runOperation

      protected void runOperation(IResource[] resources, IContainer destination)
      Description copied from class: CopyResourceAction
      Runs the operation created in createOperation
      Overrides:
      runOperation in class CopyResourceAction
      Parameters:
      resources - source resources to pass to the operation
      destination - destination container to pass to the operation
    • run

      public void run()
      Description copied from class: Action
      The default implementation of this IAction method does nothing. Subclasses should override this method if they do not need information from the triggering event, or override runWithEvent(Event) if they do.
      Specified by:
      run in interface IAction
      Overrides:
      run in class CopyResourceAction
      See Also: