| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 'package:analysis_server/plugin/analysis/navigation/navigation_core.dart'
; | |
| 6 import 'package:analysis_server/src/protocol_server.dart' as protocol; | 5 import 'package:analysis_server/src/protocol_server.dart' as protocol; |
| 7 import 'package:analyzer/dart/ast/ast.dart'; | 6 import 'package:analyzer/dart/ast/ast.dart'; |
| 8 import 'package:analyzer/dart/ast/token.dart'; | 7 import 'package:analyzer/dart/ast/token.dart'; |
| 9 import 'package:analyzer/dart/ast/visitor.dart'; | 8 import 'package:analyzer/dart/ast/visitor.dart'; |
| 10 import 'package:analyzer/dart/element/element.dart'; | 9 import 'package:analyzer/dart/element/element.dart'; |
| 11 import 'package:analyzer/dart/element/type.dart'; | 10 import 'package:analyzer/dart/element/type.dart'; |
| 12 import 'package:analyzer/src/dart/ast/utilities.dart'; | 11 import 'package:analyzer/src/dart/ast/utilities.dart'; |
| 13 import 'package:analyzer/src/dart/element/element.dart'; | 12 import 'package:analyzer/src/dart/element/element.dart'; |
| 14 import 'package:analyzer/src/generated/source.dart'; | 13 import 'package:analyzer/src/generated/source.dart'; |
| 14 import 'package:analyzer_plugin/utilities/navigation/navigation.dart'; |
| 15 | 15 |
| 16 NavigationCollector computeDartNavigation(NavigationCollector collector, | 16 NavigationCollector computeDartNavigation(NavigationCollector collector, |
| 17 CompilationUnit unit, int offset, int length) { | 17 CompilationUnit unit, int offset, int length) { |
| 18 _DartNavigationCollector dartCollector = | 18 _DartNavigationCollector dartCollector = |
| 19 new _DartNavigationCollector(collector); | 19 new _DartNavigationCollector(collector); |
| 20 _DartNavigationComputerVisitor visitor = | 20 _DartNavigationComputerVisitor visitor = |
| 21 new _DartNavigationComputerVisitor(dartCollector); | 21 new _DartNavigationComputerVisitor(dartCollector); |
| 22 if (offset == null || length == null) { | 22 if (offset == null || length == null) { |
| 23 unit.accept(visitor); | 23 unit.accept(visitor); |
| 24 } else { | 24 } else { |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 */ | 351 */ |
| 352 void _addUriDirectiveRegion(UriBasedDirective node, Element element) { | 352 void _addUriDirectiveRegion(UriBasedDirective node, Element element) { |
| 353 if (element != null) { | 353 if (element != null) { |
| 354 Source source = element.source; | 354 Source source = element.source; |
| 355 if (element.context.exists(source)) { | 355 if (element.context.exists(source)) { |
| 356 computer._addRegionForNode(node.uri, element); | 356 computer._addRegionForNode(node.uri, element); |
| 357 } | 357 } |
| 358 } | 358 } |
| 359 } | 359 } |
| 360 } | 360 } |
| OLD | NEW |