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

Side by Side Diff: pkg/analyzer_plugin/lib/utilities/assist/assist.dart

Issue 2953093002: Update the plugin API (Closed)
Patch Set: Update FixesRequest 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 'package:analyzer/dart/analysis/results.dart'; 5 import 'package:analyzer/dart/analysis/results.dart';
6 import 'package:analyzer/file_system/file_system.dart'; 6 import 'package:analyzer/file_system/file_system.dart';
7 import 'package:analyzer_plugin/protocol/protocol.dart'; 7 import 'package:analyzer_plugin/protocol/protocol.dart';
8 import 'package:analyzer_plugin/protocol/protocol_generated.dart'; 8 import 'package:analyzer_plugin/protocol/protocol_generated.dart';
9 import 'package:analyzer_plugin/src/utilities/assist/assist.dart'; 9 import 'package:analyzer_plugin/src/utilities/assist/assist.dart';
10 import 'package:analyzer_plugin/utilities/generator.dart'; 10 import 'package:analyzer_plugin/utilities/generator.dart';
(...skipping 13 matching lines...) Expand all
24 /** 24 /**
25 * An object used to produce assists. 25 * An object used to produce assists.
26 * 26 *
27 * Clients may implement this class when implementing plugins. 27 * Clients may implement this class when implementing plugins.
28 */ 28 */
29 abstract class AssistContributor { 29 abstract class AssistContributor {
30 /** 30 /**
31 * Contribute assists for the location in the file specified by the given 31 * Contribute assists for the location in the file specified by the given
32 * [request] into the given [collector]. 32 * [request] into the given [collector].
33 */ 33 */
34 void computeAssists(AssistRequest request, AssistCollector collector); 34 void computeAssists(
35 covariant AssistRequest request, AssistCollector collector);
35 } 36 }
36 37
37 /** 38 /**
38 * A generator that will generate an 'edit.getAssists' response. 39 * A generator that will generate an 'edit.getAssists' response.
39 * 40 *
40 * Clients may not extend, implement or mix-in this class. 41 * Clients may not extend, implement or mix-in this class.
41 */ 42 */
42 class AssistGenerator { 43 class AssistGenerator {
43 /** 44 /**
44 * The contributors to be used to generate the assists. 45 * The contributors to be used to generate the assists.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 /** 89 /**
89 * Return the offset of the selection within the source for which assists are 90 * Return the offset of the selection within the source for which assists are
90 * being requested. 91 * being requested.
91 */ 92 */
92 int get offset; 93 int get offset;
93 94
94 /** 95 /**
95 * Return the resource provider associated with this request. 96 * Return the resource provider associated with this request.
96 */ 97 */
97 ResourceProvider get resourceProvider; 98 ResourceProvider get resourceProvider;
99 }
98 100
101 /**
102 * The information about a requested set of assists when computing assists in a
103 * `.dart` file.
104 *
105 * Clients may not extend, implement or mix-in this class.
106 */
107 abstract class DartAssistRequest implements AssistRequest {
99 /** 108 /**
100 * The analysis result for the file in which the assists are being requested. 109 * The analysis result for the file in which the assists are being requested.
101 */ 110 */
102 ResolveResult get result; 111 ResolveResult get result;
103 } 112 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698