| 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.index; | 5 library services.index; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:analyzer/src/generated/ast.dart'; | 9 import 'package:analyzer/src/generated/ast.dart'; |
| 10 import 'package:analyzer/src/generated/element.dart'; | 10 import 'package:analyzer/src/generated/element.dart'; |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 * to the resource containing the element rather than the start of the element | 217 * to the resource containing the element rather than the start of the element |
| 218 * within that resource. | 218 * within that resource. |
| 219 */ | 219 */ |
| 220 class LocationImpl { | 220 class LocationImpl { |
| 221 static const int _FLAG_QUALIFIED = 1 << 0; | 221 static const int _FLAG_QUALIFIED = 1 << 0; |
| 222 static const int _FLAG_RESOLVED = 1 << 1; | 222 static const int _FLAG_RESOLVED = 1 << 1; |
| 223 | 223 |
| 224 /** | 224 /** |
| 225 * An empty array of locations. | 225 * An empty array of locations. |
| 226 */ | 226 */ |
| 227 static const List<LocationImpl> EMPTY_ARRAY = const <LocationImpl>[]; | 227 static const List<LocationImpl> EMPTY_LIST = const <LocationImpl>[]; |
| 228 | 228 |
| 229 /** | 229 /** |
| 230 * The element containing this location. | 230 * The element containing this location. |
| 231 */ | 231 */ |
| 232 final Element element; | 232 final Element element; |
| 233 | 233 |
| 234 /** | 234 /** |
| 235 * The offset of this location within the resource containing the element. | 235 * The offset of this location within the resource containing the element. |
| 236 */ | 236 */ |
| 237 final int offset; | 237 final int offset; |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 */ | 356 */ |
| 357 static RelationshipImpl getRelationship(String identifier) { | 357 static RelationshipImpl getRelationship(String identifier) { |
| 358 RelationshipImpl relationship = _RELATIONSHIP_MAP[identifier]; | 358 RelationshipImpl relationship = _RELATIONSHIP_MAP[identifier]; |
| 359 if (relationship == null) { | 359 if (relationship == null) { |
| 360 relationship = new RelationshipImpl(identifier); | 360 relationship = new RelationshipImpl(identifier); |
| 361 _RELATIONSHIP_MAP[identifier] = relationship; | 361 _RELATIONSHIP_MAP[identifier] = relationship; |
| 362 } | 362 } |
| 363 return relationship; | 363 return relationship; |
| 364 } | 364 } |
| 365 } | 365 } |
| OLD | NEW |