Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Unified Diff: pkg/analyzer_plugin/lib/utilities/change_builder/change_builder_dart.dart

Issue 2906373002: Override ChangeBuilder methods in subclass to specify better type information (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer_plugin/lib/src/utilities/change_builder/change_builder_dart.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer_plugin/lib/utilities/change_builder/change_builder_dart.dart
diff --git a/pkg/analyzer_plugin/lib/utilities/change_builder/change_builder_dart.dart b/pkg/analyzer_plugin/lib/utilities/change_builder/change_builder_dart.dart
index f15dac6461bcded959db9091f59f3e7663b2c627..ce59564375e42332972c3461893f0debe2e5caac 100644
--- a/pkg/analyzer_plugin/lib/utilities/change_builder/change_builder_dart.dart
+++ b/pkg/analyzer_plugin/lib/utilities/change_builder/change_builder_dart.dart
@@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+import 'dart:async';
+
import 'package:analyzer/dart/ast/ast.dart';
import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/dart/element/type.dart';
@@ -21,6 +23,10 @@ abstract class DartChangeBuilder extends ChangeBuilder {
* Initialize a newly created change builder.
*/
factory DartChangeBuilder(AnalysisDriver driver) = DartChangeBuilderImpl;
+
+ @override
+ Future<Null> addFileEdit(String path, int fileStamp,
+ void buildFileEdit(DartFileEditBuilder builder));
}
/**
@@ -29,6 +35,10 @@ abstract class DartChangeBuilder extends ChangeBuilder {
* Clients may not extend, implement or mix-in this class.
*/
abstract class DartEditBuilder extends EditBuilder {
+ @override
+ void addLinkedEdit(
+ String groupName, void buildLinkedEdit(DartLinkedEditBuilder builder));
+
/**
* Write the code for a declaration of a class with the given [name]. If a
* list of [interfaces] is provided, then the class will implement those
@@ -227,6 +237,13 @@ abstract class DartEditBuilder extends EditBuilder {
* Clients may not extend, implement or mix-in this class.
*/
abstract class DartFileEditBuilder extends FileEditBuilder {
+ @override
+ void addInsertion(int offset, void buildEdit(DartEditBuilder builder));
+
+ @override
+ void addReplacement(
+ SourceRange range, void buildEdit(DartEditBuilder builder));
+
/**
* Create one or more edits that will convert the given function [body] from
* being synchronous to be asynchronous. This includes adding the `async`
« no previous file with comments | « pkg/analyzer_plugin/lib/src/utilities/change_builder/change_builder_dart.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698