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

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

Issue 1385403007: Fix for renaming (an invalid) ClassElement invocation. (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
« no previous file with comments | « no previous file | pkg/analysis_server/test/services/index/dart_index_contributor_test.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/plugin/index/index_core.dart'; 9 import 'package:analysis_server/plugin/index/index_core.dart';
10 import 'package:analysis_server/src/services/correction/namespace.dart'; 10 import 'package:analysis_server/src/services/correction/namespace.dart';
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 recordRelationshipIndexable( 354 recordRelationshipIndexable(
355 new IndexableName(name.name), IndexConstants.IS_INVOKED_BY, location); 355 new IndexableName(name.name), IndexConstants.IS_INVOKED_BY, location);
356 // element invocation 356 // element invocation
357 Element element = name.bestElement; 357 Element element = name.bestElement;
358 if (element is MethodElement || 358 if (element is MethodElement ||
359 element is PropertyAccessorElement || 359 element is PropertyAccessorElement ||
360 element is FunctionElement || 360 element is FunctionElement ||
361 element is VariableElement) { 361 element is VariableElement) {
362 recordRelationshipElement( 362 recordRelationshipElement(
363 element, IndexConstants.IS_INVOKED_BY, location); 363 element, IndexConstants.IS_INVOKED_BY, location);
364 } else if (element is ClassElement) {
365 recordRelationshipElement(
366 element, IndexConstants.IS_REFERENCED_BY, location);
364 } 367 }
365 _recordImportElementReferenceWithoutPrefix(name); 368 _recordImportElementReferenceWithoutPrefix(name);
366 super.visitMethodInvocation(node); 369 super.visitMethodInvocation(node);
367 } 370 }
368 371
369 @override 372 @override
370 visitPartDirective(PartDirective node) { 373 visitPartDirective(PartDirective node) {
371 Element element = node.element; 374 Element element = node.element;
372 LocationImpl location = _createLocationForNode(node.uri); 375 LocationImpl location = _createLocationForNode(node.uri);
373 recordRelationshipElement( 376 recordRelationshipElement(
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 } 813 }
811 814
812 /** 815 /**
813 * @return `true` if given "node" is part of [PrefixedIdentifier] "prefix.node ". 816 * @return `true` if given "node" is part of [PrefixedIdentifier] "prefix.node ".
814 */ 817 */
815 static bool _isIdentifierInPrefixedIdentifier(SimpleIdentifier node) { 818 static bool _isIdentifierInPrefixedIdentifier(SimpleIdentifier node) {
816 AstNode parent = node.parent; 819 AstNode parent = node.parent;
817 return parent is PrefixedIdentifier && parent.identifier == node; 820 return parent is PrefixedIdentifier && parent.identifier == node;
818 } 821 }
819 } 822 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/test/services/index/dart_index_contributor_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698