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

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

Issue 975753002: Some clean-ups for Index / SearchEngine. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/index/index_store.dart » ('j') | 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) 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/src/services/correction/namespace.dart'; 9 import 'package:analysis_server/src/services/correction/namespace.dart';
10 import 'package:analysis_server/src/services/index/index.dart'; 10 import 'package:analysis_server/src/services/index/index.dart';
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 } 737 }
738 } 738 }
739 } 739 }
740 740
741 /** 741 /**
742 * Records the [Element] definition in the library and universe. 742 * Records the [Element] definition in the library and universe.
743 */ 743 */
744 void _recordTopLevelElementDefinition(Element element) { 744 void _recordTopLevelElementDefinition(Element element) {
745 Location location = createLocation(element); 745 Location location = createLocation(element);
746 recordRelationship(_libraryElement, IndexConstants.DEFINES, location); 746 recordRelationship(_libraryElement, IndexConstants.DEFINES, location);
747 _store.recordTopDeclaration(element); 747 _store.recordTopLevelDeclaration(element);
748 } 748 }
749 749
750 /** 750 /**
751 * Creates a [Location] representing declaration of the [Element]. 751 * Creates a [Location] representing declaration of the [Element].
752 */ 752 */
753 static Location createLocation(Element element) { 753 static Location createLocation(Element element) {
754 if (element != null) { 754 if (element != null) {
755 int offset = element.nameOffset; 755 int offset = element.nameOffset;
756 int length = element.displayName.length; 756 int length = element.displayName.length;
757 return new Location(element, offset, length); 757 return new Location(element, offset, length);
(...skipping 24 matching lines...) Expand all
782 } 782 }
783 783
784 /** 784 /**
785 * @return `true` if given "node" is part of [PrefixedIdentifier] "prefix.node ". 785 * @return `true` if given "node" is part of [PrefixedIdentifier] "prefix.node ".
786 */ 786 */
787 static bool _isIdentifierInPrefixedIdentifier(SimpleIdentifier node) { 787 static bool _isIdentifierInPrefixedIdentifier(SimpleIdentifier node) {
788 AstNode parent = node.parent; 788 AstNode parent = node.parent;
789 return parent is PrefixedIdentifier && parent.identifier == node; 789 return parent is PrefixedIdentifier && parent.identifier == node;
790 } 790 }
791 } 791 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/index/index_store.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698