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

Side by Side Diff: pkg/analyzer/lib/src/generated/element.dart

Issue 1372673003: Use Element.nameLength where possible. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 months 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) 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 engine.element; 5 library engine.element;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/src/generated/utilities_general.dart'; 9 import 'package:analyzer/src/generated/utilities_general.dart';
10 import 'package:analyzer/src/task/dart.dart'; 10 import 'package:analyzer/src/task/dart.dart';
(...skipping 8448 matching lines...) Expand 10 before | Expand all | Expand 10 after
8459 @override 8459 @override
8460 ElementLocation get location => null; 8460 ElementLocation get location => null;
8461 8461
8462 @override 8462 @override
8463 List<ElementAnnotation> get metadata => ElementAnnotation.EMPTY_LIST; 8463 List<ElementAnnotation> get metadata => ElementAnnotation.EMPTY_LIST;
8464 8464
8465 @override 8465 @override
8466 String get name => _name; 8466 String get name => _name;
8467 8467
8468 @override 8468 @override
8469 int get nameLength => name != null ? name.length : 0; 8469 int get nameLength => displayName != null ? displayName.length : 0;
8470 8470
8471 @override 8471 @override
8472 int get nameOffset => -1; 8472 int get nameOffset => -1;
8473 8473
8474 @deprecated 8474 @deprecated
8475 @override 8475 @override
8476 AstNode get node => null; 8476 AstNode get node => null;
8477 8477
8478 @override 8478 @override
8479 Source get source => null; 8479 Source get source => null;
(...skipping 2325 matching lines...) Expand 10 before | Expand all | Expand 10 after
10805 10805
10806 @override 10806 @override
10807 void visitElement(Element element) { 10807 void visitElement(Element element) {
10808 int offset = element.nameOffset; 10808 int offset = element.nameOffset;
10809 if (offset != -1) { 10809 if (offset != -1) {
10810 map[offset] = element; 10810 map[offset] = element;
10811 } 10811 }
10812 super.visitElement(element); 10812 super.visitElement(element);
10813 } 10813 }
10814 } 10814 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/services/index/dart_index_contributor_test.dart ('k') | pkg/analyzer/lib/src/generated/error.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698