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

Side by Side Diff: pkg/analysis_server/tool/spec/codegen_analysis_server.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
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 /** 5 /**
6 * Code generation for the file "AnalysisServer.java". 6 * Code generation for the file "AnalysisServer.java".
7 */ 7 */
8 library java.generator.server; 8 library java.generator.server;
9 9
10 import 'package:analyzer/src/codegen/tools.dart'; 10 import 'package:analyzer/src/codegen/tools.dart';
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 } 111 }
112 112
113 @override 113 @override
114 void visitRequest(Request request) { 114 void visitRequest(Request request) {
115 String methodName = '${request.domainName}_${request.method}'; 115 String methodName = '${request.domainName}_${request.method}';
116 publicMethod(methodName, () { 116 publicMethod(methodName, () {
117 docComment(toHtmlVisitor.collectHtml(() { 117 docComment(toHtmlVisitor.collectHtml(() {
118 toHtmlVisitor.write('{@code ${request.longMethod }}'); 118 toHtmlVisitor.write('{@code ${request.longMethod }}');
119 toHtmlVisitor.translateHtml(request.html); 119 toHtmlVisitor.translateHtml(request.html);
120 toHtmlVisitor.javadocParams(request.params); 120 toHtmlVisitor.javadocParams(request.params);
121 if (request.deprecated) {
122 toHtmlVisitor.p(() => toHtmlVisitor.write('@deprecated'));
123 }
121 })); 124 }));
122 write('public void $methodName('); 125 write('public void $methodName(');
123 List<String> arguments = []; 126 List<String> arguments = [];
124 if (request.params != null) { 127 if (request.params != null) {
125 for (TypeObjectField field in request.params.fields) { 128 for (TypeObjectField field in request.params.fields) {
126 arguments.add('${javaType(field.type)} ${javaName(field.name)}'); 129 arguments.add('${javaType(field.type)} ${javaName(field.name)}');
127 } 130 }
128 } 131 }
129 if (request.result != null) { 132 if (request.result != null) {
130 arguments.add('${consumerName(request)} consumer'); 133 arguments.add('${consumerName(request)} consumer');
131 } 134 }
132 write(arguments.join(', ')); 135 write(arguments.join(', '));
133 writeln(');'); 136 writeln(');');
134 }); 137 });
135 } 138 }
136 } 139 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/tool/spec/api.dart ('k') | pkg/analysis_server/tool/spec/codegen_inttest_methods.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698