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

Side by Side Diff: pkg/analyzer/lib/src/summary/link.dart

Issue 2527523002: Implement 'displayName' for accessor and varaible elements in linker. (Closed)
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 /** 5 /**
6 * This library is capable of producing linked summaries from unlinked 6 * This library is capable of producing linked summaries from unlinked
7 * ones (or prelinked ones). It functions by building a miniature 7 * ones (or prelinked ones). It functions by building a miniature
8 * element model to represent the contents of the summaries, and then 8 * element model to represent the contents of the summaries, and then
9 * scanning the element model to gather linked information and adding 9 * scanning the element model to gather linked information and adding
10 * it to the summary data structures. 10 * it to the summary data structures.
(...skipping 4333 matching lines...) Expand 10 before | Expand all | Expand 10 after
4344 @override 4344 @override
4345 ConstVariableNode get asConstVariable => variable._constNode; 4345 ConstVariableNode get asConstVariable => variable._constNode;
4346 4346
4347 @override 4347 @override
4348 DartType get asStaticType => returnType; 4348 DartType get asStaticType => returnType;
4349 4349
4350 @override 4350 @override
4351 TypeInferenceNode get asTypeInferenceNode => variable._typeInferenceNode; 4351 TypeInferenceNode get asTypeInferenceNode => variable._typeInferenceNode;
4352 4352
4353 @override 4353 @override
4354 String get displayName => variable.displayName;
4355
4356 @override
4354 Element get enclosingElement => variable.enclosingElement; 4357 Element get enclosingElement => variable.enclosingElement;
4355 4358
4356 @override 4359 @override
4357 bool get isGetter => !isSetter; 4360 bool get isGetter => !isSetter;
4358 4361
4359 @override 4362 @override
4360 bool get isStatic => variable.isStatic; 4363 bool get isStatic => variable.isStatic;
4361 4364
4362 @override 4365 @override
4363 bool get isSynthetic => true; 4366 bool get isSynthetic => true;
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
4994 DartType get declaredType { 4997 DartType get declaredType {
4995 if (unlinkedVariable.type == null) { 4998 if (unlinkedVariable.type == null) {
4996 return null; 4999 return null;
4997 } else { 5000 } else {
4998 return _declaredType ??= compilationUnit.resolveTypeRef( 5001 return _declaredType ??= compilationUnit.resolveTypeRef(
4999 unlinkedVariable.type, _typeParameterContext); 5002 unlinkedVariable.type, _typeParameterContext);
5000 } 5003 }
5001 } 5004 }
5002 5005
5003 @override 5006 @override
5007 String get displayName => unlinkedVariable.name;
5008
5009 @override
5004 PropertyAccessorElementForLink_Variable get getter => 5010 PropertyAccessorElementForLink_Variable get getter =>
5005 _getter ??= new PropertyAccessorElementForLink_Variable(this, false); 5011 _getter ??= new PropertyAccessorElementForLink_Variable(this, false);
5006 5012
5007 @override 5013 @override
5008 bool get hasImplicitType => unlinkedVariable.type == null; 5014 bool get hasImplicitType => unlinkedVariable.type == null;
5009 5015
5010 @override 5016 @override
5011 String get identifier => unlinkedVariable.name; 5017 String get identifier => unlinkedVariable.name;
5012 5018
5013 /** 5019 /**
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
5090 * there are no type parameters in scope. 5096 * there are no type parameters in scope.
5091 */ 5097 */
5092 TypeParameterizedElementMixin get _typeParameterContext; 5098 TypeParameterizedElementMixin get _typeParameterContext;
5093 5099
5094 @override 5100 @override
5095 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); 5101 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
5096 5102
5097 @override 5103 @override
5098 String toString() => '$enclosingElement.$name'; 5104 String toString() => '$enclosingElement.$name';
5099 } 5105 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698