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

Unified Diff: pkg/analysis_server/lib/src/services/index/index.dart

Issue 1347943006: Replace NameElement with IndexableName. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/index/index_contributor.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/services/index/index.dart
diff --git a/pkg/analysis_server/lib/src/services/index/index.dart b/pkg/analysis_server/lib/src/services/index/index.dart
index 374ccaf2434896644df597c1c955517eebbd7a90..41b5a0ab9310cea8edb968b1f06c50a6b3339cca 100644
--- a/pkg/analysis_server/lib/src/services/index/index.dart
+++ b/pkg/analysis_server/lib/src/services/index/index.dart
@@ -78,8 +78,6 @@ abstract class Index implements IndexStore {
* a concrete kind of this name - field, method or something else.
*/
class IndexableName implements IndexableObject {
- // TODO(brianwilkerson) Replace NameElement with this class. This will require
- // generalizing the search engine to use IndexableObject rather than Element.
scheglov 2015/09/21 18:33:47 Actually no. NameElement is used only in searchEl
/**
* The name to be indexed.
*/
@@ -105,6 +103,10 @@ class IndexableName implements IndexableObject {
Source get source => null;
@override
+ bool operator ==(Object object) =>
+ object is IndexableName && object.name == name;
+
+ @override
String toString() => name;
}
@@ -320,20 +322,6 @@ class LocationWithData<D> extends LocationImpl {
}
/**
- * An [Element] which is used to index references to the name without specifying
- * a concrete kind of this name - field, method or something else.
- */
-class NameElement extends ElementImpl {
- NameElement(String name) : super(name, -1);
-
- @override
- ElementKind get kind => ElementKind.NAME;
-
- @override
- accept(ElementVisitor visitor) => null;
-}
-
-/**
* Relationship between an element and a location. Relationships are identified
* by a globally unique identifier.
*/
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/index/index_contributor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698