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

Side by Side Diff: pkg/analysis_server/tool/spec/codegen_analysis_server.dart

Issue 473533003: Initial code to generate the Java types from the spec. (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 // 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 server.generator.java; 8 library java.generator.server;
9 9
10 import 'api.dart'; 10 import 'api.dart';
11 import 'codegen_java.dart'; 11 import 'codegen_java.dart';
12 import 'codegen_tools.dart'; 12 import 'codegen_tools.dart';
13 13
14 class CodegenAnalysisServer extends CodegenJavaVisitor { 14 class CodegenAnalysisServer extends CodegenJavaVisitor {
15 CodegenAnalysisServer(Api api) : super(api); 15 CodegenAnalysisServer(Api api) : super(api);
16 16
17 @override 17 @override
18 void visitApi() { 18 void visitApi() {
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 } 102 }
103 write(arguments.join(', ')); 103 write(arguments.join(', '));
104 writeln(');'); 104 writeln(');');
105 }); 105 });
106 } 106 }
107 107
108 /** 108 /**
109 * Get the name of the consumer class for responses to this request. 109 * Get the name of the consumer class for responses to this request.
110 */ 110 */
111 String consumerName(Request request) { 111 String consumerName(Request request) {
112 return camelJoin([request.method, 'consumer'], capitalize: true); 112 return camelJoin([request.method, 'consumer'], doCapitalize: true);
113 } 113 }
114 } 114 }
115 115
116 final GeneratedFile target = javaGeneratedFile( 116 final GeneratedFile target = javaGeneratedFile(
117 '../../../../editor/tools/plugins/com.google.dart.server/src/com/google/dart /server/AnalysisServer.java', 117 '../../../../editor/tools/plugins/com.google.dart.server/src/com/google/dart /server/AnalysisServer.java',
118 (Api api) => new CodegenAnalysisServer(api)); 118 (Api api) => new CodegenAnalysisServer(api));
119 119
120 /** 120 /**
121 * Translate spec_input.html into AnalysisServer.java. 121 * Translate spec_input.html into AnalysisServer.java.
122 */ 122 */
123 main() { 123 main() {
124 target.generate(); 124 target.generate();
125 } 125 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698