Class MoveResourcesDescriptor

All Implemented Interfaces:

public final class MoveResourcesDescriptor extends RefactoringDescriptor
Refactoring descriptor for the move resource refactoring.

An instance of this refactoring descriptor may be obtained by calling RefactoringContribution.createDescriptor() on a refactoring contribution requested by invoking RefactoringCore.getRefactoringContribution(String) with the refactoring id (ID).

Note: this class is not intended to be subclassed or instantiated by clients.

This class is not intended to be instantiated by clients.
  • Field Details

    • ID

      public static final String ID
      Refactoring id of the 'Move Resources Resource' refactoring (value: org.eclipse.ltk.core.refactoring.move.resources).

      Clients may safely cast the obtained refactoring descriptor to MoveResourcesDescriptor.

      See Also:
  • Constructor Details

    • MoveResourcesDescriptor

      public MoveResourcesDescriptor()
      Creates a new refactoring descriptor.

      Clients should not instantiated this class but use RefactoringCore.getRefactoringContribution(String) with ID to get the contribution that can create the descriptor.

  • Method Details

    • setDestination

      public void setDestination(IContainer container)
      Sets the destination container to move the resources in.
      container - the destination
    • setDestinationPath

      public void setDestinationPath(IPath path)
      Sets the path of the destination container to move the resources in.
      path - the destination path
    • getDestinationPath

      public IPath getDestinationPath()
      Returns the destination container to move the resources in.
      the destination container to move the resource in
    • setResourcePathsToMove

      public void setResourcePathsToMove(IPath[] resourcePaths)
      Sets the paths of the resources to move. The resources must be of type IFile or IFolder.
      resourcePaths - the paths of the resource to move
    • setResourcesToMove

      public void setResourcesToMove(IResource[] resources)
      Sets the resources to move. The resources must be of type IFile or IFolder.
      resources - the resource to move
    • getResourcePathsToMove

      public IPath[] getResourcePathsToMove()
      Returns the resource to move.
      the resource to move
    • setUpdateReferences

      public void setUpdateReferences(boolean updateReferences)
      If set to true, move will also update references. The default is to update references.
      updateReferences - true if this move will update references
    • isUpdateReferences

      public boolean isUpdateReferences()
      Returns if move will also update references
      returns true if this move will update references
    • createRefactoring

      public Refactoring createRefactoring(RefactoringStatus status) throws CoreException
      Description copied from class: RefactoringDescriptor
      Creates the a new refactoring instance for this refactoring descriptor.

      The returned refactoring must be in an initialized state, i.e. ready to be executed via PerformRefactoringOperation.

      This method is not intended to be called directly from code that does not belong to this class and its subclasses. External code should call RefactoringDescriptor.createRefactoringContext(RefactoringStatus) and obtain the refactoring object from the refactoring context.

      Specified by:
      createRefactoring in class RefactoringDescriptor
      status - a refactoring status used to describe the outcome of the initialization
      the refactoring, or null if this refactoring descriptor represents the unknown refactoring, or if no refactoring contribution is available for this refactoring descriptor which is capable to create a refactoring
      CoreException - if an error occurs while creating the refactoring instance