266ce73e28
R=brianwilkerson@google.com Context: https://github.com/JetBrains/intellij-plugins/pull/633#issuecomment-465725310 Change-Id: I03a1b7e7ec7cc0a5b0797dc960b72ca314a32132 Reviewed-on: https://dart-review.googlesource.com/c/93745 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
22 lines
870 B
Dart
22 lines
870 B
Dart
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
|
|
// 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 'package:analyzer/dart/element/element.dart';
|
|
import 'package:analyzer_plugin/protocol/protocol_common.dart' hide Element;
|
|
import 'package:analyzer_plugin/utilities/completion/relevance.dart';
|
|
|
|
/**
|
|
* An object used to build code completion suggestions for Dart code.
|
|
*/
|
|
abstract class SuggestionBuilder {
|
|
/**
|
|
* Return a suggestion based on the given [element], or `null` if a suggestion
|
|
* is not appropriate for the given element.
|
|
*/
|
|
CompletionSuggestion forElement(Element element,
|
|
{String completion,
|
|
CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION,
|
|
int relevance: DART_RELEVANCE_DEFAULT});
|
|
}
|