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/file_system/file_system.dart'; | 7 import 'package:analyzer/file_system/file_system.dart'; |
8 import 'package:analyzer/file_system/memory_file_system.dart'; | 8 import 'package:analyzer/file_system/memory_file_system.dart'; |
9 import 'package:analyzer/src/dart/analysis/driver.dart'; | 9 import 'package:analyzer/src/dart/analysis/driver.dart'; |
10 import 'package:analyzer_plugin/plugin/navigation_mixin.dart'; | 10 import 'package:analyzer_plugin/plugin/navigation_mixin.dart'; |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 i, 5, ElementKind.METHOD, new Location('a', 5, 5, 1, 5)); | 72 i, 5, ElementKind.METHOD, new Location('a', 5, 5, 1, 5)); |
73 } | 73 } |
74 } | 74 } |
75 } | 75 } |
76 | 76 |
77 class _TestServerPlugin extends MockServerPlugin with NavigationMixin { | 77 class _TestServerPlugin extends MockServerPlugin with NavigationMixin { |
78 _TestServerPlugin(ResourceProvider resourceProvider) | 78 _TestServerPlugin(ResourceProvider resourceProvider) |
79 : super(resourceProvider); | 79 : super(resourceProvider); |
80 | 80 |
81 @override | 81 @override |
82 List<NavigationContributor> getNavigationContributors( | 82 List<NavigationContributor> getNavigationContributors(String path) { |
83 AnalysisDriverGeneric driver) { | |
84 return <NavigationContributor>[ | 83 return <NavigationContributor>[ |
85 new _TestNavigationContributor(2), | 84 new _TestNavigationContributor(2), |
86 new _TestNavigationContributor(1) | 85 new _TestNavigationContributor(1) |
87 ]; | 86 ]; |
88 } | 87 } |
89 | 88 |
90 @override | 89 @override |
91 Future<NavigationRequest> getNavigationRequest( | 90 Future<NavigationRequest> getNavigationRequest( |
92 AnalysisGetNavigationParams parameters, | 91 AnalysisGetNavigationParams parameters) async { |
93 covariant AnalysisDriver driver) async { | |
94 AnalysisResult result = new AnalysisResult( | 92 AnalysisResult result = new AnalysisResult( |
95 null, null, null, null, null, null, null, null, null, null, null); | 93 null, null, null, null, null, null, null, null, null, null, null); |
96 return new DartNavigationRequestImpl( | 94 return new DartNavigationRequestImpl( |
97 resourceProvider, parameters.offset, parameters.length, result); | 95 resourceProvider, parameters.offset, parameters.length, result); |
98 } | 96 } |
99 } | 97 } |
OLD | NEW |