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

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

Issue 1470373002: create new Dart specific completion contributor extension point (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: merge Created 5 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
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.manager; 5 library services.completion.manager;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/plugin/protocol/protocol.dart'; 9 import 'package:analysis_server/plugin/protocol/protocol.dart';
10 import 'package:analysis_server/src/analysis_server.dart'; 10 import 'package:analysis_server/src/analysis_server.dart';
11 import 'package:analysis_server/src/plugin/server_plugin.dart';
11 import 'package:analysis_server/src/provisional/completion/completion_core.dart' 12 import 'package:analysis_server/src/provisional/completion/completion_core.dart'
12 show CompletionRequest, CompletionResult; 13 show CompletionRequest, CompletionResult;
13 import 'package:analysis_server/src/services/completion/dart_completion_manager. dart'; 14 import 'package:analysis_server/src/services/completion/dart_completion_manager. dart';
14 import 'package:analysis_server/src/services/search/search_engine.dart'; 15 import 'package:analysis_server/src/services/search/search_engine.dart';
15 import 'package:analyzer/file_system/file_system.dart'; 16 import 'package:analyzer/file_system/file_system.dart';
16 import 'package:analyzer/src/generated/engine.dart'; 17 import 'package:analyzer/src/generated/engine.dart';
17 import 'package:analyzer/src/generated/source.dart'; 18 import 'package:analyzer/src/generated/source.dart';
18 19
19 /** 20 /**
20 * [CompletionCache] contains information about the prior code completion 21 * [CompletionCache] contains information about the prior code completion
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 @override 232 @override
232 final Source source; 233 final Source source;
233 234
234 @override 235 @override
235 final int offset; 236 final int offset;
236 237
237 CompletionRequestImpl(this.server, this.context, this.source, this.offset); 238 CompletionRequestImpl(this.server, this.context, this.source, this.offset);
238 239
239 @override 240 @override
240 ResourceProvider get resourceProvider => server.resourceProvider; 241 ResourceProvider get resourceProvider => server.resourceProvider;
242
243 @override
244 ServerPlugin get serverPlugin => server.serverPlugin;
241 } 245 }
242 246
243 /** 247 /**
244 * Code completion result generated by an [CompletionManager]. 248 * Code completion result generated by an [CompletionManager].
245 */ 249 */
246 class CompletionResultImpl implements CompletionResult { 250 class CompletionResultImpl implements CompletionResult {
247 /** 251 /**
248 * The length of the text to be replaced if the remainder of the identifier 252 * The length of the text to be replaced if the remainder of the identifier
249 * containing the cursor is to be replaced when the suggestion is applied 253 * containing the cursor is to be replaced when the suggestion is applied
250 * (that is, the number of characters in the existing identifier). 254 * (that is, the number of characters in the existing identifier).
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 */ 301 */
298 final String name; 302 final String name;
299 303
300 /** 304 /**
301 * The elapse time or `null` if undefined. 305 * The elapse time or `null` if undefined.
302 */ 306 */
303 final Duration elapsed; 307 final Duration elapsed;
304 308
305 OperationPerformance(this.name, this.elapsed); 309 OperationPerformance(this.name, this.elapsed);
306 } 310 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698