OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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.completion.dart.manager; | 5 library services.completion.dart.manager; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'package:analysis_server/plugin/protocol/protocol.dart'; | 9 import 'package:analysis_server/plugin/protocol/protocol.dart'; |
10 import 'package:analysis_server/src/provisional/completion/completion_core.dart' | 10 import 'package:analysis_server/src/provisional/completion/completion_core.dart' |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 return elem.library; | 139 return elem.library; |
140 } | 140 } |
141 } | 141 } |
142 return null; | 142 return null; |
143 } | 143 } |
144 | 144 |
145 @override | 145 @override |
146 InterfaceType get objectType { | 146 InterfaceType get objectType { |
147 if (_objectType == null) { | 147 if (_objectType == null) { |
148 Source coreUri = context.sourceFactory.forUri('dart:core'); | 148 Source coreUri = context.sourceFactory.forUri('dart:core'); |
149 LibraryElement coreLib = context.getLibraryElement(coreUri); | 149 LibraryElement coreLib = context.computeLibraryElement(coreUri); |
150 _objectType = coreLib.getType('Object').type; | 150 _objectType = coreLib.getType('Object').type; |
151 } | 151 } |
152 return _objectType; | 152 return _objectType; |
153 } | 153 } |
154 | 154 |
155 @override | 155 @override |
156 Future<List<Directive>> resolveDirectives() async { | 156 Future<List<Directive>> resolveDirectives() async { |
157 CompilationUnit libUnit; | 157 CompilationUnit libUnit; |
158 if (librarySource == source) { | 158 if (librarySource == source) { |
159 libUnit = target.unit; | 159 libUnit = target.unit; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 dotTarget = node.realTarget; | 223 dotTarget = node.realTarget; |
224 } | 224 } |
225 } | 225 } |
226 if (node is PrefixedIdentifier) { | 226 if (node is PrefixedIdentifier) { |
227 if (identical(node.identifier, target.entity)) { | 227 if (identical(node.identifier, target.entity)) { |
228 dotTarget = node.prefix; | 228 dotTarget = node.prefix; |
229 } | 229 } |
230 } | 230 } |
231 } | 231 } |
232 } | 232 } |
OLD | NEW |