Index: pkg/analysis_server/tool/spec/codegen_analysis_server.dart |
diff --git a/pkg/analysis_server/tool/spec/codegen_analysis_server.dart b/pkg/analysis_server/tool/spec/codegen_analysis_server.dart |
index 0e0dd20e5940c5c4071ddf5bccba7d5fe38c2ec0..e491f69f7ecb50634aaa4507790df502c5afeb95 100644 |
--- a/pkg/analysis_server/tool/spec/codegen_analysis_server.dart |
+++ b/pkg/analysis_server/tool/spec/codegen_analysis_server.dart |
@@ -11,9 +11,27 @@ import 'api.dart'; |
import 'codegen_java.dart'; |
import 'codegen_tools.dart'; |
+final GeneratedFile target = javaGeneratedFile( |
+ '../../../../editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/AnalysisServer.java', |
+ (Api api) => new CodegenAnalysisServer(api)); |
+ |
+/** |
+ * Translate spec_input.html into AnalysisServer.java. |
+ */ |
+main() { |
+ target.generate(); |
+} |
+ |
class CodegenAnalysisServer extends CodegenJavaVisitor { |
CodegenAnalysisServer(Api api) : super(api); |
+ /** |
+ * Get the name of the consumer class for responses to this request. |
+ */ |
+ String consumerName(Request request) { |
+ return camelJoin([request.method, 'consumer'], doCapitalize: true); |
+ } |
+ |
@override |
void visitApi() { |
outputHeader(javaStyle: true); |
@@ -24,27 +42,23 @@ class CodegenAnalysisServer extends CodegenJavaVisitor { |
writeln('import java.util.List;'); |
writeln('import java.util.Map;'); |
writeln(); |
- writeln( |
- '''/** |
+ writeln('''/** |
* The interface {@code AnalysisServer} defines the behavior of objects that interface to an |
* analysis server. |
* |
* @coverage dart.server |
- */''' |
- ); |
+ */'''); |
makeClass('public interface AnalysisServer', () { |
// |
// addAnalysisServerListener(..) |
// |
publicMethod('addAnalysisServerListener', () { |
- writeln( |
- '''/** |
+ writeln('''/** |
* Add the given listener to the list of listeners that will receive notification when new |
* analysis results become available. |
* |
* @param listener the listener to be added |
- */''' |
- ); |
+ */'''); |
writeln( |
'public void addAnalysisServerListener(AnalysisServerListener listener);'); |
}); |
@@ -53,14 +67,12 @@ class CodegenAnalysisServer extends CodegenJavaVisitor { |
// removeAnalysisServerListener(..) |
// |
publicMethod('removeAnalysisServerListener', () { |
- writeln( |
- '''/** |
+ writeln('''/** |
* Remove the given listener from the list of listeners that will receive notification when new |
* analysis results become available. |
* |
* @param listener the listener to be removed |
- */''' |
- ); |
+ */'''); |
writeln( |
'public void removeAnalysisServerListener(AnalysisServerListener listener);'); |
}); |
@@ -69,11 +81,9 @@ class CodegenAnalysisServer extends CodegenJavaVisitor { |
// start(..) |
// |
publicMethod('start', () { |
- writeln( |
- '''/** |
+ writeln('''/** |
* Start the analysis server. |
- */''' |
- ); |
+ */'''); |
writeln('public void start() throws Exception;'); |
}); |
super.visitApi(); |
@@ -103,22 +113,4 @@ class CodegenAnalysisServer extends CodegenJavaVisitor { |
writeln(');'); |
}); |
} |
- |
- /** |
- * Get the name of the consumer class for responses to this request. |
- */ |
- String consumerName(Request request) { |
- return camelJoin([request.method, 'consumer'], doCapitalize: true); |
- } |
-} |
- |
-final GeneratedFile target = javaGeneratedFile( |
- '../../../../editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/AnalysisServer.java', |
- (Api api) => new CodegenAnalysisServer(api)); |
- |
-/** |
- * Translate spec_input.html into AnalysisServer.java. |
- */ |
-main() { |
- target.generate(); |
} |