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

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

Issue 474193003: Make more use of generated code in Java analysis server. (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 java.generator.server; 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() {
19 outputHeader(javaStyle: true); 19 outputHeader(javaStyle: true);
20 writeln('package com.google.dart.server;'); 20 writeln('package com.google.dart.server;');
21 writeln(); 21 writeln();
22 writeln('import com.google.dart.server.generated.types.*;');
23 writeln();
22 writeln('import java.util.List;'); 24 writeln('import java.util.List;');
23 writeln('import java.util.Map;'); 25 writeln('import java.util.Map;');
24 writeln(); 26 writeln();
25 writeln( 27 writeln(
26 '''/** 28 '''/**
27 * The interface {@code AnalysisServer} defines the behavior of objects that int erface to an 29 * The interface {@code AnalysisServer} defines the behavior of objects that int erface to an
28 * analysis server. 30 * analysis server.
29 * 31 *
30 * @coverage dart.server 32 * @coverage dart.server
31 */''' 33 */'''
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 final GeneratedFile target = javaGeneratedFile( 118 final GeneratedFile target = javaGeneratedFile(
117 '../../../../editor/tools/plugins/com.google.dart.server/src/com/google/dart /server/AnalysisServer.java', 119 '../../../../editor/tools/plugins/com.google.dart.server/src/com/google/dart /server/AnalysisServer.java',
118 (Api api) => new CodegenAnalysisServer(api)); 120 (Api api) => new CodegenAnalysisServer(api));
119 121
120 /** 122 /**
121 * Translate spec_input.html into AnalysisServer.java. 123 * Translate spec_input.html into AnalysisServer.java.
122 */ 124 */
123 main() { 125 main() {
124 target.generate(); 126 target.generate();
125 } 127 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698