| OLD | NEW |
| 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'; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 String consumerName(Request request) { | 31 String consumerName(Request request) { |
| 32 return camelJoin([request.method, 'consumer'], doCapitalize: true); | 32 return camelJoin([request.method, 'consumer'], doCapitalize: true); |
| 33 } | 33 } |
| 34 | 34 |
| 35 @override | 35 @override |
| 36 void visitApi() { | 36 void visitApi() { |
| 37 outputHeader(javaStyle: true); | 37 outputHeader(javaStyle: true); |
| 38 writeln('package com.google.dart.server.generated;'); | 38 writeln('package com.google.dart.server.generated;'); |
| 39 writeln(); | 39 writeln(); |
| 40 writeln('import com.google.dart.server.*;'); | 40 writeln('import com.google.dart.server.*;'); |
| 41 writeln('import org.dartlang.analysis.server.protocol.*;'); | 41 writeln('import com.google.dart.server.generated.types.*;'); |
| 42 writeln(); | 42 writeln(); |
| 43 writeln('import java.util.List;'); | 43 writeln('import java.util.List;'); |
| 44 writeln('import java.util.Map;'); | 44 writeln('import java.util.Map;'); |
| 45 writeln(); | 45 writeln(); |
| 46 writeln('''/** | 46 writeln('''/** |
| 47 * The interface {@code AnalysisServer} defines the behavior of objects that int
erface to an | 47 * The interface {@code AnalysisServer} defines the behavior of objects that int
erface to an |
| 48 * analysis server. | 48 * analysis server. |
| 49 * | 49 * |
| 50 * @coverage dart.server | 50 * @coverage dart.server |
| 51 */'''); | 51 */'''); |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 } | 132 } |
| 133 } | 133 } |
| 134 if (request.result != null) { | 134 if (request.result != null) { |
| 135 arguments.add('${consumerName(request)} consumer'); | 135 arguments.add('${consumerName(request)} consumer'); |
| 136 } | 136 } |
| 137 write(arguments.join(', ')); | 137 write(arguments.join(', ')); |
| 138 writeln(');'); | 138 writeln(');'); |
| 139 }); | 139 }); |
| 140 } | 140 } |
| 141 } | 141 } |
| OLD | NEW |