| 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 analyzer.src.dart.element.element; | 5 library analyzer.src.dart.element.element; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 import 'dart:math' show min; | 8 import 'dart:math' show min; |
| 9 | 9 |
| 10 import 'package:analyzer/dart/ast/ast.dart'; | 10 import 'package:analyzer/dart/ast/ast.dart'; |
| (...skipping 2849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2860 bool get isResynthesized => enclosingUnit?.resynthesizerContext != null; | 2860 bool get isResynthesized => enclosingUnit?.resynthesizerContext != null; |
| 2861 | 2861 |
| 2862 @override | 2862 @override |
| 2863 bool get isSynthetic => hasModifier(Modifier.SYNTHETIC); | 2863 bool get isSynthetic => hasModifier(Modifier.SYNTHETIC); |
| 2864 | 2864 |
| 2865 @override | 2865 @override |
| 2866 LibraryElement get library => | 2866 LibraryElement get library => |
| 2867 getAncestor((element) => element is LibraryElement); | 2867 getAncestor((element) => element is LibraryElement); |
| 2868 | 2868 |
| 2869 @override | 2869 @override |
| 2870 Source get librarySource => library?.source; |
| 2871 |
| 2872 @override |
| 2870 ElementLocation get location { | 2873 ElementLocation get location { |
| 2871 if (_cachedLocation == null) { | 2874 if (_cachedLocation == null) { |
| 2872 if (library == null) { | 2875 if (library == null) { |
| 2873 return new ElementLocationImpl.con1(this); | 2876 return new ElementLocationImpl.con1(this); |
| 2874 } | 2877 } |
| 2875 _cachedLocation = new ElementLocationImpl.con1(this); | 2878 _cachedLocation = new ElementLocationImpl.con1(this); |
| 2876 } | 2879 } |
| 2877 return _cachedLocation; | 2880 return _cachedLocation; |
| 2878 } | 2881 } |
| 2879 | 2882 |
| (...skipping 3646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6526 @override | 6529 @override |
| 6527 int get nameLength => displayName != null ? displayName.length : 0; | 6530 int get nameLength => displayName != null ? displayName.length : 0; |
| 6528 | 6531 |
| 6529 @override | 6532 @override |
| 6530 int get nameOffset => -1; | 6533 int get nameOffset => -1; |
| 6531 | 6534 |
| 6532 @override | 6535 @override |
| 6533 Source get source => null; | 6536 Source get source => null; |
| 6534 | 6537 |
| 6535 @override | 6538 @override |
| 6539 Source get librarySource => null; |
| 6540 |
| 6541 @override |
| 6536 DartType get type => DynamicTypeImpl.instance; | 6542 DartType get type => DynamicTypeImpl.instance; |
| 6537 | 6543 |
| 6538 @override | 6544 @override |
| 6539 CompilationUnit get unit => null; | 6545 CompilationUnit get unit => null; |
| 6540 | 6546 |
| 6541 @override | 6547 @override |
| 6542 accept(ElementVisitor visitor) => visitor.visitMultiplyDefinedElement(this); | 6548 accept(ElementVisitor visitor) => visitor.visitMultiplyDefinedElement(this); |
| 6543 | 6549 |
| 6544 @override | 6550 @override |
| 6545 String computeDocumentationComment() => null; | 6551 String computeDocumentationComment() => null; |
| (...skipping 1896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8442 | 8448 |
| 8443 @override | 8449 @override |
| 8444 void visitElement(Element element) { | 8450 void visitElement(Element element) { |
| 8445 int offset = element.nameOffset; | 8451 int offset = element.nameOffset; |
| 8446 if (offset != -1) { | 8452 if (offset != -1) { |
| 8447 map[offset] = element; | 8453 map[offset] = element; |
| 8448 } | 8454 } |
| 8449 super.visitElement(element); | 8455 super.visitElement(element); |
| 8450 } | 8456 } |
| 8451 } | 8457 } |
| OLD | NEW |