public final class MoveDescriptor extends JavaScriptRefactoringDescriptor
An instance of this refactoring descriptor may be obtained by calling
org.eclipse.ltk.core.refactoring.RefactoringContribution#createDescriptor()
on a refactoring
contribution requested by invoking
org.eclipse.ltk.core.refactoring.RefactoringCore#getRefactoringContribution(String)
with the
appropriate refactoring id.
Note: this class is not intended to be instantiated by clients.
Provisional API: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.ATTRIBUTE_ELEMENT, ATTRIBUTE_INPUT, ATTRIBUTE_NAME, ATTRIBUTE_REFERENCES, ATTRIBUTE_SELECTION, ATTRIBUTE_VERSION, fArguments, JAR_MIGRATION, JAR_REFACTORING, JAR_SOURCE_ATTACHMENT, VALUE_VERSION_1_0
Constructor and Description |
---|
MoveDescriptor()
Creates a new refactoring descriptor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
populateArgumentMap()
Populates the refactoring descriptor argument map based on the specified
arguments.
|
void |
setDestination(IJavaScriptElement element)
Sets the destination of the move.
|
void |
setDestination(IResource resource)
Sets the destination of the move.
|
void |
setFileNamePatterns(java.lang.String patterns)
Sets the file name patterns to use during qualified name updating.
|
void |
setMoveMembers(IMember[] members)
Sets the members to move.
|
void |
setMovePackageFragmentRoots(IPackageFragmentRoot[] roots)
Sets the package fragment roots to move.
|
void |
setMovePackages(IPackageFragment[] fragments)
Sets the package fragments to move.
|
void |
setMoveResources(IFile[] files,
IFolder[] folders,
IJavaScriptUnit[] units)
Sets the resources and compilation units to move.
|
void |
setUpdateQualifiedNames(boolean update)
Determines whether qualified names of the Java element should be renamed.
|
void |
setUpdateReferences(boolean update)
Determines whether references to the Java element should be renamed.
|
RefactoringStatus |
validateDescriptor()
Validates the refactoring descriptor with respect to the constraints
imposed by the represented refactoring.
|
createRefactoring, elementToHandle, getArguments, handleToElement, handleToElement, handleToElement, handleToResource, resourceToHandle, setComment, setDescription, setFlags, setProject
protected void populateArgumentMap()
populateArgumentMap
in class JavaScriptRefactoringDescriptor
public void setDestination(IJavaScriptElement element)
Note: Clients may call only one of the setDestination
methods.
element
- the java elementpublic void setDestination(IResource resource)
Note: Clients may call only one of the setDestination
methods.
resource
- the resourcepublic void setFileNamePatterns(java.lang.String patterns)
The syntax of the file name patterns is a sequence of individual name patterns, separated by comma. Additionally, wildcard characters '*' (any string) and '?' (any character) may be used.
Note: If file name patterns are set, qualified name updating must be
enabled by calling setUpdateQualifiedNames(boolean)
.
Note: Qualified name updating is currently applicable to files, folders and compilation units. The default is to not update qualified names.
patterns
- the non-empty file name patterns stringpublic void setMoveMembers(IMember[] members)
Note: Clients must only call one of the setMoveXXX
methods.
members
- the members to movepublic void setMovePackageFragmentRoots(IPackageFragmentRoot[] roots)
Note: Clients must only call one of the setMoveXXX
methods.
roots
- the package fragment roots to movepublic void setMovePackages(IPackageFragment[] fragments)
Note: Clients must only call one of the setMoveXXX
methods.
fragments
- the package fragments to movepublic void setMoveResources(IFile[] files, IFolder[] folders, IJavaScriptUnit[] units)
Note: Clients must only call one of the setMoveXXX
methods.
files
- the files to movefolders
- the folders to moveunits
- the compilation units to movepublic void setUpdateQualifiedNames(boolean update)
Qualified name updating adapts fully qualified names of the Java element
to be renamed in non-Java text files. Clients may specify file name
patterns by calling setFileNamePatterns(String)
to constrain the
set of text files to be processed.
Note: Qualified name updating is currently applicable to files, folders and compilation units. The default is to use no file name patterns (meaning that all files are processed).
update
- true
to update qualified names,
false
otherwisepublic void setUpdateReferences(boolean update)
update
- true
to update references, false
otherwisepublic RefactoringStatus validateDescriptor()
Clients must call this method to verify that all arguments have been
correctly set and that they satisfy the constraints imposed by specific
refactorings. Returning a refactoring status of severity
RefactoringStatus#FATAL
indicates that the refactoring descriptor
cannot be used to create a refactoring instance.
validateDescriptor
in class JavaScriptRefactoringDescriptor
Copyright (c) IBM Corp. and others 2000, 2010. All Rights Reserved.