Chromium Code Reviews| 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);'); |