| 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 services.src.index.index_contributor; | 5 library services.src.index.index_contributor; |
| 6 | 6 |
| 7 import 'dart:collection' show Queue; | 7 import 'dart:collection' show Queue; |
| 8 | 8 |
| 9 import 'package:analysis_server/src/services/correction/namespace.dart'; | 9 import 'package:analysis_server/src/services/correction/namespace.dart'; |
| 10 import 'package:analysis_server/src/services/index/index.dart'; | 10 import 'package:analysis_server/src/services/index/index.dart'; |
| (...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 } | 414 } |
| 415 } | 415 } |
| 416 } | 416 } |
| 417 return super.visitClassDeclaration(node); | 417 return super.visitClassDeclaration(node); |
| 418 } finally { | 418 } finally { |
| 419 _exitScope(); | 419 _exitScope(); |
| 420 } | 420 } |
| 421 } | 421 } |
| 422 | 422 |
| 423 @override | 423 @override |
| 424 Object visitEnumDeclaration(EnumDeclaration node) { |
| 425 ClassElement element = node.element; |
| 426 enterScope(element); |
| 427 try { |
| 428 _recordElementDefinition(element); |
| 429 return super.visitEnumDeclaration(node); |
| 430 } finally { |
| 431 _exitScope(); |
| 432 } |
| 433 } |
| 434 |
| 435 @override |
| 424 Object visitClassTypeAlias(ClassTypeAlias node) { | 436 Object visitClassTypeAlias(ClassTypeAlias node) { |
| 425 ClassElement element = node.element; | 437 ClassElement element = node.element; |
| 426 enterScope(element); | 438 enterScope(element); |
| 427 try { | 439 try { |
| 428 _recordElementDefinition(element); | 440 _recordElementDefinition(element); |
| 429 { | 441 { |
| 430 TypeName superclassNode = node.superclass; | 442 TypeName superclassNode = node.superclass; |
| 431 if (superclassNode != null) { | 443 if (superclassNode != null) { |
| 432 _recordSuperType(superclassNode, IndexConstants.IS_EXTENDED_BY); | 444 _recordSuperType(superclassNode, IndexConstants.IS_EXTENDED_BY); |
| 433 } | 445 } |
| (...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1034 } | 1046 } |
| 1035 | 1047 |
| 1036 /** | 1048 /** |
| 1037 * @return `true` if given "node" is part of [PrefixedIdentifier] "prefix.node
". | 1049 * @return `true` if given "node" is part of [PrefixedIdentifier] "prefix.node
". |
| 1038 */ | 1050 */ |
| 1039 static bool _isIdentifierInPrefixedIdentifier(SimpleIdentifier node) { | 1051 static bool _isIdentifierInPrefixedIdentifier(SimpleIdentifier node) { |
| 1040 AstNode parent = node.parent; | 1052 AstNode parent = node.parent; |
| 1041 return parent is PrefixedIdentifier && parent.identifier == node; | 1053 return parent is PrefixedIdentifier && parent.identifier == node; |
| 1042 } | 1054 } |
| 1043 } | 1055 } |
| OLD | NEW |