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

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

Issue 1413563004: Make IndexableObjectKind parameterized. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Clean up IndexableElementKind. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analysis_server/lib/src/services/index/indexable_element.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/services/index/indexable_file.dart
diff --git a/pkg/analysis_server/lib/src/services/index/indexable_file.dart b/pkg/analysis_server/lib/src/services/index/indexable_file.dart
index 36e3eeae96a213ba55d2f12b6b5a91e3525f1c71..7babfef4a5b73f9aa3ac82665ab5f231938d8373 100644
--- a/pkg/analysis_server/lib/src/services/index/indexable_file.dart
+++ b/pkg/analysis_server/lib/src/services/index/indexable_file.dart
@@ -42,7 +42,7 @@ class IndexableFile implements IndexableObject {
/**
* The kind of an indexable file.
*/
-class IndexableFileKind implements IndexableObjectKind {
+class IndexableFileKind implements IndexableObjectKind<IndexableFile> {
/**
* The unique instance of this class.
*/
@@ -62,13 +62,13 @@ class IndexableFileKind implements IndexableObjectKind {
}
@override
- IndexableObject decode(AnalysisContext context, String filePath, int offset) {
+ IndexableFile decode(AnalysisContext context, String filePath, int offset) {
return new IndexableFile(filePath);
}
@override
- int encodeHash(StringToInt stringToInt, IndexableObject indexable) {
- String path = (indexable as IndexableFile).path;
+ int encodeHash(StringToInt stringToInt, IndexableFile indexable) {
+ String path = indexable.path;
return stringToInt(path);
}
}
« no previous file with comments | « pkg/analysis_server/lib/src/services/index/indexable_element.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698