Class CopyResourcesDescriptor

java.lang.Object
org.eclipse.ltk.core.refactoring.RefactoringDescriptor
org.eclipse.ltk.core.refactoring.resource.CopyResourcesDescriptor
All Implemented Interfaces:
Comparable<RefactoringDescriptor>

public final class CopyResourcesDescriptor extends RefactoringDescriptor
Refactoring descriptor for the copy 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.

Since:
3.16
Restriction:
This class is not intended to be instantiated by clients.
  • Field Details

    • ID

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

      Clients may safely cast the obtained refactoring descriptor to CopyResourcesDescriptor.

      See Also:
  • Constructor Details

    • CopyResourcesDescriptor

      public CopyResourcesDescriptor()
      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

    • getResourcePaths

      public IPath[] getResourcePaths()
    • getDestinationPaths

      public IPath[] getDestinationPaths()
    • 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
      Parameters:
      status - a refactoring status used to describe the outcome of the initialization
      Returns:
      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
      Throws:
      CoreException - if an error occurs while creating the refactoring instance
    • setResourcePaths

      public void setResourcePaths(IPath[] resourcePaths)
    • setResources

      public void setResources(IResource[] resources)
    • setDestinationPaths

      public void setDestinationPaths(IPath[] destinationPaths)