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

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

Issue 840953008: Alternate status page (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Sorted and formatted Created 5 years, 11 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_dart_protocol.dart
diff --git a/pkg/analysis_server/tool/spec/codegen_dart_protocol.dart b/pkg/analysis_server/tool/spec/codegen_dart_protocol.dart
index 2fc8d73ebf31a74fc38a56080f83f28201d5f3db..9a9564d02f80d1f8a4b4c225ad88f0ccc7839e9e 100644
--- a/pkg/analysis_server/tool/spec/codegen_dart_protocol.dart
+++ b/pkg/analysis_server/tool/spec/codegen_dart_protocol.dart
@@ -254,6 +254,27 @@ class CodegenProtocolVisitor extends DartCodegenVisitor with CodeGenerator {
'static const ${value.value} = const $className._($valueString);');
writeln();
}
+
+ writeln('/**');
+ writeln(' * A list containing all of the services that are defined.');
Paul Berry 2015/01/20 17:28:11 This looks like it will run on all enums, not just
Brian Wilkerson 2015/01/20 17:46:35 Done.
+ writeln(' */');
+ write('static const List<');
+ write(className);
+ write('> VALUES = const <');
+ write(className);
+ write('>[');
+ bool first = true;
+ for (TypeEnumValue value in type.values) {
+ if (first) {
+ first = false;
+ } else {
+ write(', ');
+ }
+ write(value.value);
+ }
+ writeln('];');
+ writeln();
+
writeln('final String name;');
writeln();
writeln('const $className._(this.name);');

Powered by Google App Engine
This is Rietveld 408576698