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

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

Issue 1389473002: only send final completion notification (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: update test to reflect new reality Created 5 years, 2 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
« no previous file with comments | « no previous file | pkg/analysis_server/test/integration/integration_tests.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library services.completion.dart; 5 library services.completion.dart;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/analysis_server.dart'; 9 import 'package:analysis_server/src/analysis_server.dart';
10 import 'package:analysis_server/src/protocol.dart'; 10 import 'package:analysis_server/src/protocol.dart';
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 } 176 }
177 177
178 List<DartCompletionContributor> todo = new List.from(contributors); 178 List<DartCompletionContributor> todo = new List.from(contributors);
179 todo.removeWhere((DartCompletionContributor c) { 179 todo.removeWhere((DartCompletionContributor c) {
180 return performance.logElapseTime('computeFast ${c.runtimeType}', () { 180 return performance.logElapseTime('computeFast ${c.runtimeType}', () {
181 return c.computeFast(request); 181 return c.computeFast(request);
182 }); 182 });
183 }); 183 });
184 contributionSorter.sort( 184 contributionSorter.sort(
185 new OldRequestWrapper(request), request.suggestions); 185 new OldRequestWrapper(request), request.suggestions);
186 sendResults(request, todo.isEmpty); 186
187 if (todo.isEmpty) {
188 sendResults(request, todo.isEmpty);
189 }
187 return todo; 190 return todo;
188 }); 191 });
189 } 192 }
190 193
191 /** 194 /**
192 * If there is remaining work to be done, then wait for the unit to be 195 * If there is remaining work to be done, then wait for the unit to be
193 * resolved and request that each remaining contributor finish their work. 196 * resolved and request that each remaining contributor finish their work.
194 * Return a [Future] that completes when the last notification has been sent. 197 * Return a [Future] that completes when the last notification has been sent.
195 */ 198 */
196 Future computeFull(DartCompletionRequest request, 199 Future computeFull(DartCompletionRequest request,
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 490
488 @override 491 @override
489 CompletionTarget get target => request.target; 492 CompletionTarget get target => request.target;
490 493
491 @override 494 @override
492 CompilationUnit get unit => request.unit; 495 CompilationUnit get unit => request.unit;
493 496
494 @override 497 @override
495 String toString() => 'wrapped $request'; 498 String toString() => 'wrapped $request';
496 } 499 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/test/integration/integration_tests.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698