Class MoveElementsOperation

All Implemented Interfaces:
SuffixConstants, org.eclipse.core.resources.IWorkspaceRunnable, org.eclipse.core.runtime.ICoreRunnable, org.eclipse.core.runtime.IProgressMonitor
Direct Known Subclasses:
RenameElementsOperation

public class MoveElementsOperation extends CopyElementsOperation
This operation moves elements from their current container to a specified destination container, optionally renaming the elements. A move operation is equivalent to a copy operation, where the source elements are deleted after the copy.

This operation can be used for reorganizing elements within the same container.

See Also:
CopyElementsOperation
  • Constructor Details

    • MoveElementsOperation

      public MoveElementsOperation(IJavaElement[] elementsToMove, IJavaElement[] destContainers, boolean force)
      When executed, this operation will move the given elements to the given containers.
  • Method Details

    • getMainTaskName

      protected String getMainTaskName()
      Returns the String to use as the main task name for progress monitoring.
      Overrides:
      getMainTaskName in class CopyElementsOperation
    • isMove

      protected boolean isMove()
      Description copied from class: MultiOperation
      Returns true if this operation represents a move or rename, false if this operation represents a copy.
      Note: a rename is just a move within the same parent with a name change.
      Overrides:
      isMove in class MultiOperation
      See Also:
      MultiOperation.isMove()