Converts all modifications recorded for this compilation unit into an object representing the corresponding text edits to the given document containing the original source code for this compilation unit.
The compilation unit must have been created by ASTParser
from the source code string in the given document, and recording must have been turned on with a prior call to recordModifications
while the AST was still in its original state.
Calling this methods does not discard the modifications on record. Subsequence modifications made to the AST are added to the ones already on record. If this method is called again later, the resulting text edit object will accurately reflect the net cumulative effect of all those changes.
@param document original document containing source codefor this compilation unit
@param options the table of formatter options(key type:
String
; value type:
String
); or
null
to use the standard global options {@link org.eclipse.jdt.core.JavaCore#getOptions() JavaCore.getOptions()}.
@return text edit object describing the changes to thedocument corresponding to the recorded AST modifications
@exception IllegalArgumentException if the document passed is
null
or does not correspond to this AST
@exception IllegalStateException if
recordModifications
was not called to enable recording
@see #recordModifications()
@since 3.0