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 computer.navigation; | 5 library computer.navigation; |
6 | 6 |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 | 8 |
9 import 'package:analysis_server/src/protocol_server.dart' as protocol; | 9 import 'package:analysis_server/src/protocol_server.dart' as protocol; |
10 import 'package:analyzer/src/generated/ast.dart'; | 10 import 'package:analyzer/src/generated/ast.dart'; |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 } | 255 } |
256 | 256 |
257 /** | 257 /** |
258 * If the source of the given [element] (referenced by the [node]) exists, | 258 * If the source of the given [element] (referenced by the [node]) exists, |
259 * then add the navigation region from the [node] to the [element]. | 259 * then add the navigation region from the [node] to the [element]. |
260 */ | 260 */ |
261 void _addUriDirectiveRegion(UriBasedDirective node, Element element) { | 261 void _addUriDirectiveRegion(UriBasedDirective node, Element element) { |
262 if (element != null) { | 262 if (element != null) { |
263 Source source = element.source; | 263 Source source = element.source; |
264 if (element.context.exists(source)) { | 264 if (element.context.exists(source)) { |
265 computer._addRegion_tokenStart_nodeEnd(node.keyword, node.uri, element); | 265 computer._addRegionForNode(node.uri, element); |
266 } | 266 } |
267 } | 267 } |
268 } | 268 } |
269 | 269 |
270 void _safelyVisit(AstNode node) { | 270 void _safelyVisit(AstNode node) { |
271 if (node != null) { | 271 if (node != null) { |
272 node.accept(this); | 272 node.accept(this); |
273 } | 273 } |
274 } | 274 } |
275 } | 275 } |
OLD | NEW |