| 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 903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 914 return false; | 914 return false; |
| 915 } | 915 } |
| 916 | 916 |
| 917 /** | 917 /** |
| 918 * Return the [ClassElementImpl] of the given [classElement]. May throw an | 918 * Return the [ClassElementImpl] of the given [classElement]. May throw an |
| 919 * exception if the [ClassElementImpl] cannot be provided (should not happen | 919 * exception if the [ClassElementImpl] cannot be provided (should not happen |
| 920 * though). | 920 * though). |
| 921 */ | 921 */ |
| 922 static ClassElementImpl getImpl(ClassElement classElement) { | 922 static ClassElementImpl getImpl(ClassElement classElement) { |
| 923 if (classElement is ClassElementHandle) { | 923 if (classElement is ClassElementHandle) { |
| 924 classElement.ensureActualElementComplete(); |
| 924 return getImpl(classElement.actualElement); | 925 return getImpl(classElement.actualElement); |
| 925 } | 926 } |
| 926 return classElement as ClassElementImpl; | 927 return classElement as ClassElementImpl; |
| 927 } | 928 } |
| 928 } | 929 } |
| 929 | 930 |
| 930 /** | 931 /** |
| 931 * A concrete implementation of a [CompilationUnitElement]. | 932 * A concrete implementation of a [CompilationUnitElement]. |
| 932 */ | 933 */ |
| 933 class CompilationUnitElementImpl extends UriReferencedElementImpl | 934 class CompilationUnitElementImpl extends UriReferencedElementImpl |
| (...skipping 4103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5037 | 5038 |
| 5038 @override | 5039 @override |
| 5039 void visitElement(Element element) { | 5040 void visitElement(Element element) { |
| 5040 int offset = element.nameOffset; | 5041 int offset = element.nameOffset; |
| 5041 if (offset != -1) { | 5042 if (offset != -1) { |
| 5042 map[offset] = element; | 5043 map[offset] = element; |
| 5043 } | 5044 } |
| 5044 super.visitElement(element); | 5045 super.visitElement(element); |
| 5045 } | 5046 } |
| 5046 } | 5047 } |
| OLD | NEW |