public class DeleteResourcesDescriptor extends RefactoringDescriptor
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.
Modifier and Type | Field and Description |
---|---|
static String |
ID
Refactoring id of the 'Delete Resources' refactoring (value:
org.eclipse.ltk.core.refactoring.delete.resources ). |
BREAKING_CHANGE, ID_UNKNOWN, MULTI_CHANGE, NONE, STRUCTURAL_CHANGE, USER_CHANGE
Constructor and Description |
---|
DeleteResourcesDescriptor()
Creates a new refactoring descriptor.
|
Modifier and Type | Method and Description |
---|---|
Refactoring |
createRefactoring(RefactoringStatus status)
Creates the a new refactoring instance for this refactoring descriptor.
|
IPath[] |
getResourcePaths()
The resource paths to delete.
|
boolean |
isDeleteContents()
true is returned if projects contents are also deleted. |
void |
setDeleteContents(boolean deleteContents)
If set to
true , delete will also delete project contents. |
void |
setResourcePaths(IPath[] resourcePath)
The paths to the resources to be deleted.
|
void |
setResources(IResource[] resources)
The resources to be deleted.
|
compareTo, createRefactoringContext, equals, getComment, getDescription, getFlags, getID, getProject, getTimeStamp, hashCode, setComment, setDescription, setFlags, setProject, setTimeStamp, toString
public static final String ID
org.eclipse.ltk.core.refactoring.delete.resources
).
Clients may safely cast the obtained refactoring descriptor to
DeleteResourcesDescriptor
.
public DeleteResourcesDescriptor()
Clients should not instantiated this class but use RefactoringCore.getRefactoringContribution(String)
with ID
to get the contribution that can create the descriptor.
public IPath[] getResourcePaths()
public void setResourcePaths(IPath[] resourcePath)
IProject
or
a mixture of IFile
and IFolder
.resourcePath
- paths of the resources to be deletedpublic void setResources(IResource[] resources)
resources
- IResources to be deletedpublic boolean isDeleteContents()
true
is returned if projects contents are also deleted.true
if this will delete the project contents. The content delete is not undoable.public void setDeleteContents(boolean deleteContents)
true
, delete will also delete project contents.deleteContents
- true
if this will delete the project contents. The content delete is not undoable.public Refactoring createRefactoring(RefactoringStatus status) throws CoreException
RefactoringDescriptor
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.
createRefactoring
in class RefactoringDescriptor
status
- a refactoring status used to describe the outcome of the initializationnull
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 refactoringCoreException
- if an error occurs while creating the refactoring instance
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.