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

Unified Diff: pkg/analysis_server/lib/completion/completion_core.dart

Issue 1318543002: Convert completion API to be future based (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analysis_server/lib/completion/completion_dart.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/completion/completion_core.dart
diff --git a/pkg/analysis_server/lib/completion/completion_core.dart b/pkg/analysis_server/lib/completion/completion_core.dart
index 39d6a838213b03b3b5aa44be416c3ea073eb9b93..5003faf790e338b261d7bc9f10c092f612d05e54 100644
--- a/pkg/analysis_server/lib/completion/completion_core.dart
+++ b/pkg/analysis_server/lib/completion/completion_core.dart
@@ -19,11 +19,9 @@ import 'package:analyzer/src/generated/source.dart';
abstract class CompletionContributor {
/**
* Compute a list of completion suggestions based on the given completion
- * [request] and return a result that includes those suggestions. This method
- * is called after specific phases of analysis until the contributor indicates
- * computation is complete by setting [CompletionResult.isLast] to `true`.
+ * [request]. Return the suggestions that were computed.
*/
- CompletionResult computeSuggestions(CompletionRequest request);
+ List<CompletionSuggestion> computeSuggestions(CompletionRequest request);
}
/**
@@ -33,13 +31,6 @@ abstract class CompletionContributor {
*/
abstract class CompletionRequest {
/**
- * Return the results that were returned the last time the contributor was
- * asked for results, or `null` if this is the first request for results at
- * this location.
- */
- //CompletionResult get previousResults;
-
- /**
* Return the analysis context in which the completion is being requested.
*/
AnalysisContext get context;
@@ -68,20 +59,6 @@ abstract class CompletionRequest {
*/
abstract class CompletionResult {
/**
- * Return `true` if this result contains suggestions that were not in the
- * previously returned completion results. This should also be `true` if this
- * is the first result produced for a given location.
- */
- bool get hasNewSuggestions;
-
- /**
- * Return `true` if the contributor has contributed all possible completion
- * suggestions, or `false` if the contributor should be consulted again after
- * more analysis has been completed.
- */
- bool get isLast;
-
- /**
* Return the length of the text to be replaced. This will be zero (0) if the
* suggestion is to be inserted, otherwise it will be greater than zero. For
* example, if the remainder of the identifier containing the cursor is to be
« no previous file with comments | « no previous file | pkg/analysis_server/lib/completion/completion_dart.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698