Class DeleteResourcesDescriptor

    • Field Detail

      • ID

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

        Clients may safely cast the obtained refactoring descriptor to DeleteResourcesDescriptor.

        See Also:
        Constant Field Values
    • Constructor Detail

      • DeleteResourcesDescriptor

        public DeleteResourcesDescriptor()
        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 Detail

      • getResourcePaths

        public IPath[] getResourcePaths()
        The resource paths to delete.
        Returns:
        an array of IPaths.
      • setResourcePaths

        public void setResourcePaths​(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
      • setResources

        public void setResources​(IResource[] resources)
        The resources to be deleted. They can be IProject or a mixture of IFile and IFolder.
        Parameters:
        resources - IResources to be deleted
      • isDeleteContents

        public boolean isDeleteContents()
        true is returned if projects contents are also deleted.
        Returns:
        true if this will delete the project contents. The content delete is not undoable.
      • setDeleteContents

        public void setDeleteContents​(boolean deleteContents)
        If set to true, delete will also delete project contents.
        Parameters:
        deleteContents - true if this will delete the project contents. The content delete is not undoable.
      • 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