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

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

Issue 463163002: Initial cut at generating the AnalysisServer.java interface. Currently this generates a commented o… (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
« no previous file with comments | « no previous file | pkg/analysis_server/tool/spec/codegen_analysis_server.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright (c) 2014, the Dart project authors.
3 *
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
6 *
7 * http://www.eclipse.org/legal/epl-v10.html
8 *
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
11 * or implied. See the License for the specific language governing permissions a nd limitations under
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".
16 */
17 package com.google.dart.server;
18
19 import java.util.List;
20 import java.util.Map;
21
22 /**
23 * The interface {@code AnalysisServer} defines the behavior of objects that int erface to an
24 * analysis server.
25 *
26 * @coverage dart.server
27 */
28 public interface AnalysisServer2 {
29
30 /**
31 * Add the given listener to the list of listeners that will receive notific ation when new
scheglov 2014/08/12 17:34:29 Extra spaces before "*".
jwren 2014/08/12 17:43:47 Fixed.
32 * analysis results become available.
33 *
34 * @param listener the listener to be added
35 */
36 public void addAnalysisServerListener(AnalysisServerListener listener);
37 /**
38 * Start the analysis server.
39 *
40 * @param millisToRestart the number of milliseconds to wait for an unrespon sive server before
41 * restarting it, or zero if the server should not be restarted.
42 */
43 public void start(long millisToRestart) throws Exception;
44
45 /**
46 * {@code debug.createContext}
47 *
48 * Create a debugging context for the executable file with the given path. The context that is
49 * created will persist until debug.deleteContext is used to delete it. Client s, therefore, are
50 * responsible for managing the lifetime of debugging contexts.
51 *
52 * @param contextRoot The path of the Dart or HTML file that will be launched.
53 */
54 // public void createContext(String contextRoot, CreateContextConsumer consume r);
scheglov 2014/08/12 17:34:29 I think we should add domain name. It is "createDe
jwren 2014/08/12 17:43:47 I considered this, I was trying to match the API t
jwren 2014/08/12 17:48:58 Some advantages: it will match the order of the sp
scheglov 2014/08/12 17:52:35 Alternatively we could have an explicit Domain cla
Brian Wilkerson 2014/08/12 17:58:02 I'd choose the naming convention rather than expli
Paul Berry 2014/08/12 18:04:01 FYI, in the Dart generated code I used camelJoin()
55
56 /**
57 * {@code debug.deleteContext}
58 *
59 * Delete the debugging context with the given identifier. The context id is n o longer valid after
60 * this command. The server is allowed to re-use ids when they are no longer v alid.
61 *
62 * @param id The identifier of the debugging context that is to be deleted.
63 */
64 // public void deleteContext(String id);
65
66 /**
67 * {@code search.findElementReferences}
68 *
69 * Perform a search for references to the element defined or referenced at the given offset in the
70 * given file.
71 *
72 * An identifier is returned immediately, and individual results will be retur ned via the
73 * search.results notification as they become available.
74 *
75 * @param file The file containing the declaration of or reference to the elem ent used to define
76 * the search.
scheglov 2014/08/12 17:34:29 This wrapped @param line should be indented.
jwren 2014/08/12 17:43:47 I saw this too, we could fix it in the generator,
Paul Berry 2014/08/12 18:04:01 I have an idea of how to fix this; I'll look into
77 * @param offset The offset within the file of the declaration of or reference to the element.
78 * @param includePotential True if potential matches are to be included in the results.
79 */
80 // public void findElementReferences(String file, int offset, boolean includeP otential, FindElementReferencesConsumer consumer);
81
82 /**
83 * {@code search.findMemberDeclarations}
84 *
85 * Perform a search for declarations of members whose name is equal to the giv en name.
86 *
87 * An identifier is returned immediately, and individual results will be retur ned via the
88 * search.results notification as they become available.
89 *
90 * @param name The name of the declarations to be found.
91 */
92 // public void findMemberDeclarations(String name, FindMemberDeclarationsConsu mer consumer);
93
94 /**
95 * {@code search.findMemberReferences}
96 *
97 * Perform a search for references to members whose name is equal to the given name. This search
98 * does not check to see that there is a member defined with the given name, s o it is able to find
99 * references to undefined members as well.
100 *
101 * An identifier is returned immediately, and individual results will be retur ned via the
102 * search.results notification as they become available.
103 *
104 * @param name The name of the references to be found.
105 */
106 // public void findMemberReferences(String name, FindMemberReferencesConsumer consumer);
107
108 /**
109 * {@code search.findTopLevelDeclarations}
110 *
111 * Perform a search for declarations of top-level elements (classes, typedefs, getters, setters,
112 * functions and fields) whose name matches the given pattern.
113 *
114 * An identifier is returned immediately, and individual results will be retur ned via the
115 * search.results notification as they become available.
116 *
117 * @param pattern The regular expression used to match the names of the declar ations to be found.
118 */
119 // public void findTopLevelDeclarations(String pattern, FindTopLevelDeclaratio nsConsumer consumer);
120
121 /**
122 * {@code edit.getAssists}
123 *
124 * Return the set of assists that are available at the given location. An assi st is distinguished
125 * from a refactoring primarily by the fact that it affects a single file and does not require user
126 * input in order to be performed.
127 *
128 * @param file The file containing the code for which assists are being reques ted.
129 * @param offset The offset of the code for which assists are being requested.
130 * @param length The length of the code for which assists are being requested.
131 */
132 // public void getAssists(String file, int offset, int length, GetAssistsConsu mer consumer);
133
134 /**
135 * {@code edit.getAvailableRefactorings}
136 *
137 * Get a list of the kinds of refactorings that are valid for the given select ion in the given
138 * file.
139 *
140 * @param file The file containing the code on which the refactoring would be based.
141 * @param offset The offset of the code on which the refactoring would be base d.
142 * @param length The length of the code on which the refactoring would be base d.
143 */
144 // public void getAvailableRefactorings(String file, int offset, int length, G etAvailableRefactoringsConsumer consumer);
145
146 /**
147 * {@code analysis.getErrors}
148 *
149 * Return the errors associated with the given file. If the errors for the giv en file have not yet
150 * been computed, or the most recently computed errors for the given file are out of date, then the
151 * response for this request will be delayed until they have been computed. If some or all of the
152 * errors for the file cannot be computed, then the subset of the errors that can be computed will
153 * be returned and the response will contain an error to indicate why the erro rs could not be
154 * computed.
155 *
156 * This request is intended to be used by clients that cannot asynchronously a pply updated error
157 * information. Clients that can apply error information as it becomes availab le should use the
158 * information provided by the 'analysis.errors' notification.
159 *
160 * @param file The file for which errors are being requested.
161 */
162 // public void getErrors(String file, GetErrorsConsumer consumer);
163
164 /**
165 * {@code edit.getFixes}
166 *
167 * Return the set of fixes that are available for the errors at a given offset in a given file.
168 *
169 * @param file The file containing the errors for which fixes are being reques ted.
170 * @param offset The offset used to select the errors for which fixes will be returned.
171 */
172 // public void getFixes(String file, int offset, GetFixesConsumer consumer);
173
174 /**
175 * {@code analysis.getHover}
176 *
177 * Return the hover information associate with the given location. If some or all of the hover
178 * information is not available at the time this request is processed the info rmation will be
179 * omitted from the response.
180 *
181 * @param file The file in which hover information is being requested.
182 * @param offset The offset for which hover information is being requested.
183 */
184 // public void getHover(String file, int offset, GetHoverConsumer consumer);
185
186 /**
187 * {@code edit.getRefactoring}
188 *
189 * Get the changes required to perform a refactoring.
190 *
191 * @param kindId The identifier of the kind of refactoring to be performed.
192 * @param file The file containing the code involved in the refactoring.
193 * @param offset The offset of the region involved in the refactoring.
194 * @param length The length of the region involved in the refactoring.
195 * @param validateOnly True if the client is only requesting that the values o f the options be
196 * validated and no change be generated.
197 * @param options Data used to provide values provided by the user. The struct ure of the data is
198 * dependent on the kind of refactoring being performed. The data that is expe cted is documented in
199 * the section titled Refactorings, labeled as “Options”. This field can be om itted if the
200 * refactoring does not require any options or if the values of those options are not known.
201 */
202 // public void getRefactoring(String kindId, String file, int offset, int leng th, boolean validateOnly, Object options, GetRefactoringConsumer consumer);
203
204 /**
205 * {@code completion.getSuggestions}
206 *
207 * Request that completion suggestions for the given offset in the given file be returned.
208 *
209 * @param file The file containing the point at which suggestions are to be ma de.
210 * @param offset The offset within the file at which suggestions are to be mad e.
211 */
212 // public void getSuggestions(String file, int offset, GetSuggestionsConsumer consumer);
213
214 /**
215 * {@code search.getTypeHierarchy}
216 *
217 * Return the type hierarchy of the class declared or referenced at the given location.
218 *
219 * @param file The file containing the declaration or reference to the type fo r which a hierarchy
220 * is being requested.
221 * @param offset The offset of the name of the type within the file.
222 */
223 // public void getTypeHierarchy(String file, int offset, GetTypeHierarchyConsu mer consumer);
224
225 /**
226 * {@code server.getVersion}
227 *
228 * Return the version number of the analysis server.
229 */
230 // public void getVersion(GetVersionConsumer consumer);
231
232 /**
233 * {@code debug.mapUri}
234 *
235 * Map a URI from the debugging context to the file that it corresponds to, or map a file to the
236 * URI that it corresponds to in the debugging context.
237 *
238 * Exactly one of the file and uri fields must be provided.
239 *
240 * @param id The identifier of the debugging context in which the URI is to be mapped.
241 * @param file The path of the file to be mapped into a URI.
242 * @param uri The URI to be mapped into a file path.
243 */
244 // public void mapUri(String id, String file, String uri, MapUriConsumer consu mer);
245
246 /**
247 * {@code analysis.reanalyze}
248 *
249 * Force the re-analysis of everything contained in the existing analysis root s. This will cause
250 * all previously computed analysis results to be discarded and recomputed, an d will cause all
251 * subscribed notifications to be re-sent.
252 */
253 // public void reanalyze();
254
255 /**
256 * {@code analysis.setAnalysisRoots}
257 *
258 * Sets the root paths used to determine which files to analyze. The set of fi les to be analyzed
259 * are all of the files in one of the root paths that are not also in one of t he excluded paths.
260 *
261 * Note that this request determines the set of requested analysis roots. The actual set of
262 * analysis roots at any given time is the intersection of this set with the s et of files and
263 * directories actually present on the filesystem. When the filesystem changes , the actual set of
264 * analysis roots is automatically updated, but the set of requested analysis roots is unchanged.
265 * This means that if the client sets an analysis root before the root becomes visible to server in
266 * the filesystem, there is no error; once the server sees the root in the fil esystem it will start
267 * analyzing it. Similarly, server will stop analyzing files that are removed from the file system
268 * but they will remain in the set of requested roots.
269 *
270 * If an included path represents a file, then server will look in the directo ry containing the
271 * file for a pubspec.yaml file. If none is found, then the parents of the dir ectory will be
272 * searched until such a file is found or the root of the file system is reach ed. If such a file is
273 * found, it will be used to resolve package: URI’s within the file.
274 *
275 * @param included A list of the files and directories that should be analyzed .
276 * @param excluded A list of the files and directories within the included dir ectories that should
277 * not be analyzed.
278 */
279 // public void setAnalysisRoots(List<String> included, List<String> excluded);
280
281 /**
282 * {@code analysis.setPriorityFiles}
283 *
284 * Set the priority files to the files in the given list. A priority file is a file that is given
285 * priority when scheduling which analysis work to do first. The list typicall y contains those
286 * files that are visible to the user and those for which analysis results wil l have the biggest
287 * impact on the user experience. The order of the files within the list is si gnificant: the first
288 * file will be given higher priority than the second, the second higher prior ity than the third,
289 * and so on.
290 *
291 * Note that this request determines the set of requested priority files. The actual set of
292 * priority files is the intersection of the requested set of priority files w ith the set of files
293 * currently subject to analysis. (See analysis.setSubscriptions for a descrip tion of files that
294 * are subject to analysis.)
295 *
296 * If a requested priority file is a directory it is ignored, but remains in t he set of requested
297 * priority files so that if it later becomes a file it can be included in the set of actual
298 * priority files.
299 *
300 * @param files The files that are to be a priority for analysis.
301 */
302 // public void setPriorityFiles(List<String> files);
303
304 /**
305 * {@code debug.setSubscriptions}
306 *
307 * Subscribe for services. All previous subscriptions are replaced by the give n set of services.
308 *
309 * It is an error if any of the elements in the list are not valid services. I f there is an error,
310 * then the current subscriptions will remain unchanged.
311 *
312 * @param subscriptions A list of the services being subscribed to.
313 */
314 // public void setSubscriptions(List<String> subscriptions);
315
316 /**
317 * {@code server.shutdown}
318 *
319 * Cleanly shutdown the analysis server. Requests that are received after this request will not be
320 * processed. Requests that were received before this request, but for which a response has not yet
321 * been sent, will not be responded to. No further responses or notifications will be sent after
322 * the response to this request has been sent.
323 */
324 // public void shutdown();
325
326 /**
327 * {@code analysis.updateContent}
328 *
329 * Update the content of one or more files. Files that were previously updated but not included in
330 * this update remain unchanged. This effectively represents an overlay of the filesystem. The
331 * files whose content is overridden are therefore seen by server as being fil es with the given
332 * content, even if the files do not exist on the filesystem or if the file pa th represents the
333 * path to a directory on the filesystem.
334 *
335 * @param files A table mapping the files whose content has changed to a descr iption of the content
336 * change. Each value should be one of the following types: AddContentOverlay,
337 * ChangeContentOverlay, or RemoveContentOverlay.
338 */
339 // public void updateContent(Map<String, Object> files);
340
341 /**
342 * {@code analysis.updateOptions}
343 *
344 * Update the options controlling analysis based on the given set of options. Any options that are
345 * not included in the analysis options will not be changed. If there are opti ons in the analysis
346 * options that are not valid an error will be reported but the values of the valid options will
347 * still be updated.
348 *
349 * @param options The options that are to be used to control analysis.
350 */
351 // public void updateOptions(AnalysisOptions options);
352 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/tool/spec/codegen_analysis_server.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698