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

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

Issue 809213003: Add format API (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add handler hook and missed classes Created 5 years, 11 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 | editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/FormatConsumer.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 * {@code completion.getSuggestions} 219 * {@code completion.getSuggestions}
220 * 220 *
221 * Request that completion suggestions for the given offset in the given file be returned. 221 * Request that completion suggestions for the given offset in the given file be returned.
222 * 222 *
223 * @param file The file containing the point at which suggestions are to be ma de. 223 * @param file The file containing the point at which suggestions are to be ma de.
224 * @param offset The offset within the file at which suggestions are to be mad e. 224 * @param offset The offset within the file at which suggestions are to be mad e.
225 */ 225 */
226 public void completion_getSuggestions(String file, int offset, GetSuggestionsC onsumer consumer); 226 public void completion_getSuggestions(String file, int offset, GetSuggestionsC onsumer consumer);
227 227
228 /** 228 /**
229 * {@code edit.format}
230 *
231 * Format the contents of a single file. The currently selected region of text is passed in so that
232 * the selection can be preserved across the formatting operation. The updated selection will be as
233 * close to matching the original as possible, but whitespace at the beginning or end of the
234 * selected region will be ignored.
235 *
236 * @param file The file containing the code to be formatted.
237 * @param selectionOffset The offset of the current selection in the file.
238 * @param selectionLength The length of the current selection in the file.
239 */
240 public void edit_format(String file, int selectionOffset, int selectionLength, FormatConsumer consumer);
241
242 /**
229 * {@code edit.getAssists} 243 * {@code edit.getAssists}
230 * 244 *
231 * Return the set of assists that are available at the given location. An assi st is distinguished 245 * Return the set of assists that are available at the given location. An assi st is distinguished
232 * from a refactoring primarily by the fact that it affects a single file and does not require user 246 * from a refactoring primarily by the fact that it affects a single file and does not require user
233 * input in order to be performed. 247 * input in order to be performed.
234 * 248 *
235 * @param file The file containing the code for which assists are being reques ted. 249 * @param file The file containing the code for which assists are being reques ted.
236 * @param offset The offset of the code for which assists are being requested. 250 * @param offset The offset of the code for which assists are being requested.
237 * @param length The length of the code for which assists are being requested. 251 * @param length The length of the code for which assists are being requested.
238 */ 252 */
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 * the response to this request has been sent. 456 * the response to this request has been sent.
443 */ 457 */
444 public void server_shutdown(); 458 public void server_shutdown();
445 459
446 /** 460 /**
447 * Start the analysis server. 461 * Start the analysis server.
448 */ 462 */
449 public void start() throws Exception; 463 public void start() throws Exception;
450 464
451 } 465 }
OLDNEW
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/FormatConsumer.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698