Index: pkg/analysis_server/lib/src/provisional/edit/utilities/change_builder_core.dart |
diff --git a/pkg/analysis_server/lib/src/provisional/edit/utilities/change_builder_core.dart b/pkg/analysis_server/lib/src/provisional/edit/utilities/change_builder_core.dart |
index 8fbcbdf48989e1921b96f3ba6565d65c06e69e68..28f42c81addee1f435ce16cdff63bf051cf3ba25 100644 |
--- a/pkg/analysis_server/lib/src/provisional/edit/utilities/change_builder_core.dart |
+++ b/pkg/analysis_server/lib/src/provisional/edit/utilities/change_builder_core.dart |
@@ -93,6 +93,28 @@ abstract class FileEditBuilder { |
*/ |
void addReplacement( |
int offset, int length, void buildEdit(EditBuilder builder)); |
+ |
+ /** |
+ * Add an insertion of the given [text] at the given [offset]. The [offset] is |
+ * relative to the original source. This is fully equivalent to |
+ * |
+ * addInsertion(offset, (EditBuilder builder) { |
+ * builder.write(text); |
+ * }); |
+ */ |
+ void addSimpleInsertion(int offset, String text); |
+ |
+ /** |
+ * Add a replacement of the text starting at the given [offset] and continuing |
+ * for the given [length]. The [offset] is relative to the original source. |
+ * The original content will be replaced by the given [text]. This is fully |
+ * equivalent to |
+ * |
+ * addReplacement(offset, length, (EditBuilder builder) { |
+ * builder.write(text); |
+ * }); |
+ */ |
+ void addSimpleReplacement(int offset, int length, String text); |
} |
/** |