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

Side by Side Diff: pkg/analyzer_plugin/tool/spec/codegen_inttest_methods.dart

Issue 2800283002: updates to the analysis server generated spec doc (Closed)
Patch Set: revert a change from a separate CL Created 3 years, 8 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
« no previous file with comments | « pkg/analyzer_plugin/tool/spec/api.dart ('k') | pkg/analyzer_plugin/tool/spec/from_html.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 /** 5 /**
6 * Code generation for the file "integration_test_methods.dart". 6 * Code generation for the file "integration_test_methods.dart".
7 */ 7 */
8 import 'dart:convert'; 8 import 'dart:convert';
9 9
10 import 'package:analyzer/src/codegen/tools.dart'; 10 import 'package:analyzer/src/codegen/tools.dart';
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 } 206 }
207 if (optionalArgs.isNotEmpty) { 207 if (optionalArgs.isNotEmpty) {
208 args.add('{${optionalArgs.join(', ')}}'); 208 args.add('{${optionalArgs.join(', ')}}');
209 } 209 }
210 writeln(); 210 writeln();
211 docComment(toHtmlVisitor.collectHtml(() { 211 docComment(toHtmlVisitor.collectHtml(() {
212 toHtmlVisitor.translateHtml(request.html); 212 toHtmlVisitor.translateHtml(request.html);
213 toHtmlVisitor.describePayload(request.params, 'Parameters'); 213 toHtmlVisitor.describePayload(request.params, 'Parameters');
214 toHtmlVisitor.describePayload(request.result, 'Returns'); 214 toHtmlVisitor.describePayload(request.result, 'Returns');
215 })); 215 }));
216 if (request.deprecated) {
217 writeln('@deprecated');
218 }
216 String resultClass; 219 String resultClass;
217 String futureClass; 220 String futureClass;
218 if (request.result == null) { 221 if (request.result == null) {
219 futureClass = 'Future'; 222 futureClass = 'Future';
220 } else { 223 } else {
221 resultClass = camelJoin([request.domainName, request.method, 'result'], 224 resultClass = camelJoin([request.domainName, request.method, 'result'],
222 doCapitalize: true); 225 doCapitalize: true);
223 futureClass = 'Future<$resultClass>'; 226 futureClass = 'Future<$resultClass>';
224 } 227 }
225 writeln('$futureClass $methodName(${args.join(', ')}) async {'); 228 writeln('$futureClass $methodName(${args.join(', ')}) async {');
(...skipping 26 matching lines...) Expand all
252 writeln('ResponseDecoder decoder = new ResponseDecoder($kind);'); 255 writeln('ResponseDecoder decoder = new ResponseDecoder($kind);');
253 writeln("return new $resultClass.fromJson(decoder, 'result', result);"); 256 writeln("return new $resultClass.fromJson(decoder, 'result', result);");
254 } else { 257 } else {
255 writeln('outOfTestExpect(result, isNull);'); 258 writeln('outOfTestExpect(result, isNull);');
256 writeln('return null;'); 259 writeln('return null;');
257 } 260 }
258 }); 261 });
259 writeln('}'); 262 writeln('}');
260 } 263 }
261 } 264 }
OLDNEW
« no previous file with comments | « pkg/analyzer_plugin/tool/spec/api.dart ('k') | pkg/analyzer_plugin/tool/spec/from_html.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698