| OLD | NEW |
| 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 test.domain.completion; | 5 library test.domain.completion; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:analysis_server/protocol/protocol.dart'; | 9 import 'package:analysis_server/protocol/protocol.dart'; |
| 10 import 'package:analysis_server/protocol/protocol_generated.dart'; | 10 import 'package:analysis_server/protocol/protocol_generated.dart'; |
| (...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 701 assertNoResult('test'); | 701 assertNoResult('test'); |
| 702 }); | 702 }); |
| 703 } | 703 } |
| 704 | 704 |
| 705 test_sentToPlugins() async { | 705 test_sentToPlugins() async { |
| 706 addTestFile(''' | 706 addTestFile(''' |
| 707 void main() { | 707 void main() { |
| 708 ^ | 708 ^ |
| 709 } | 709 } |
| 710 '''); | 710 '''); |
| 711 PluginInfo info = new PluginInfo('a', 'b', 'c', null, null); | 711 PluginInfo info = new DiscoveredPluginInfo('a', 'b', 'c', null, null); |
| 712 plugin.CompletionGetSuggestionsResult result = | 712 plugin.CompletionGetSuggestionsResult result = |
| 713 new plugin.CompletionGetSuggestionsResult( | 713 new plugin.CompletionGetSuggestionsResult( |
| 714 1, 2, <plugin.CompletionSuggestion>[ | 714 1, 2, <plugin.CompletionSuggestion>[ |
| 715 new plugin.CompletionSuggestion( | 715 new plugin.CompletionSuggestion( |
| 716 plugin.CompletionSuggestionKind.IDENTIFIER, | 716 plugin.CompletionSuggestionKind.IDENTIFIER, |
| 717 DART_RELEVANCE_DEFAULT, | 717 DART_RELEVANCE_DEFAULT, |
| 718 'plugin completion', | 718 'plugin completion', |
| 719 3, | 719 3, |
| 720 0, | 720 0, |
| 721 false, | 721 false, |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 777 | 777 |
| 778 @override | 778 @override |
| 779 Future sort( | 779 Future sort( |
| 780 CompletionRequest request, Iterable<CompletionSuggestion> suggestions) { | 780 CompletionRequest request, Iterable<CompletionSuggestion> suggestions) { |
| 781 if (!enabled) { | 781 if (!enabled) { |
| 782 throw 'unexpected sort'; | 782 throw 'unexpected sort'; |
| 783 } | 783 } |
| 784 return new Future.value(); | 784 return new Future.value(); |
| 785 } | 785 } |
| 786 } | 786 } |
| OLD | NEW |