| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 library analysis_server.edit.assist.assist_core; | 5 library analysis_server.edit.assist.assist_core; |
| 6 | 6 |
| 7 import 'package:analysis_server/src/protocol.dart' show SourceChange; | 7 import 'package:analysis_server/src/protocol.dart' show SourceChange; |
| 8 import 'package:analyzer/src/generated/engine.dart'; | 8 import 'package:analyzer/src/generated/engine.dart'; |
| 9 import 'package:analyzer/src/generated/source.dart'; | 9 import 'package:analyzer/src/generated/source.dart'; |
| 10 | 10 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 /** | 49 /** |
| 50 * An object used to produce assists for a specific location. | 50 * An object used to produce assists for a specific location. |
| 51 */ | 51 */ |
| 52 abstract class AssistContributor { | 52 abstract class AssistContributor { |
| 53 /** | 53 /** |
| 54 * Return a list of assists for a location in the given [source]. The location | 54 * Return a list of assists for a location in the given [source]. The location |
| 55 * is specified by the [offset] and [length] of the selected region. The | 55 * is specified by the [offset] and [length] of the selected region. The |
| 56 * [context] can be used to get additional information that is useful for | 56 * [context] can be used to get additional information that is useful for |
| 57 * computing assists. | 57 * computing assists. |
| 58 */ | 58 */ |
| 59 List<Assist> compute( | 59 List<Assist> computeAssists( |
| 60 AnalysisContext context, Source source, int offset, int length); | 60 AnalysisContext context, Source source, int offset, int length); |
| 61 } | 61 } |
| 62 | 62 |
| 63 /** | 63 /** |
| 64 * A description of a class of assists. Instances are intended to hold the | 64 * A description of a class of assists. Instances are intended to hold the |
| 65 * information that is common across a number of assists and to be shared by | 65 * information that is common across a number of assists and to be shared by |
| 66 * those assists. | 66 * those assists. |
| 67 */ | 67 */ |
| 68 class AssistKind { | 68 class AssistKind { |
| 69 /** | 69 /** |
| (...skipping 14 matching lines...) Expand all Loading... |
| 84 | 84 |
| 85 /** | 85 /** |
| 86 * Initialize a newly created kind of assist to have the given [name], | 86 * Initialize a newly created kind of assist to have the given [name], |
| 87 * [relevance] and [message]. | 87 * [relevance] and [message]. |
| 88 */ | 88 */ |
| 89 const AssistKind(this.name, this.relevance, this.message); | 89 const AssistKind(this.name, this.relevance, this.message); |
| 90 | 90 |
| 91 @override | 91 @override |
| 92 String toString() => name; | 92 String toString() => name; |
| 93 } | 93 } |
| OLD | NEW |