Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(547)

Side by Side Diff: pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart

Issue 1486663003: Ensure that a complete library element has constants evaluated (issue 24890) (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated after breaking changes Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698