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

Unified Diff: pkg/analysis_server/tool/spec/codegen_analysis_server.dart

Issue 725143004: Format and sort analyzer and analysis_server packages. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analysis_server/tool/spec/api.dart ('k') | pkg/analysis_server/tool/spec/codegen_dart.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « pkg/analysis_server/tool/spec/api.dart ('k') | pkg/analysis_server/tool/spec/codegen_dart.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698