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

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

Issue 1471073002: Make index provisional API. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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.index.indexable_file; 5 library services.index.indexable_file;
6 6
7 import 'package:analysis_server/plugin/index/index_core.dart'; 7 import 'package:analysis_server/src/provisional/index/index_core.dart';
8 import 'package:analyzer/src/generated/engine.dart'; 8 import 'package:analyzer/src/generated/engine.dart';
9 9
10 /** 10 /**
11 * An [IndexableObject] which is used to index references to a file. 11 * An [IndexableObject] which is used to index references to a file.
12 */ 12 */
13 class IndexableFile implements IndexableObject { 13 class IndexableFile implements IndexableObject {
14 /** 14 /**
15 * The path of the file to be indexed. 15 * The path of the file to be indexed.
16 */ 16 */
17 @override 17 @override
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 IndexableFile decode(AnalysisContext context, String filePath, int offset) { 65 IndexableFile decode(AnalysisContext context, String filePath, int offset) {
66 return new IndexableFile(filePath); 66 return new IndexableFile(filePath);
67 } 67 }
68 68
69 @override 69 @override
70 int encodeHash(StringToInt stringToInt, IndexableFile indexable) { 70 int encodeHash(StringToInt stringToInt, IndexableFile indexable) {
71 String path = indexable.path; 71 String path = indexable.path;
72 return stringToInt(path); 72 return stringToInt(path);
73 } 73 }
74 } 74 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698