| 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 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 if (element is ClassElement || | 698 if (element is ClassElement || |
| 699 element is FunctionElement || | 699 element is FunctionElement || |
| 700 element is FunctionTypeAliasElement || | 700 element is FunctionTypeAliasElement || |
| 701 element is LabelElement || | 701 element is LabelElement || |
| 702 element is MethodElement || | 702 element is MethodElement || |
| 703 element is PropertyAccessorElement || | 703 element is PropertyAccessorElement || |
| 704 element is PropertyInducingElement || | 704 element is PropertyInducingElement || |
| 705 element is TypeParameterElement) { | 705 element is TypeParameterElement) { |
| 706 recordRelationship(element, IndexConstants.IS_REFERENCED_BY, location); | 706 recordRelationship(element, IndexConstants.IS_REFERENCED_BY, location); |
| 707 } else if (element is PrefixElement) { | 707 } else if (element is PrefixElement) { |
| 708 recordRelationship(element, IndexConstants.IS_REFERENCED_BY, location); |
| 708 _recordImportElementReferenceWithPrefix(node); | 709 _recordImportElementReferenceWithPrefix(node); |
| 709 } else if (element is ParameterElement || element is LocalVariableElement) { | 710 } else if (element is ParameterElement || element is LocalVariableElement) { |
| 710 bool inGetterContext = node.inGetterContext(); | 711 bool inGetterContext = node.inGetterContext(); |
| 711 bool inSetterContext = node.inSetterContext(); | 712 bool inSetterContext = node.inSetterContext(); |
| 712 if (inGetterContext && inSetterContext) { | 713 if (inGetterContext && inSetterContext) { |
| 713 recordRelationship( | 714 recordRelationship( |
| 714 element, | 715 element, |
| 715 IndexConstants.IS_READ_WRITTEN_BY, | 716 IndexConstants.IS_READ_WRITTEN_BY, |
| 716 location); | 717 location); |
| 717 } else if (inGetterContext) { | 718 } else if (inGetterContext) { |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1033 } | 1034 } |
| 1034 | 1035 |
| 1035 /** | 1036 /** |
| 1036 * @return `true` if given "node" is part of [PrefixedIdentifier] "prefix.node
". | 1037 * @return `true` if given "node" is part of [PrefixedIdentifier] "prefix.node
". |
| 1037 */ | 1038 */ |
| 1038 static bool _isIdentifierInPrefixedIdentifier(SimpleIdentifier node) { | 1039 static bool _isIdentifierInPrefixedIdentifier(SimpleIdentifier node) { |
| 1039 AstNode parent = node.parent; | 1040 AstNode parent = node.parent; |
| 1040 return parent is PrefixedIdentifier && parent.identifier == node; | 1041 return parent is PrefixedIdentifier && parent.identifier == node; |
| 1041 } | 1042 } |
| 1042 } | 1043 } |
| OLD | NEW |