| 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 computer.overrides; | 5 library computer.overrides; |
| 6 | 6 |
| 7 import 'package:analysis_server/src/collections.dart'; | 7 import 'package:analysis_server/src/collections.dart'; |
| 8 import 'package:analysis_server/src/protocol_server.dart'; | 8 import 'package:analysis_server/src/protocol_server.dart'; |
| 9 import 'package:analyzer/dart/element/element.dart' as engine; |
| 10 import 'package:analyzer/dart/element/type.dart' as engine; |
| 9 import 'package:analyzer/src/generated/ast.dart'; | 11 import 'package:analyzer/src/generated/ast.dart'; |
| 10 import 'package:analyzer/src/generated/element.dart' as engine; | |
| 11 | 12 |
| 12 /** | 13 /** |
| 13 * A computer for class member overrides in a Dart [CompilationUnit]. | 14 * A computer for class member overrides in a Dart [CompilationUnit]. |
| 14 */ | 15 */ |
| 15 class DartUnitOverridesComputer { | 16 class DartUnitOverridesComputer { |
| 16 static const List<ElementKind> FIELD_KINDS = const <ElementKind>[ | 17 static const List<ElementKind> FIELD_KINDS = const <ElementKind>[ |
| 17 ElementKind.FIELD, | 18 ElementKind.FIELD, |
| 18 ElementKind.GETTER, | 19 ElementKind.GETTER, |
| 19 ElementKind.SETTER | 20 ElementKind.SETTER |
| 20 ]; | 21 ]; |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 if (kinds.contains(ElementKind.SETTER)) { | 167 if (kinds.contains(ElementKind.SETTER)) { |
| 167 member = classElement.lookUpSetter(name + '=', library); | 168 member = classElement.lookUpSetter(name + '=', library); |
| 168 if (member != null) { | 169 if (member != null) { |
| 169 return member; | 170 return member; |
| 170 } | 171 } |
| 171 } | 172 } |
| 172 // not found | 173 // not found |
| 173 return null; | 174 return null; |
| 174 } | 175 } |
| 175 } | 176 } |
| OLD | NEW |