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

Side by Side Diff: pkg/analyzer_plugin/lib/utilities/change_builder/change_builder_dart.dart

Issue 2969833002: Convert DartChangeBuilder to use AnalysisSession (Closed)
Patch Set: Created 3 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:async'; 5 import 'dart:async';
6 6
7 import 'package:analyzer/dart/analysis/session.dart';
7 import 'package:analyzer/dart/ast/ast.dart'; 8 import 'package:analyzer/dart/ast/ast.dart';
8 import 'package:analyzer/dart/element/element.dart'; 9 import 'package:analyzer/dart/element/element.dart';
9 import 'package:analyzer/dart/element/type.dart'; 10 import 'package:analyzer/dart/element/type.dart';
10 import 'package:analyzer/src/dart/analysis/driver.dart';
11 import 'package:analyzer/src/generated/resolver.dart'; 11 import 'package:analyzer/src/generated/resolver.dart';
12 import 'package:analyzer/src/generated/source.dart'; 12 import 'package:analyzer/src/generated/source.dart';
13 import 'package:analyzer_plugin/src/utilities/change_builder/change_builder_dart .dart'; 13 import 'package:analyzer_plugin/src/utilities/change_builder/change_builder_dart .dart';
14 import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dar t'; 14 import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dar t';
15 15
16 /** 16 /**
17 * A [ChangeBuilder] used to build changes in Dart files. 17 * A [ChangeBuilder] used to build changes in Dart files.
18 * 18 *
19 * Clients may not extend, implement or mix-in this class. 19 * Clients may not extend, implement or mix-in this class.
20 */ 20 */
21 abstract class DartChangeBuilder implements ChangeBuilder { 21 abstract class DartChangeBuilder implements ChangeBuilder {
22 /** 22 /**
23 * Initialize a newly created change builder. 23 * Initialize a newly created change builder.
24 */ 24 */
25 factory DartChangeBuilder(AnalysisDriver driver) = DartChangeBuilderImpl; 25 factory DartChangeBuilder(AnalysisSession session) = DartChangeBuilderImpl;
26 26
27 @override 27 @override
28 Future<Null> addFileEdit( 28 Future<Null> addFileEdit(
29 String path, void buildFileEdit(DartFileEditBuilder builder)); 29 String path, void buildFileEdit(DartFileEditBuilder builder));
30 } 30 }
31 31
32 /** 32 /**
33 * An [EditBuilder] used to build edits in Dart files. 33 * An [EditBuilder] used to build edits in Dart files.
34 * 34 *
35 * Clients may not extend, implement or mix-in this class. 35 * Clients may not extend, implement or mix-in this class.
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 * 296 *
297 * Clients may not extend, implement or mix-in this class. 297 * Clients may not extend, implement or mix-in this class.
298 */ 298 */
299 abstract class DartLinkedEditBuilder implements LinkedEditBuilder { 299 abstract class DartLinkedEditBuilder implements LinkedEditBuilder {
300 /** 300 /**
301 * Add the given [type] and all of its supertypes (other than mixins) as 301 * Add the given [type] and all of its supertypes (other than mixins) as
302 * suggestions for the current linked edit group. 302 * suggestions for the current linked edit group.
303 */ 303 */
304 void addSuperTypesAsSuggestions(DartType type); 304 void addSuperTypesAsSuggestions(DartType type);
305 } 305 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698