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

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

Issue 462253005: Initial cut at having the enum objects from the spec generated as classes with public static string… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase with bleeding_edge 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 side-by-side diff with in-line comments
Download patch
Index: pkg/analysis_server/tool/spec/codegen_java.dart
diff --git a/pkg/analysis_server/tool/spec/codegen_java.dart b/pkg/analysis_server/tool/spec/codegen_java.dart
index 3139bf114b8217cedb504cc864a2259021799462..a4bcbf9f0e75e387b896c38d824c57ec9860c1f4 100644
--- a/pkg/analysis_server/tool/spec/codegen_java.dart
+++ b/pkg/analysis_server/tool/spec/codegen_java.dart
@@ -96,21 +96,24 @@ class CodegenJavaVisitor extends HierarchicalApiVisitor with CodeGenerator {
writeln('$header {');
indent(() {
// fields
- List<String> allFields = _valuesSortedByKey(_state.privateFields).toList();
+ List<String> allFields =
+ _valuesSortedByKey(_state.privateFields).toList();
for (String field in allFields) {
writeln();
write(field);
}
// constructors
- List<String> allConstructors = _valuesSortedByKey(_state.constructors).toList();
+ List<String> allConstructors =
+ _valuesSortedByKey(_state.constructors).toList();
for (String constructor in allConstructors) {
writeln();
write(constructor);
}
// methods
- List<String> allMethods = _valuesSortedByKey(_state.publicMethods).toList();
+ List<String> allMethods =
+ _valuesSortedByKey(_state.publicMethods).toList();
allMethods.addAll(_valuesSortedByKey(_state.privateMethods));
for (String method in allMethods) {
writeln();
@@ -240,7 +243,8 @@ class _CodegenJavaState {
* Create a [GeneratedFile] that creates Java code and outputs it to [path].
* [path] uses Posix-style path separators regardless of the OS.
*/
-GeneratedFile javaGeneratedFile(String path, CodegenJavaVisitor createVisitor(Api api)) {
+GeneratedFile javaGeneratedFile(String path, CodegenJavaVisitor
+ createVisitor(Api api)) {
return new GeneratedFile(path, () {
CodegenJavaVisitor visitor = createVisitor(readApi());
return visitor.collectCode(visitor.visitApi);

Powered by Google App Engine
This is Rietveld 408576698