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

Side by Side Diff: pkg/analysis_server/lib/src/services/search/search_engine.dart

Issue 1371463002: Record HAS_ANCESTOR relations into index. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 @override 61 @override
62 String toString() => name; 62 String toString() => name;
63 } 63 }
64 64
65 /** 65 /**
66 * The interface [SearchEngine] defines the behavior of objects that can be used 66 * The interface [SearchEngine] defines the behavior of objects that can be used
67 * to search for various pieces of information. 67 * to search for various pieces of information.
68 */ 68 */
69 abstract class SearchEngine { 69 abstract class SearchEngine {
70 /** 70 /**
71 * Returns all subtypes of the given [type].
72 *
73 * [type] - the [ClassElement] being subtyped by the found matches.
74 */
75 Future<List<SearchMatch>> searchAllSubtypes(ClassElement type);
76
77 /**
71 * Returns declarations of elements with the given name. 78 * Returns declarations of elements with the given name.
72 * 79 *
73 * [name] - the name being declared by the found matches. 80 * [name] - the name being declared by the found matches.
74 */ 81 */
75 Future<List<SearchMatch>> searchElementDeclarations(String name); 82 Future<List<SearchMatch>> searchElementDeclarations(String name);
76 83
77 /** 84 /**
78 * Returns declarations of class members with the given name. 85 * Returns declarations of class members with the given name.
79 * 86 *
80 * [name] - the name being declared by the found matches. 87 * [name] - the name being declared by the found matches.
81 */ 88 */
82 Future<List<SearchMatch>> searchMemberDeclarations(String name); 89 Future<List<SearchMatch>> searchMemberDeclarations(String name);
83 90
84 /** 91 /**
85 * Returns all resolved and unresolved qualified references to the class 92 * Returns all resolved and unresolved qualified references to the class
86 * members with given [name]. 93 * members with given [name].
87 * 94 *
88 * [name] - the name being referenced by the found matches. 95 * [name] - the name being referenced by the found matches.
89 */ 96 */
90 Future<List<SearchMatch>> searchMemberReferences(String name); 97 Future<List<SearchMatch>> searchMemberReferences(String name);
91 98
92 /** 99 /**
93 * Returns references to the given [Element]. 100 * Returns references to the given [Element].
94 * 101 *
95 * [element] - the [Element] being referenced by the found matches. 102 * [element] - the [Element] being referenced by the found matches.
96 */ 103 */
97 Future<List<SearchMatch>> searchReferences(Element element); 104 Future<List<SearchMatch>> searchReferences(Element element);
98 105
99 /** 106 /**
100 * Returns subtypes of the given [type]. 107 * Returns direct subtypes of the given [type].
101 * 108 *
102 * [type] - the [ClassElement] being subtyped by the found matches. 109 * [type] - the [ClassElement] being subtyped by the found matches.
103 */ 110 */
104 Future<List<SearchMatch>> searchSubtypes(ClassElement type); 111 Future<List<SearchMatch>> searchSubtypes(ClassElement type);
105 112
106 /** 113 /**
107 * Returns all the top-level declarations matching the given pattern. 114 * Returns all the top-level declarations matching the given pattern.
108 * 115 *
109 * [pattern] the regular expression used to match the names of the 116 * [pattern] the regular expression used to match the names of the
110 * declarations to be found. 117 * declarations to be found.
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 buffer.write(", range="); 180 buffer.write(", range=");
174 buffer.write(sourceRange); 181 buffer.write(sourceRange);
175 buffer.write(", isResolved="); 182 buffer.write(", isResolved=");
176 buffer.write(isResolved); 183 buffer.write(isResolved);
177 buffer.write(", isQualified="); 184 buffer.write(", isQualified=");
178 buffer.write(isQualified); 185 buffer.write(isQualified);
179 buffer.write(")"); 186 buffer.write(")");
180 return buffer.toString(); 187 return buffer.toString();
181 } 188 }
182 } 189 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698