| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 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 | 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_store; | 5 library services.index_store; |
| 6 | 6 |
| 7 import 'package:analysis_server/analysis/index/index_core.dart'; | 7 import 'package:analysis_server/analysis/index/index_core.dart'; |
| 8 import 'package:analysis_server/src/services/index/index.dart'; | 8 import 'package:analysis_server/src/services/index/index.dart'; |
| 9 import 'package:analyzer/src/generated/element.dart'; | 9 import 'package:analyzer/src/generated/element.dart'; |
| 10 import 'package:analyzer/src/generated/engine.dart'; | 10 import 'package:analyzer/src/generated/engine.dart'; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 * | 44 * |
| 45 * [context] - the [AnalysisContext] in which unit being indexed. | 45 * [context] - the [AnalysisContext] in which unit being indexed. |
| 46 * [htmlElement] - the [HtmlElement] being indexed. | 46 * [htmlElement] - the [HtmlElement] being indexed. |
| 47 * | 47 * |
| 48 * Returns `true` if the given [htmlElement] may be indexed, or `false` if | 48 * Returns `true` if the given [htmlElement] may be indexed, or `false` if |
| 49 * belongs to a disposed [AnalysisContext], is not resolved completely, etc. | 49 * belongs to a disposed [AnalysisContext], is not resolved completely, etc. |
| 50 */ | 50 */ |
| 51 bool aboutToIndexHtml(AnalysisContext context, HtmlElement htmlElement); | 51 bool aboutToIndexHtml(AnalysisContext context, HtmlElement htmlElement); |
| 52 | 52 |
| 53 /** | 53 /** |
| 54 * Notifies that index store that the current Dart or HTML unit indexing is | 54 * Notifies the index store that there was an error during the current Dart |
| 55 * indexing, and all the information recorded after the last |
| 56 * [aboutToIndexDart] invocation must be discarded. |
| 57 */ |
| 58 void cancelIndexDart(); |
| 59 |
| 60 /** |
| 61 * Notifies the index store that the current Dart or HTML unit indexing is |
| 55 * done. | 62 * done. |
| 56 * | 63 * |
| 57 * If this method is not invoked after corresponding "aboutToIndex*" | 64 * If this method is not invoked after corresponding "aboutToIndex*" |
| 58 * invocation, all recorded information may be lost. | 65 * invocation, all recorded information may be lost. |
| 59 */ | 66 */ |
| 60 void doneIndex(); | 67 void doneIndex(); |
| 61 | 68 |
| 62 /** | 69 /** |
| 63 * Returns top-level [Element]s whose names satisfy to [nameFilter]. | 70 * Returns top-level [Element]s whose names satisfy to [nameFilter]. |
| 64 */ | 71 */ |
| 65 List<Element> getTopLevelDeclarations(ElementNameFilter nameFilter); | 72 List<Element> getTopLevelDeclarations(ElementNameFilter nameFilter); |
| 66 | 73 |
| 67 /** | 74 /** |
| 68 * Records the declaration of the given top-level [element]. | 75 * Records the declaration of the given top-level [element]. |
| 69 */ | 76 */ |
| 70 void recordTopLevelDeclaration(Element element); | 77 void recordTopLevelDeclaration(Element element); |
| 71 } | 78 } |
| OLD | NEW |