Class RefactoringSessionDescriptor
- java.lang.Object
-
- org.eclipse.ltk.core.refactoring.RefactoringSessionDescriptor
-
public class RefactoringSessionDescriptor extends Object
Descriptor object of a refactoring session.Refactoring session descriptors encapsulate a series of refactoring descriptors. They are used to represent chunks of the global workspace refactoring history or refactoring scripts created by the user.
Refactoring session descriptors contain the following information:
- an optional comment string, which provides a full human-readable description of the refactoring session. Comments are automatically generated by refactorings and provide more refactoring-specific information, such as which elements have participated in which refactorings.
- a list of refactoring descriptors describing the refactorings executed during a refactoring session. The refactoring list is sorted in ascending order by the execution time of the refactorings.
- a version tag describing version information of the refactoring session
descriptor format. The version tag is used to provide a means of schema
evolution on the refactoring framework level. Clients which would like to
version their refactoring descriptors are required to implement this in their
specific subclasses of
RefactoringDescriptor
.
Refactoring session descriptors are potentially heavy weight objects which should not be held on to. Use refactoring descriptor proxies
RefactoringDescriptorProxy
to present refactoring descriptors in the user interface or otherwise manipulate refactoring histories. More details about a particular refactoring session can be revealed in the comment, which contains more text with refactoring-specific information.All time stamps are measured as the milliseconds since January 1, 1970, 00:00:00 GMT.
Note: this class is not indented to be subclassed outside the refactoring framework.
- Since:
- 3.2
- See Also:
RefactoringDescriptor
- Restriction:
- This class is not intended to be subclassed by clients.
-
-
Field Summary
Fields Modifier and Type Field Description static String
VERSION_1_0
The version constant for v1.0 (value: 1.0)
-
Constructor Summary
Constructors Constructor Description RefactoringSessionDescriptor(RefactoringDescriptor[] descriptors, String version, String comment)
Creates a new refactoring session descriptor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getComment()
Returns the comment.RefactoringDescriptor[]
getRefactorings()
Returns the refactoring descriptors.String
getVersion()
Returns the version tag.
-
-
-
Field Detail
-
VERSION_1_0
public static final String VERSION_1_0
The version constant for v1.0 (value: 1.0)- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RefactoringSessionDescriptor
public RefactoringSessionDescriptor(RefactoringDescriptor[] descriptors, String version, String comment)
Creates a new refactoring session descriptor.- Parameters:
descriptors
- the refactoring descriptors in executed order, or the empty arrayversion
- the non-empty version tag, one of theVERSION_xxx
constantscomment
- the comment of the refactoring session, ornull
for no comment
-
-
Method Detail
-
getComment
public final String getComment()
Returns the comment.- Returns:
- the comment, or the empty string
-
getRefactorings
public final RefactoringDescriptor[] getRefactorings()
Returns the refactoring descriptors.- Returns:
- the array of refactoring descriptors in executed order, or the empty array
-
getVersion
public final String getVersion()
Returns the version tag.- Returns:
- the version tag
-
-