public interface ISourceModifier
A source modifier can be used to modify the source of a move or copy edit before it gets inserted at the target position. This is useful if the text to be copied has to be modified before it is inserted without changing the original source.
getModificationsReturns the modification to be done to the passed string in form of replace edits. The set of returned replace edits must modify disjoint text regions. Violating this requirement will result in a
BadLocationExceptionwhile executing the associated move or copy edit.
The caller of this method is responsible to apply the returned edits to the passed source.
source- the source to be copied or moved
- an array of
ReplaceEditsdescribing the modifications.
copyISourceModifier copy()Creates a copy of this source modifier object. The copy will be used in a different text edit object. So it should be created in a way that is doesn't conflict with other text edits referring to this source modifier.
- the copy of the source modifier