| 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/provisional/index/index_core.dart'; | 9 import 'package:analysis_server/src/provisional/index/index_core.dart'; |
| 10 import 'package:analysis_server/src/services/correction/namespace.dart'; | 10 import 'package:analysis_server/src/services/correction/namespace.dart'; |
| 11 import 'package:analysis_server/src/services/index/index.dart'; | 11 import 'package:analysis_server/src/services/index/index.dart'; |
| 12 import 'package:analysis_server/src/services/index/index_store.dart'; | 12 import 'package:analysis_server/src/services/index/index_store.dart'; |
| 13 import 'package:analysis_server/src/services/index/indexable_element.dart'; | 13 import 'package:analysis_server/src/services/index/indexable_element.dart'; |
| 14 import 'package:analysis_server/src/services/index/indexable_file.dart'; | 14 import 'package:analysis_server/src/services/index/indexable_file.dart'; |
| 15 import 'package:analyzer/dart/ast/ast.dart'; |
| 15 import 'package:analyzer/dart/ast/token.dart'; | 16 import 'package:analyzer/dart/ast/token.dart'; |
| 17 import 'package:analyzer/dart/ast/visitor.dart'; |
| 16 import 'package:analyzer/dart/element/element.dart'; | 18 import 'package:analyzer/dart/element/element.dart'; |
| 17 import 'package:analyzer/dart/element/type.dart'; | 19 import 'package:analyzer/dart/element/type.dart'; |
| 18 import 'package:analyzer/src/generated/ast.dart'; | |
| 19 import 'package:analyzer/src/generated/engine.dart'; | 20 import 'package:analyzer/src/generated/engine.dart'; |
| 20 import 'package:analyzer/src/generated/java_engine.dart'; | 21 import 'package:analyzer/src/generated/java_engine.dart'; |
| 21 import 'package:analyzer/src/generated/source.dart'; | 22 import 'package:analyzer/src/generated/source.dart'; |
| 22 | 23 |
| 23 /** | 24 /** |
| 24 * An [IndexContributor] that contributes relationships for Dart files. | 25 * An [IndexContributor] that contributes relationships for Dart files. |
| 25 */ | 26 */ |
| 26 class DartIndexContributor extends IndexContributor { | 27 class DartIndexContributor extends IndexContributor { |
| 27 @override | 28 @override |
| 28 void contributeTo(IndexStore store, AnalysisContext context, Object object) { | 29 void contributeTo(IndexStore store, AnalysisContext context, Object object) { |
| (...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 831 } | 832 } |
| 832 | 833 |
| 833 /** | 834 /** |
| 834 * @return `true` if given "node" is part of [PrefixedIdentifier] "prefix.node
". | 835 * @return `true` if given "node" is part of [PrefixedIdentifier] "prefix.node
". |
| 835 */ | 836 */ |
| 836 static bool _isIdentifierInPrefixedIdentifier(SimpleIdentifier node) { | 837 static bool _isIdentifierInPrefixedIdentifier(SimpleIdentifier node) { |
| 837 AstNode parent = node.parent; | 838 AstNode parent = node.parent; |
| 838 return parent is PrefixedIdentifier && parent.identifier == node; | 839 return parent is PrefixedIdentifier && parent.identifier == node; |
| 839 } | 840 } |
| 840 } | 841 } |
| OLD | NEW |