CompletionDomain class
The code completion domain contains commands related to getting code completion suggestions.
Constructors
- CompletionDomain(AnalysisServer server)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
finalinherited
-
onAvailableSuggestions
→ Stream<
CompletionAvailableSuggestions> -
Reports the pre-computed, candidate completions from symbols defined in a
corresponding library. This notification may be sent multiple times. When
a notification is processed, clients should replace any previous
information about the libraries in the list of changedLibraries, discard
any information about the libraries in the list of removedLibraries, and
preserve any previously received information about any libraries that are
not included in either list.
no setter
-
onExistingImports
→ Stream<
CompletionExistingImports> -
Reports existing imports in a library. This notification may be sent
multiple times for a library. When a notification is processed, clients
should replace any previous information for the library.
no setter
-
onResults
→ Stream<
CompletionResults> -
Reports the completion suggestions that should be presented to the user.
The set of suggestions included in the notification is always a complete
list that supersedes any previously reported suggestions.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- server → AnalysisServer
-
finalinherited
Methods
-
getSuggestionDetails(
String? file, int? id, String? label, int? offset) → Future< SuggestionDetailsResult> -
Clients must make this request when the user has selected a completion
suggestion from an
AvailableSuggestionSet
. Analysis server will respond with the text to insert as well as anySourceChange
that needs to be applied in case the completion requires an additional import to be added. It is an error if the id is no longer valid, for instance if the library has been removed after the completion suggestion is accepted. -
getSuggestionDetails2(
String? file, int? offset, String? completion, String? libraryUri) → Future< SuggestionDetails2Result> -
Clients must make this request when the user has selected a completion
suggestion with the
isNotImported
field set totrue
. The server will respond with the text to insert, as well as anySourceChange
that needs to be applied in case the completion requires an additional import to be added. The text to insert might be different from the original suggestion to include an import prefix if the library will be imported with a prefix to avoid shadowing conflicts in the file. -
getSuggestions(
String? file, int? offset) → Future< SuggestionsResult> - Request that completion suggestions for the given offset in the given file be returned.
-
getSuggestions2(
String? file, int? offset, int? maxResults, {String? completionCaseMatchingMode, String? completionMode, int? invocationCount, int? timeout}) → Future< Suggestions2Result> - Request that completion suggestions for the given offset in the given file be returned. The suggestions will be filtered using fuzzy matching with the already existing prefix.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerLibraryPaths(
List< LibraryPathSet> paths) → Future -
setSubscriptions(
List< String> subscriptions) → Future - Subscribe for completion services. All previous subscriptions are replaced by the given set of services.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited