| 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 visitSuperConstructorInvocation(SuperConstructorInvocation node) { | 230 visitSuperConstructorInvocation(SuperConstructorInvocation node) { |
| 231 Element element = node.staticElement; | 231 Element element = node.staticElement; |
| 232 if (element != null && element.isSynthetic) { | 232 if (element != null && element.isSynthetic) { |
| 233 element = element.enclosingElement; | 233 element = element.enclosingElement; |
| 234 } | 234 } |
| 235 // add region | 235 // add region |
| 236 SimpleIdentifier name = node.constructorName; | 236 SimpleIdentifier name = node.constructorName; |
| 237 if (name != null) { | 237 if (name != null) { |
| 238 computer._addRegion_nodeStart_nodeEnd(node, name, element); | 238 computer._addRegion_nodeStart_nodeEnd(node, name, element); |
| 239 } else { | 239 } else { |
| 240 computer._addRegionForToken(node.keyword, element); | 240 computer._addRegionForToken(node.superKeyword, element); |
| 241 } | 241 } |
| 242 // process arguments | 242 // process arguments |
| 243 _safelyVisit(node.argumentList); | 243 _safelyVisit(node.argumentList); |
| 244 } | 244 } |
| 245 | 245 |
| 246 void _addConstructorName(AstNode parent, ConstructorName node) { | 246 void _addConstructorName(AstNode parent, ConstructorName node) { |
| 247 Element element = node.staticElement; | 247 Element element = node.staticElement; |
| 248 if (element == null) { | 248 if (element == null) { |
| 249 return; | 249 return; |
| 250 } | 250 } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 267 } | 267 } |
| 268 } | 268 } |
| 269 } | 269 } |
| 270 | 270 |
| 271 void _safelyVisit(AstNode node) { | 271 void _safelyVisit(AstNode node) { |
| 272 if (node != null) { | 272 if (node != null) { |
| 273 node.accept(this); | 273 node.accept(this); |
| 274 } | 274 } |
| 275 } | 275 } |
| 276 } | 276 } |
| OLD | NEW |