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.search_engine; | 5 library services.search_engine; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'package:analysis_server/src/services/index/index.dart'; | 9 import 'package:analysis_server/src/services/index/index.dart'; |
10 import 'package:analysis_server/src/services/search/search_engine_internal.dart'
; | 10 import 'package:analysis_server/src/services/search/search_engine_internal.dart'
; |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 */ | 71 */ |
72 abstract class SearchEngine { | 72 abstract class SearchEngine { |
73 /** | 73 /** |
74 * Returns all subtypes of the given [type]. | 74 * Returns all subtypes of the given [type]. |
75 * | 75 * |
76 * [type] - the [ClassElement] being subtyped by the found matches. | 76 * [type] - the [ClassElement] being subtyped by the found matches. |
77 */ | 77 */ |
78 Future<List<SearchMatch>> searchAllSubtypes(ClassElement type); | 78 Future<List<SearchMatch>> searchAllSubtypes(ClassElement type); |
79 | 79 |
80 /** | 80 /** |
81 * Returns declarations of elements with the given name. | |
82 * | |
83 * [name] - the name being declared by the found matches. | |
84 */ | |
85 Future<List<SearchMatch>> searchElementDeclarations(String name); | |
86 | |
87 /** | |
88 * Returns declarations of class members with the given name. | 81 * Returns declarations of class members with the given name. |
89 * | 82 * |
90 * [name] - the name being declared by the found matches. | 83 * [name] - the name being declared by the found matches. |
91 */ | 84 */ |
92 Future<List<SearchMatch>> searchMemberDeclarations(String name); | 85 Future<List<SearchMatch>> searchMemberDeclarations(String name); |
93 | 86 |
94 /** | 87 /** |
95 * Returns all resolved and unresolved qualified references to the class | 88 * Returns all resolved and unresolved qualified references to the class |
96 * members with given [name]. | 89 * members with given [name]. |
97 * | 90 * |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 if (element is ElementImpl) { | 260 if (element is ElementImpl) { |
268 if (element.codeOffset != null && | 261 if (element.codeOffset != null && |
269 element.codeOffset <= offset && | 262 element.codeOffset <= offset && |
270 offset <= element.codeOffset + element.codeLength) { | 263 offset <= element.codeOffset + element.codeLength) { |
271 containingElement = element; | 264 containingElement = element; |
272 super.visitElement(element); | 265 super.visitElement(element); |
273 } | 266 } |
274 } | 267 } |
275 } | 268 } |
276 } | 269 } |
OLD | NEW |