| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 library services.index_store; | |
| 6 | |
| 7 import 'package:analysis_server/src/provisional/index/index_core.dart'; | |
| 8 import 'package:analysis_server/src/services/index/index.dart'; | |
| 9 import 'package:analyzer/dart/element/element.dart'; | |
| 10 import 'package:analyzer/src/generated/engine.dart'; | |
| 11 | |
| 12 /** | |
| 13 * A container with information computed by an index - relations between | |
| 14 * elements. | |
| 15 */ | |
| 16 abstract class InternalIndexStore extends IndexStore { | |
| 17 /** | |
| 18 * Answers index statistics. | |
| 19 */ | |
| 20 String get statistics; | |
| 21 | |
| 22 /** | |
| 23 * Notifies the index store that we are going to index the given [object]. | |
| 24 * | |
| 25 * [context] - the [AnalysisContext] in which the [object] being indexed. | |
| 26 * [object] - the object being indexed. | |
| 27 * | |
| 28 * Returns `true` if the given [object] may be indexed, or `false` if | |
| 29 * belongs to a disposed [AnalysisContext], is not resolved completely, etc. | |
| 30 */ | |
| 31 bool aboutToIndex(AnalysisContext context, Object object); | |
| 32 | |
| 33 /** | |
| 34 * Notifies the index store that there was an error during the current | |
| 35 * indexing, and all the information recorded after the last | |
| 36 * [aboutToIndex] invocation must be discarded. | |
| 37 */ | |
| 38 void cancelIndex(); | |
| 39 | |
| 40 /** | |
| 41 * Notifies the index store that the current object indexing is done. | |
| 42 * | |
| 43 * If this method is not invoked after corresponding [aboutToIndex] | |
| 44 * invocation, all recorded information may be lost. | |
| 45 */ | |
| 46 void doneIndex(); | |
| 47 | |
| 48 /** | |
| 49 * Returns top-level [Element]s whose names satisfy to [nameFilter]. | |
| 50 */ | |
| 51 List<Element> getTopLevelDeclarations(ElementNameFilter nameFilter); | |
| 52 | |
| 53 /** | |
| 54 * Records the declaration of the given top-level [element]. | |
| 55 */ | |
| 56 void recordTopLevelDeclaration(Element element); | |
| 57 } | |
| OLD | NEW |