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

Side by Side Diff: editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/AnalysisServer.java

Issue 460423003: Get the RemoteAnalysisServer to compile against the new generated AnalysisServer interface. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014, the Dart project authors. 2 * Copyright (c) 2014, the Dart project authors.
3 * 3 *
4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u se this file except 4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u se this file except
5 * in compliance with the License. You may obtain a copy of the License at 5 * in compliance with the License. You may obtain a copy of the License at
6 * 6 *
7 * http://www.eclipse.org/legal/epl-v10.html 7 * http://www.eclipse.org/legal/epl-v10.html
8 * 8 *
9 * Unless required by applicable law or agreed to in writing, software distribut ed under the License 9 * Unless required by applicable law or agreed to in writing, software distribut ed under the License
10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K IND, either express 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K IND, either express
11 * or implied. See the License for the specific language governing permissions a nd limitations under 11 * or implied. See the License for the specific language governing permissions a nd limitations under
12 * the License. 12 * the License.
13 *
14 * This file has been automatically generated. Please do not edit it manually.
15 * To regenerate the file, use the script "pkg/analysis_server/spec/generate_fil es".
13 */ 16 */
14 package com.google.dart.server; 17 package com.google.dart.server;
15 18
16 import java.util.List; 19 import java.util.List;
17 import java.util.Map; 20 import java.util.Map;
18 21
19 /** 22 /**
20 * The interface {@code AnalysisServer} defines the behavior of objects that int erface to an 23 * The interface {@code AnalysisServer} defines the behavior of objects that int erface to an
21 * analysis server. 24 * analysis server.
22 * 25 *
23 * @coverage dart.server 26 * @coverage dart.server
24 */ 27 */
25 public interface AnalysisServer { 28 public interface AnalysisServer {
26 29
27 /** 30 /**
28 * Add the given listener to the list of listeners that will receive notificat ion when new 31 * Add the given listener to the list of listeners that will receive notificat ion when new
29 * analysis results become available. 32 * analysis results become available.
30 * 33 *
31 * @param listener the listener to be added 34 * @param listener the listener to be added
32 */ 35 */
33 public void addAnalysisServerListener(AnalysisServerListener listener); 36 public void addAnalysisServerListener(AnalysisServerListener listener);
34 37
35 /** 38 /**
36 * Performs the final validation and computes a change to apply the specific r efactoring. This 39 * {@code analysis.getErrors}
37 * method may be invoked several times, for example after changing options usi ng 40 *
38 * {@link #setRefactoringExtractLocalOptions(String, boolean, String)}. When d one,
39 * {@link #deleteRefactoring(String)} should be invoked.
40 *
41 * @param refactoringId the identifier of the refactoring to apply
42 * @param consumer the results listener
43 */
44 public void applyRefactoring(String refactoringId, RefactoringApplyConsumer co nsumer);
45
46 /**
47 * Create a debugging context for the executable file with the given path. The context that is
48 * created will persist until debug.deleteContext is used to delete it. Client s, therefore, are
49 * responsible for managing the lifetime of debugging contexts.
50 *
51 * @param contextRoot the path of the Dart or HTML file that will be launched
52 * @param consumer the results listener
53 */
54 public void createDebugContext(String contextRoot, DebugCreateContextConsumer consumer);
55
56 /**
57 * Create a refactoring operation that can be applied at a later time. The ope ration that is
58 * created will persist until either {@code edit.applyRefactoring} or
59 * {@code edit.deleteRefactoring} is used to delete it. Clients, therefore, ar e responsible for
60 * managing the lifetime of refactoring operations.
61 *
62 * @param refactoringKind the refactoring kind
63 * @param file the file to create refactoring within
64 * @param offset the offset within the file
65 * @param length the length of the selected code within the file
66 * @param consumer the results listener
67 */
68 public void createRefactoring(String refactoringKind, String file, int offset, int length,
69 RefactoringCreateConsumer consumer);
70
71 /**
72 * Delete the debugging context with the given identifier. The context id is n o longer valid after
73 * this command. The server is allowed to re-use ids when they are no longer v alid.
74 *
75 * @param contextRoot the path of the Dart or HTML file that will be launched
76 * @param consumer the results listener
77 */
78 public void deleteDebugContext(String id);
79
80 /**
81 * Delete the refactoring with the given id. Future attempts to use the refact oring id will result
82 * in an error being returned.
83 *
84 * @param refactoringId the identifier of the refactoring to be deleted
85 */
86 public void deleteRefactoring(String refactoringId);
87
88 /**
89 * Computes the set of assists that are available at the given location. An as sist is
90 * distinguished from a refactoring primarily by the fact that it affects a si ngle file and does
91 * not require user input in order to be performed. The given consumer is invo ked asynchronously
92 * on a different thread.
93 *
94 * @param file the file containing the range for which assists are being reque sted
95 * @param offset the offset of the code for which assists are being requested
96 * @param length the length of the code for which assists are being requested
97 * @param consumer the results listener
98 */
99 public void getAssists(String file, int offset, int length, AssistsConsumer co nsumer);
100
101 /**
102 * Computes code completion id for the given position in the file. The given c onsumer is invoked
103 * asynchronously on a different thread.
104 *
105 * @param file the file containing the point at which suggestions are to be ma de
106 * @param offset the offset within the {@code source}
107 * @param consumer the results listener
108 */
109 public void getCompletionSuggestions(String file, int offset, CompletionIdCons umer consumer);
110
111 /**
112 * Return the errors associated with the given file. If the errors for the giv en file have not yet 41 * Return the errors associated with the given file. If the errors for the giv en file have not yet
113 * been computed, or the most recently computed errors for the given file are out of date, then 42 * been computed, or the most recently computed errors for the given file are out of date, then the
114 * the response for this request will be delayed until they have been computed . If some or all of 43 * response for this request will be delayed until they have been computed. If some or all of the
115 * the errors for the file cannot be computed, then the subset of the errors t hat can be computed 44 * errors for the file cannot be computed, then the subset of the errors that can be computed will
116 * will be returned and the response will contain an error to indicate why the errors could not be 45 * be returned and the response will contain an error to indicate why the erro rs could not be
117 * computed. 46 * computed.
118 * <p> 47 *
119 * This request is intended to be used by clients that cannot asynchronously a pply updated error 48 * This request is intended to be used by clients that cannot asynchronously a pply updated error
120 * information. Clients that <b>can</b> apply error information as it becomes available should use 49 * information. Clients that can apply error information as it becomes availab le should use the
121 * the information provided by the 'analysis.errors' notification. 50 * information provided by the 'analysis.errors' notification.
122 * 51 *
123 * @param file the file for which errors are being requested 52 * @param file The file for which errors are being requested.
124 * @param consumer the errors consumer 53 */
125 */ 54 public void analysis_getErrors(String file, GetErrorsConsumer consumer);
126 public void getErrors(String file, AnalysisErrorsConsumer consumer); 55
127 56 /**
128 /** 57 * {@code analysis.getHover}
129 * Return the set of fixes that are available for the errors at a given offset in a given file. 58 *
130 * 59 * Return the hover information associate with the given location. If some or all of the hover
131 * @param file the file in which hover text is being requested 60 * information is not available at the time this request is processed the info rmation will be
132 * @param offset the offset in the source used to determine hover text 61 * omitted from the response.
133 * @param consumer the results listener 62 *
134 */ 63 * @param file The file in which hover information is being requested.
135 public void getFixes(String file, int offset, FixesConsumer consumer); 64 * @param offset The offset for which hover information is being requested.
136 65 */
137 /** 66 public void analysis_getHover(String file, int offset, GetHoverConsumer consum er);
138 * Computes the hover text to be displayed at the given location. The given co nsumer is invoked 67
139 * asynchronously on a different thread. 68 /**
140 * 69 * {@code analysis.reanalyze}
141 * @param file the file in which hover text is being requested 70 *
142 * @param offset the offset in the source used to determine hover text
143 * @param consumer the results listener
144 */
145 public void getHover(String file, int offset, HoverConsumer consumer);
146
147 /**
148 * Get a list of the kinds of refactorings that are valid for the given select ion in the given
149 * file.
150 *
151 * @param file the file containing the code on which the refactoring would be based
152 * @param offset the offset of the code on which the refactoring would be base d
153 * @param length the length of the code on which the refactoring would be base d
154 * @param consumer the results listener
155 */
156 public void getRefactorings(String file, int offset, int length, RefactoringGe tConsumer consumer);
157
158 /**
159 * Computes a type hierarchy at the given location. The given consumer is invo ked asynchronously
160 * on a different thread.
161 *
162 * @param file the file in which hierarchy is being requested
163 * @param offset the offset at which hierarchy is being requested
164 * @param consumer the results listener
165 */
166 public void getTypeHierarchy(String file, int offset, TypeHierarchyConsumer co nsumer);
167
168 /**
169 * Return the version number of the analysis server.
170 *
171 * @param consumer the results listener
172 */
173 public void getVersion(VersionConsumer consumer);
174
175 /**
176 * Map a URI from the debugging context to the file that it corresponds to, or map a file to the
177 * URI that it corresponds to in the debugging context.
178 * <p>
179 * Exactly one of the file and uri fields must be provided.
180 *
181 * @param id the identifier of the debugging context in which the URI is to be mapped
182 * @param file the path of the file to be mapped into a URI
183 * @param uri the URI to be mapped into a file path
184 * @param consumer the results listener
185 */
186 public void mapUri(String id, String file, String uri, MapUriConsumer consumer );
187
188 /**
189 * Force the re-analysis of everything contained in the existing analysis root s. This will cause 71 * Force the re-analysis of everything contained in the existing analysis root s. This will cause
190 * all previously computed analysis results to be discarded and recomputed, an d will cause all 72 * all previously computed analysis results to be discarded and recomputed, an d will cause all
191 * subscribed notifications to be re-sent. 73 * subscribed notifications to be re-sent.
192 */ 74 */
193 public void reanalyze(); 75 public void analysis_reanalyze();
194 76
195 /** 77 /**
196 * Remove the given listener from the list of listeners that will receive noti fication when new 78 * {@code analysis.setAnalysisRoots}
197 * analysis results become available. 79 *
198 *
199 * @param listener the listener to be removed
200 */
201 public void removeAnalysisServerListener(AnalysisServerListener listener);
202
203 /**
204 * Searches for declarations of class members with the given name. The given c onsumer is invoked
205 * asynchronously on a different thread.
206 *
207 * @param name the name of a member
208 * @param consumer the search id consumer
209 */
210 public void searchClassMemberDeclarations(String name, SearchIdConsumer consum er);
211
212 /**
213 * Searches for resolved and unresolved references to class members with the g iven name. The given
214 * consumer is invoked asynchronously on a different thread.
215 *
216 * @param name the name of a member
217 * @param consumer the search id consumer
218 */
219 public void searchClassMemberReferences(String name, SearchIdConsumer consumer );
220
221 /**
222 * Perform a search for references to the element defined or referenced at the given offset in the
223 * given file.
224 * <p>
225 * If the element is a class member, then also references to all corresponding members in the
226 * class hierarchy are searched.
227 * <p>
228 * If the element is a class member and {@code includePotential} is {@code tru e}, then potential
229 * references should also be reported.
230 * <p>
231 * The given consumer is invoked asynchronously on a different thread.
232 *
233 * @param file the file containing the declaration of or a reference to the el ement used to define
234 * the search
235 * @param offset the offset within the file of the declaration of or reference to the element
236 * @param includePotential is {@code true} if potential matches are to be incl uded in the results
237 * @param consumer the search id consumer
238 */
239 public void searchElementReferences(String file, int offset, boolean includePo tential,
240 SearchIdConsumer consumer);
241
242 /**
243 * Searches the given context for declarations of top-level elements with name s matching the given
244 * pattern. The given consumer is invoked asynchronously on a different thread .
245 *
246 * @param pattern the regular expression to match names against, not {@code nu ll}
247 * @param consumer the search id consumer
248 */
249 public void searchTopLevelDeclarations(String pattern, SearchIdConsumer consum er);
250
251 /**
252 * Sets the root paths used to determine which files to analyze. The set of fi les to be analyzed 80 * Sets the root paths used to determine which files to analyze. The set of fi les to be analyzed
253 * are all of the files in one of the included paths that are not also in one of the excluded 81 * are all of the files in one of the root paths that are not also in one of t he excluded paths.
254 * paths. 82 *
255 * 83 * Note that this request determines the set of requested analysis roots. The actual set of
256 * @param includedPaths a list of the files and directories that should be ana lyzed 84 * analysis roots at any given time is the intersection of this set with the s et of files and
257 * @param excludedPaths a list of the files and directories within the include d directories that 85 * directories actually present on the filesystem. When the filesystem changes , the actual set of
258 * should <em>not</em> be analyzed 86 * analysis roots is automatically updated, but the set of requested analysis roots is unchanged.
259 */ 87 * This means that if the client sets an analysis root before the root becomes visible to server in
260 public void setAnalysisRoots(List<String> includedPaths, List<String> excluded Paths); 88 * the filesystem, there is no error; once the server sees the root in the fil esystem it will start
261 89 * analyzing it. Similarly, server will stop analyzing files that are removed from the file system
262 /** 90 * but they will remain in the set of requested roots.
91 *
92 * If an included path represents a file, then server will look in the directo ry containing the
93 * file for a pubspec.yaml file. If none is found, then the parents of the dir ectory will be
94 * searched until such a file is found or the root of the file system is reach ed. If such a file is
95 * found, it will be used to resolve package: URI’s within the file.
96 *
97 * @param included A list of the files and directories that should be analyzed .
98 * @param excluded A list of the files and directories within the included dir ectories that should
99 * not be analyzed.
100 */
101 public void analysis_setAnalysisRoots(List<String> included, List<String> excl uded);
102
103 /**
104 * {@code analysis.setPriorityFiles}
105 *
106 * Set the priority files to the files in the given list. A priority file is a file that is given
107 * priority when scheduling which analysis work to do first. The list typicall y contains those
108 * files that are visible to the user and those for which analysis results wil l have the biggest
109 * impact on the user experience. The order of the files within the list is si gnificant: the first
110 * file will be given higher priority than the second, the second higher prior ity than the third,
111 * and so on.
112 *
113 * Note that this request determines the set of requested priority files. The actual set of
114 * priority files is the intersection of the requested set of priority files w ith the set of files
115 * currently subject to analysis. (See analysis.setSubscriptions for a descrip tion of files that
116 * are subject to analysis.)
117 *
118 * If a requested priority file is a directory it is ignored, but remains in t he set of requested
119 * priority files so that if it later becomes a file it can be included in the set of actual
120 * priority files.
121 *
122 * @param files The files that are to be a priority for analysis.
123 */
124 public void analysis_setPriorityFiles(List<String> files);
125
126 /**
127 * {@code analysis.setSubscriptions}
128 *
263 * Subscribe for services. All previous subscriptions are replaced by the curr ent set of 129 * Subscribe for services. All previous subscriptions are replaced by the curr ent set of
264 * subscriptions. If a given service is not included as a key in the map then no files will be 130 * subscriptions. If a given service is not included as a key in the map then no files will be
265 * subscribed to the service, exactly as if the service had been included in t he map with an 131 * subscribed to the service, exactly as if the service had been included in t he map with an
266 * explicit empty list of files. 132 * explicit empty list of files.
267 * 133 *
268 * @param subscriptions a list of the services being subscribed to. 134 * Note that this request determines the set of requested subscriptions. The a ctual set of
269 */ 135 * subscriptions at any given time is the intersection of this set with the se t of files currently
270 public void setAnalysisSubscriptions(Map<AnalysisService, List<String>> subscr iptions); 136 * subject to analysis. The files currently subject to analysis are the set of files contained
271 137 * within an actual analysis root but not excluded, plus all of the files tran sitively reachable
272 /** 138 * from those files via import, export and part directives. (See analysis.setA nalysisRoots for an
139 * explanation of how the actual analysis roots are determined.) When the actu al analysis roots
140 * change, the actual set of subscriptions is automatically updated, but the s et of requested
141 * subscriptions is unchanged.
142 *
143 * If a requested subscription is a directory it is ignored, but remains in th e set of requested
144 * subscriptions so that if it later becomes a file it can be included in the set of actual
145 * subscriptions.
146 *
147 * It is an error if any of the keys in the map are not valid services. If the re is an error, then
148 * the existing subscriptions will remain unchanged.
149 *
150 * @param subscriptions A table mapping services to a list of the files being subscribed to the
151 * service.
152 */
153 public void analysis_setSubscriptions(Map<String, List<String>> subscriptions) ;
154
155 /**
156 * {@code analysis.updateContent}
157 *
158 * Update the content of one or more files. Files that were previously updated but not included in
159 * this update remain unchanged. This effectively represents an overlay of the filesystem. The
160 * files whose content is overridden are therefore seen by server as being fil es with the given
161 * content, even if the files do not exist on the filesystem or if the file pa th represents the
162 * path to a directory on the filesystem.
163 *
164 * @param files A table mapping the files whose content has changed to a descr iption of the content
165 * change. Each value should be one of the following types: AddContent Overlay,
166 * ChangeContentOverlay, or RemoveContentOverlay.
167 */
168 public void analysis_updateContent(Map<String, Object> files);
169
170 /**
171 * {@code analysis.updateOptions}
172 *
173 * Update the options controlling analysis based on the given set of options. Any options that are
174 * not included in the analysis options will not be changed. If there are opti ons in the analysis
175 * options that are not valid an error will be reported but the values of the valid options will
176 * still be updated.
177 *
178 * @param options The options that are to be used to control analysis.
179 */
180 public void analysis_updateOptions(AnalysisOptions options);
181
182 /**
183 * {@code completion.getSuggestions}
184 *
185 * Request that completion suggestions for the given offset in the given file be returned.
186 *
187 * @param file The file containing the point at which suggestions are to be ma de.
188 * @param offset The offset within the file at which suggestions are to be mad e.
189 */
190 public void completion_getSuggestions(String file, int offset, GetSuggestionsC onsumer consumer);
191
192 /**
193 * {@code debug.createContext}
194 *
195 * Create a debugging context for the executable file with the given path. The context that is
196 * created will persist until debug.deleteContext is used to delete it. Client s, therefore, are
197 * responsible for managing the lifetime of debugging contexts.
198 *
199 * @param contextRoot The path of the Dart or HTML file that will be launched.
200 */
201 public void debug_createContext(String contextRoot, CreateContextConsumer cons umer);
202
203 /**
204 * {@code debug.deleteContext}
205 *
206 * Delete the debugging context with the given identifier. The context id is n o longer valid after
207 * this command. The server is allowed to re-use ids when they are no longer v alid.
208 *
209 * @param id The identifier of the debugging context that is to be deleted.
210 */
211 public void debug_deleteContext(String id);
212
213 /**
214 * {@code debug.mapUri}
215 *
216 * Map a URI from the debugging context to the file that it corresponds to, or map a file to the
217 * URI that it corresponds to in the debugging context.
218 *
219 * Exactly one of the file and uri fields must be provided.
220 *
221 * @param id The identifier of the debugging context in which the URI is to be mapped.
222 * @param file The path of the file to be mapped into a URI.
223 * @param uri The URI to be mapped into a file path.
224 */
225 public void debug_mapUri(String id, String file, String uri, MapUriConsumer co nsumer);
226
227 /**
228 * {@code debug.setSubscriptions}
229 *
273 * Subscribe for services. All previous subscriptions are replaced by the give n set of services. 230 * Subscribe for services. All previous subscriptions are replaced by the give n set of services.
274 * <p> 231 *
275 * It is an error if any of the elements in the list are not valid services. I f there is an error, 232 * It is an error if any of the elements in the list are not valid services. I f there is an error,
276 * then the current subscriptions will remain unchanged. 233 * then the current subscriptions will remain unchanged.
277 * 234 *
278 * @param services a list of the services being subscribed to 235 * @param subscriptions A list of the services being subscribed to.
279 */ 236 */
280 public void setDebugSubscriptions(List<DebugService> services); 237 public void debug_setSubscriptions(List<String> subscriptions);
281 238
282 /** 239 /**
283 * Set the priority files to the files in the given list. A priority file is a file that is given 240 * {@code edit.getAssists}
284 * priority when scheduling which analysis work to do first. The list typicall y contains those 241 *
285 * files that are visible to the user and those for which analysis results wil l have the biggest 242 * Return the set of assists that are available at the given location. An assi st is distinguished
286 * impact on the user experience. 243 * from a refactoring primarily by the fact that it affects a single file and does not require user
287 * 244 * input in order to be performed.
288 * @param files the files that are to be a priority for analysis 245 *
289 */ 246 * @param file The file containing the code for which assists are being reques ted.
290 public void setPriorityFiles(List<String> files); 247 * @param offset The offset of the code for which assists are being requested.
291 248 * @param length The length of the code for which assists are being requested.
292 /** 249 */
293 * Set the options for a refactoring operation. Clients are required to set th e options before the 250 public void edit_getAssists(String file, int offset, int length, GetAssistsCon sumer consumer);
294 * refactoring is applied if the refactoring has options. Clients are allowed to set the options 251
295 * multiple times in order to allow users to fix any problems that might preve nt the refactoring 252 /**
296 * from completing. 253 * {@code edit.getAvailableRefactorings}
297 * 254 *
298 * @param refactoringId the identifier of the refactoring whose options are to be set 255 * Get a list of the kinds of refactorings that are valid for the given select ion in the given
299 * @param refactoringOptions options for this refactoring kind 256 * file.
300 * @param consumer the results listener 257 *
301 */ 258 * @param file The file containing the code on which the refactoring would be based.
302 public void setRefactoringOptions(String refactoringId, Map<String, Object> re factoringOptions, 259 * @param offset The offset of the code on which the refactoring would be base d.
303 RefactoringSetOptionsConsumer consumer); 260 * @param length The length of the code on which the refactoring would be base d.
304 261 */
305 /** 262 public void edit_getAvailableRefactorings(String file, int offset, int length, GetAvailableRefactoringsConsumer consumer);
306 * Subscribe for server services. 263
307 * <p> 264 /**
308 * All previous subscriptions are replaced by the given set of subscriptions. 265 * {@code edit.getFixes}
309 * 266 *
310 * @param subscriptions a list of the services being subscribed to. 267 * Return the set of fixes that are available for the errors at a given offset in a given file.
311 */ 268 *
312 public void setServerSubscriptions(List<ServerService> subscriptions); 269 * @param file The file containing the errors for which fixes are being reques ted.
313 270 * @param offset The offset used to select the errors for which fixes will be returned.
314 /** 271 */
315 * Cleanly shutdown the analysis server. 272 public void edit_getFixes(String file, int offset, GetFixesConsumer consumer);
316 */ 273
317 public void shutdown(); 274 /**
275 * {@code edit.getRefactoring}
276 *
277 * Get the changes required to perform a refactoring.
278 *
279 * @param kindId The identifier of the kind of refactoring to be performed.
280 * @param file The file containing the code involved in the refactoring.
281 * @param offset The offset of the region involved in the refactoring.
282 * @param length The length of the region involved in the refactoring.
283 * @param validateOnly True if the client is only requesting that the values o f the options be
284 * validated and no change be generated.
285 * @param options Data used to provide values provided by the user. The struct ure of the data is
286 * dependent on the kind of refactoring being performed. The data that is expected is
287 * documented in the section titled Refactorings, labeled as “Options” . This field can be
288 * omitted if the refactoring does not require any options or if the v alues of those
289 * options are not known.
290 */
291 public void edit_getRefactoring(String kindId, String file, int offset, int le ngth, boolean validateOnly, Object options, GetRefactoringConsumer consumer);
292
293 /**
294 * Remove the given listener from the list of listeners that will receive noti fication when new
295 * analysis results become available.
296 *
297 * @param listener the listener to be removed
298 */
299 public void removeAnalysisServerListener(AnalysisServerListener listener);
300
301 /**
302 * {@code search.findElementReferences}
303 *
304 * Perform a search for references to the element defined or referenced at the given offset in the
305 * given file.
306 *
307 * An identifier is returned immediately, and individual results will be retur ned via the
308 * search.results notification as they become available.
309 *
310 * @param file The file containing the declaration of or reference to the elem ent used to define
311 * the search.
312 * @param offset The offset within the file of the declaration of or reference to the element.
313 * @param includePotential True if potential matches are to be included in the results.
314 */
315 public void search_findElementReferences(String file, int offset, boolean incl udePotential, FindElementReferencesConsumer consumer);
316
317 /**
318 * {@code search.findMemberDeclarations}
319 *
320 * Perform a search for declarations of members whose name is equal to the giv en name.
321 *
322 * An identifier is returned immediately, and individual results will be retur ned via the
323 * search.results notification as they become available.
324 *
325 * @param name The name of the declarations to be found.
326 */
327 public void search_findMemberDeclarations(String name, FindMemberDeclarationsC onsumer consumer);
328
329 /**
330 * {@code search.findMemberReferences}
331 *
332 * Perform a search for references to members whose name is equal to the given name. This search
333 * does not check to see that there is a member defined with the given name, s o it is able to find
334 * references to undefined members as well.
335 *
336 * An identifier is returned immediately, and individual results will be retur ned via the
337 * search.results notification as they become available.
338 *
339 * @param name The name of the references to be found.
340 */
341 public void search_findMemberReferences(String name, FindMemberReferencesConsu mer consumer);
342
343 /**
344 * {@code search.findTopLevelDeclarations}
345 *
346 * Perform a search for declarations of top-level elements (classes, typedefs, getters, setters,
347 * functions and fields) whose name matches the given pattern.
348 *
349 * An identifier is returned immediately, and individual results will be retur ned via the
350 * search.results notification as they become available.
351 *
352 * @param pattern The regular expression used to match the names of the declar ations to be found.
353 */
354 public void search_findTopLevelDeclarations(String pattern, FindTopLevelDeclar ationsConsumer consumer);
355
356 /**
357 * {@code search.getTypeHierarchy}
358 *
359 * Return the type hierarchy of the class declared or referenced at the given location.
360 *
361 * @param file The file containing the declaration or reference to the type fo r which a hierarchy
362 * is being requested.
363 * @param offset The offset of the name of the type within the file.
364 */
365 public void search_getTypeHierarchy(String file, int offset, GetTypeHierarchyC onsumer consumer);
366
367 /**
368 * {@code server.getVersion}
369 *
370 * Return the version number of the analysis server.
371 */
372 public void server_getVersion(GetVersionConsumer consumer);
373
374 /**
375 * {@code server.setSubscriptions}
376 *
377 * Subscribe for services. All previous subscriptions are replaced by the give n set of services.
378 *
379 * It is an error if any of the elements in the list are not valid services. I f there is an error,
380 * then the current subscriptions will remain unchanged.
381 *
382 * @param subscriptions A list of the services being subscribed to.
383 */
384 public void server_setSubscriptions(List<String> subscriptions);
385
386 /**
387 * {@code server.shutdown}
388 *
389 * Cleanly shutdown the analysis server. Requests that are received after this request will not be
390 * processed. Requests that were received before this request, but for which a response has not yet
391 * been sent, will not be responded to. No further responses or notifications will be sent after
392 * the response to this request has been sent.
393 */
394 public void server_shutdown();
318 395
319 /** 396 /**
320 * Start the analysis server. 397 * Start the analysis server.
321 * 398 *
322 * @param millisToRestart the number of milliseconds to wait for an unresponsi ve server before 399 * @param millisToRestart the number of milliseconds to wait for an unresponsi ve server before
323 * restarting it, or zero if the server should not be restarted. 400 * restarting it, or zero if the server should not be restarted.
324 */ 401 */
325 public void start(long millisToRestart) throws Exception; 402 public void start(long millisToRestart) throws Exception;
326
327 /**
328 * Update the options controlling analysis based on the given set of options. Any options that are
329 * {@code null} will not be changed. If there are options that are not valid a n error will be
330 * reported but the values of the valid options will still be updated.
331 *
332 * @param options the options that are to control analysis
333 */
334 public void updateAnalysisOptions(AnalysisOptions options);
335
336 /**
337 * Update the content of one or more files. Files that were previously updated but not included in
338 * this update remain unchanged.
339 *
340 * @param files a table mapping the files whose content has changed to a descr iption of the
341 * content
342 */
343 public void updateContent(Map<String, ContentChange> files);
344 } 403 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698