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

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

Issue 809793002: Improve nomenclature of new AnalysisContext async method. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/engine.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/protocol.dart'; 9 import 'package:analysis_server/src/protocol.dart';
10 import 'package:analysis_server/src/services/completion/arglist_computer.dart'; 10 import 'package:analysis_server/src/services/completion/arglist_computer.dart';
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 controller.close(); 181 controller.close();
182 } 182 }
183 } 183 }
184 184
185 /** 185 /**
186 * Return a future that either (a) completes with the resolved compilation 186 * Return a future that either (a) completes with the resolved compilation
187 * unit when analysis is complete, or (b) completes with null if the 187 * unit when analysis is complete, or (b) completes with null if the
188 * compilation unit is never going to be resolved. 188 * compilation unit is never going to be resolved.
189 */ 189 */
190 Future<CompilationUnit> waitForAnalysis() { 190 Future<CompilationUnit> waitForAnalysis() {
191 return context.getResolvedCompilationUnitFuture( 191 return context.computeResolvedCompilationUnitAsync(
192 source, 192 source,
193 source).catchError((_) { 193 source).catchError((_) {
194 // This source file is not scheduled for analysis, so a resolved 194 // This source file is not scheduled for analysis, so a resolved
195 // compilation unit is never going to get computed. 195 // compilation unit is never going to get computed.
196 return null; 196 return null;
197 }, test: (e) => e is AnalysisNotScheduledError); 197 }, test: (e) => e is AnalysisNotScheduledError);
198 } 198 }
199 } 199 }
200 200
201 /** 201 /**
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 _ReplacementOffsetBuilder(this.request) { 281 _ReplacementOffsetBuilder(this.request) {
282 request.replacementOffset = request.offset; 282 request.replacementOffset = request.offset;
283 request.replacementLength = 0; 283 request.replacementLength = 0;
284 } 284 }
285 285
286 visitSimpleIdentifier(SimpleIdentifier node) { 286 visitSimpleIdentifier(SimpleIdentifier node) {
287 request.replacementOffset = node.offset; 287 request.replacementOffset = node.offset;
288 request.replacementLength = node.length; 288 request.replacementLength = node.length;
289 } 289 }
290 } 290 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/engine.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698