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' hide AnalysisResult; | |
8 import 'package:analyzer/file_system/file_system.dart'; | 7 import 'package:analyzer/file_system/file_system.dart'; |
9 import 'package:analyzer/file_system/memory_file_system.dart'; | 8 import 'package:analyzer/file_system/memory_file_system.dart'; |
10 import 'package:analyzer/src/dart/analysis/driver.dart'; | 9 import 'package:analyzer/src/dart/analysis/driver.dart'; |
11 import 'package:analyzer_plugin/plugin/navigation_mixin.dart'; | 10 import 'package:analyzer_plugin/plugin/navigation_mixin.dart'; |
12 import 'package:analyzer_plugin/protocol/protocol_common.dart'; | 11 import 'package:analyzer_plugin/protocol/protocol_common.dart'; |
13 import 'package:analyzer_plugin/protocol/protocol_generated.dart'; | 12 import 'package:analyzer_plugin/protocol/protocol_generated.dart'; |
| 13 import 'package:analyzer_plugin/src/utilities/navigation/navigation.dart'; |
14 import 'package:analyzer_plugin/utilities/navigation/navigation.dart'; | 14 import 'package:analyzer_plugin/utilities/navigation/navigation.dart'; |
15 import 'package:path/src/context.dart'; | 15 import 'package:path/src/context.dart'; |
16 import 'package:test/test.dart'; | 16 import 'package:test/test.dart'; |
17 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 17 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
18 | 18 |
19 import 'mocks.dart'; | 19 import 'mocks.dart'; |
20 | 20 |
21 void main() { | 21 void main() { |
22 defineReflectiveTests(NavigationMixinTest); | 22 defineReflectiveTests(NavigationMixinTest); |
23 } | 23 } |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 @override | 81 @override |
82 List<NavigationContributor> getNavigationContributors( | 82 List<NavigationContributor> getNavigationContributors( |
83 AnalysisDriverGeneric driver) { | 83 AnalysisDriverGeneric driver) { |
84 return <NavigationContributor>[ | 84 return <NavigationContributor>[ |
85 new _TestNavigationContributor(2), | 85 new _TestNavigationContributor(2), |
86 new _TestNavigationContributor(1) | 86 new _TestNavigationContributor(1) |
87 ]; | 87 ]; |
88 } | 88 } |
89 | 89 |
90 @override | 90 @override |
91 Future<ResolveResult> getResolveResultForNavigation( | 91 Future<NavigationRequest> getNavigationRequest( |
92 AnalysisDriverGeneric driver, String path) async { | 92 AnalysisGetNavigationParams parameters, |
93 return new AnalysisResult( | 93 covariant AnalysisDriver driver) async { |
| 94 AnalysisResult result = new AnalysisResult( |
94 null, null, null, null, null, null, null, null, null, null, null); | 95 null, null, null, null, null, null, null, null, null, null, null); |
| 96 return new DartNavigationRequestImpl( |
| 97 resourceProvider, parameters.offset, parameters.length, result); |
95 } | 98 } |
96 } | 99 } |
OLD | NEW |