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

FileEditBuilder()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addDeletion(SourceRange range) → void
Add a deletion of text specified by the given range. The range is 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. The offset is relative to the original source. The buildEdit function 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 range to the linked edit group with the given groupName. The range is 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. The range is relative to the original source. The buildEdit function is used to write the text that will replace the specified region.
addSimpleInsertion(int offset, String text) → void
Add an insertion of the given text at the given offset. The offset is 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. The range is relative to the original source. The original content will be replaced by the given text. 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