OLD | NEW |
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 import 'dart:async'; | 5 import 'dart:async'; |
6 | 6 |
7 import 'package:analyzer/dart/analysis/results.dart'; | 7 import 'package:analyzer/dart/analysis/results.dart'; |
8 import 'package:analyzer/src/dart/analysis/driver.dart'; | 8 import 'package:analyzer/src/dart/analysis/driver.dart'; |
9 import 'package:analyzer_plugin/plugin/plugin.dart'; | 9 import 'package:analyzer_plugin/plugin/plugin.dart'; |
10 import 'package:analyzer_plugin/protocol/protocol.dart'; | 10 import 'package:analyzer_plugin/protocol/protocol.dart'; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 * [AnalysisDriver]. | 57 * [AnalysisDriver]. |
58 * | 58 * |
59 * Clients may not extend or implement this class, but are allowed to use it as | 59 * Clients may not extend or implement this class, but are allowed to use it as |
60 * a mix-in when creating a subclass of [ServerPlugin] that also uses | 60 * a mix-in when creating a subclass of [ServerPlugin] that also uses |
61 * [CompletionMixin] as a mix-in. | 61 * [CompletionMixin] as a mix-in. |
62 */ | 62 */ |
63 abstract class DartCompletionMixin implements CompletionMixin { | 63 abstract class DartCompletionMixin implements CompletionMixin { |
64 @override | 64 @override |
65 Future<CompletionRequest> getCompletionRequest( | 65 Future<CompletionRequest> getCompletionRequest( |
66 CompletionGetSuggestionsParams parameters) async { | 66 CompletionGetSuggestionsParams parameters) async { |
67 String path = parameters.file; | |
68 ResolveResult result = await getResolveResult(parameters.file); | 67 ResolveResult result = await getResolveResult(parameters.file); |
69 return new DartCompletionRequestImpl( | 68 return new DartCompletionRequestImpl( |
70 resourceProvider, parameters.offset, result); | 69 resourceProvider, parameters.offset, result); |
71 } | 70 } |
72 } | 71 } |
OLD | NEW |