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

Side by Side Diff: pkg/analysis_server/lib/src/services/index/index_contributor.dart

Issue 1378843003: Remove the 'name' and 'length' getters from IndexableObject. (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 services.src.index.index_contributor; 5 library services.src.index.index_contributor;
6 6
7 import 'dart:collection' show Queue; 7 import 'dart:collection' show Queue;
8 8
9 import 'package:analysis_server/analysis/index_core.dart'; 9 import 'package:analysis_server/analysis/index_core.dart';
10 import 'package:analysis_server/src/services/correction/namespace.dart'; 10 import 'package:analysis_server/src/services/correction/namespace.dart';
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 } 771 }
772 } 772 }
773 } 773 }
774 774
775 /** 775 /**
776 * Records the [Element] definition in the library and universe. 776 * Records the [Element] definition in the library and universe.
777 */ 777 */
778 void _recordTopLevelElementDefinition(Element element) { 778 void _recordTopLevelElementDefinition(Element element) {
779 if (element != null) { 779 if (element != null) {
780 IndexableElement indexable = new IndexableElement(element); 780 IndexableElement indexable = new IndexableElement(element);
781 int offset = indexable.offset; 781 int offset = element.nameOffset;
782 int length = indexable.length; 782 int length = element.nameLength;
783 LocationImpl location = new LocationImpl(indexable, offset, length); 783 LocationImpl location = new LocationImpl(indexable, offset, length);
784 recordRelationshipElement( 784 recordRelationshipElement(
785 _libraryElement, IndexConstants.DEFINES, location); 785 _libraryElement, IndexConstants.DEFINES, location);
786 _store.recordTopLevelDeclaration(element); 786 _store.recordTopLevelDeclaration(element);
787 } 787 }
788 } 788 }
789 789
790 /** 790 /**
791 * If the given expression has resolved type, returns the new location with th is type. 791 * If the given expression has resolved type, returns the new location with th is type.
792 * 792 *
(...skipping 17 matching lines...) Expand all
810 } 810 }
811 811
812 /** 812 /**
813 * @return `true` if given "node" is part of [PrefixedIdentifier] "prefix.node ". 813 * @return `true` if given "node" is part of [PrefixedIdentifier] "prefix.node ".
814 */ 814 */
815 static bool _isIdentifierInPrefixedIdentifier(SimpleIdentifier node) { 815 static bool _isIdentifierInPrefixedIdentifier(SimpleIdentifier node) {
816 AstNode parent = node.parent; 816 AstNode parent = node.parent;
817 return parent is PrefixedIdentifier && parent.identifier == node; 817 return parent is PrefixedIdentifier && parent.identifier == node;
818 } 818 }
819 } 819 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698