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

Side by Side Diff: pkg/analyzer_plugin/lib/utilities/completion/suggestion_builder.dart

Issue 2993123002: Eliminate dependencies on pkg/front_end. (Closed)
Patch Set: Created 3 years, 4 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/element/element.dart'; 5 import 'package:analyzer/dart/element/element.dart';
6 import 'package:analyzer_plugin/protocol/protocol_common.dart' hide Element; 6 import 'package:analyzer_plugin/protocol/protocol_common.dart' hide Element;
7 import 'package:analyzer_plugin/utilities/completion/relevance.dart'; 7 import 'package:analyzer_plugin/utilities/completion/relevance.dart';
8 import 'package:front_end/src/base/source.dart' show Source; 8 import 'package:analyzer/src/generated/source.dart' show Source;
9 9
10 /** 10 /**
11 * An object used to build code completion suggestions for Dart code. 11 * An object used to build code completion suggestions for Dart code.
12 */ 12 */
13 abstract class SuggestionBuilder { 13 abstract class SuggestionBuilder {
14 /** 14 /**
15 * Return a suggestion based on the given [element], or `null` if a suggestion 15 * Return a suggestion based on the given [element], or `null` if a suggestion
16 * is not appropriate for the given element. If the suggestion is not 16 * is not appropriate for the given element. If the suggestion is not
17 * currently in scope, then specify [importForSource] as the source to which 17 * currently in scope, then specify [importForSource] as the source to which
18 * an import should be added. 18 * an import should be added.
19 */ 19 */
20 CompletionSuggestion forElement(Element element, 20 CompletionSuggestion forElement(Element element,
21 {String completion, 21 {String completion,
22 CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION, 22 CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION,
23 int relevance: DART_RELEVANCE_DEFAULT, 23 int relevance: DART_RELEVANCE_DEFAULT,
24 Source importForSource}); 24 Source importForSource});
25 } 25 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698