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

Unified Diff: pkg/analysis_services/lib/src/index/index_contributor.dart

Issue 382993002: SearchEngine service. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: pkg/analysis_services/lib/src/index/index_contributor.dart
diff --git a/pkg/analysis_services/lib/src/index/index_contributor.dart b/pkg/analysis_services/lib/src/index/index_contributor.dart
index 044418396e146980b9d1806b9a1519b32611558b..3a1c97e863ed2b34498326a136ece897d693f9f5 100644
--- a/pkg/analysis_services/lib/src/index/index_contributor.dart
+++ b/pkg/analysis_services/lib/src/index/index_contributor.dart
@@ -656,6 +656,10 @@ class _IndexContributor extends GeneralizingAstVisitor<Object> {
}
// prepare information
Element element = node.bestElement;
+ // TODO(scheglov) fix resolver to resolve to Field, not an accessor
+ if (node.parent is Combinator && element is PropertyAccessorElement) {
+ element = (element as PropertyAccessorElement).variable;
+ }
// qualified name reference
_recordQualifiedMemberReference(node, element, nameElement, location);
// stop if already handled
@@ -688,9 +692,11 @@ class _IndexContributor extends GeneralizingAstVisitor<Object> {
FunctionTypeAliasElement || element is LabelElement || element is
TypeParameterElement) {
recordRelationship(element, IndexConstants.IS_REFERENCED_BY, location);
- } else if (element is FieldElement) {
+ } else if (element is PropertyInducingElement) {
location = _getLocationWithInitializerType(node, location);
- recordRelationship(element, IndexConstants.IS_REFERENCED_BY, location);
+ recordRelationship(element,
+ IndexConstants.IS_REFERENCED_BY_QUALIFIED,
+ location);
} else if (element is FieldFormalParameterElement) {
FieldFormalParameterElement fieldParameter = element;
FieldElement field = fieldParameter.field;
« no previous file with comments | « pkg/analysis_services/lib/search/search_engine.dart ('k') | pkg/analysis_services/lib/src/index/store/codec.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698