FileEditBuilder class abstract
A builder used to build a SourceFileEdit within a SourceChange.
Clients may not extend, implement or mix-in this class.
- Implementers
Constructors
Properties
Methods
-
addDeletion(
SourceRange range) → void -
Add a deletion of text specified by the given
range. Therangeis relative to the original source. This is fully equivalent to -
addInsertion(
int offset, void buildEdit(EditBuilder builder)) → void -
Add an insertion of text at the given
offset. Theoffsetis relative to the original source. ThebuildEditfunction is used to write the text to be inserted. This is fully equivalent to -
addLinkedPosition(
SourceRange range, String groupName) → void -
Add the region of text specified by the given
rangeto the linked edit group with the givengroupName. Therangeis relative to the original source. This is typically used to include preexisting regions of text in a group. If the region to be included is part of newly generated text, then the method EditBuilder.addLinkedEdit should be used instead. -
addReplacement(
SourceRange range, void buildEdit(EditBuilder builder)) → void -
Add a replacement of text specified by the given
range. Therangeis relative to the original source. ThebuildEditfunction is used to write the text that will replace the specified region. -
addSimpleInsertion(
int offset, String text) → void -
Add an insertion of the given
textat the givenoffset. Theoffsetis relative to the original source. This is fully equivalent to -
addSimpleReplacement(
SourceRange range, String text) → void -
Add a replacement of the text specified by the given
range. Therangeis relative to the original source. The original content will be replaced by the giventext. This is fully equivalent to -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited