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

Unified Diff: pkg/analysis_server/lib/src/services/completion/dart_completion_manager.dart

Issue 795633004: filter imported element suggestions to reduce number of results sent to client (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge and fix test Created 6 years 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/src/services/completion/imported_computer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/services/completion/dart_completion_manager.dart
diff --git a/pkg/analysis_server/lib/src/services/completion/dart_completion_manager.dart b/pkg/analysis_server/lib/src/services/completion/dart_completion_manager.dart
index e2c9cdcbf525a25f5c5e87147931e61e3f6897fc..99dc408a6155a4af55f3d9e45fee5a6fd61cab74 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart_completion_manager.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart_completion_manager.dart
@@ -265,6 +265,14 @@ class DartCompletionRequest extends CompletionRequest {
*/
final List<CompletionSuggestion> suggestions = <CompletionSuggestion>[];
+ /**
+ * Return the original text from the [replacementOffset] to the [offset]
+ * that can be used to filter the suggestions on the server side.
+ */
+ String get filterText {
+ return context.getContents(source).data.substring(replacementOffset, offset);
+ }
+
DartCompletionRequest(this.context, this.searchEngine, this.source,
int offset, this.cache, CompletionPerformance performance)
: super(offset, performance);
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/completion/imported_computer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698