Class CopyProjectDescriptor

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

public class CopyProjectDescriptor extends RefactoringDescriptor
Refactoring descriptor for the copy project 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.15
Restriction:
This class is not intended to be subclassed by clients.
Restriction:
This class is not intended to be instantiated by clients.
  • Field Details

    • ID

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

      Clients may safely cast the obtained refactoring descriptor to CopyProjectDescriptor.

      See Also:
  • Constructor Details

  • Method Details

    • getSourcePath

      public IPath getSourcePath()
      The resource paths to delete.
      Returns:
      an array of IPaths.
    • getNewName

      public String getNewName()
    • getNewLocation

      public IPath getNewLocation()
    • setResourcePath

      public void setResourcePath(IPath resourcePath)
      The paths to the resources to be deleted. The resources can be IProject or a mixture of IFile and IFolder.
      Parameters:
      resourcePath - paths of the resources to be deleted
    • setProjectToCopy

      public void setProjectToCopy(IProject project)
      The project to be copied.
      Parameters:
      project - IProject to be copied
    • 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
    • setNewName

      public void setNewName(String newName)
    • setNewLocation

      public void setNewLocation(IPath newLocation)