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

Unified Diff: lib/code_generator.dart

Issue 1192943003: changes for 0.3.9 (Closed) Base URL: https://github.com/dart-lang/dart-protoc-plugin.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | lib/file_generator.dart » ('j') | lib/message_generator.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/code_generator.dart
diff --git a/lib/code_generator.dart b/lib/code_generator.dart
index 986db0b60bd1ba3789428b6e4d40836555addf76..cfaccf2b92a9cf2a6142ed1d4de1b65a32553249 100644
--- a/lib/code_generator.dart
+++ b/lib/code_generator.dart
@@ -26,11 +26,15 @@ class CodeGenerator extends ProtobufContainer {
void generate({
Map<String, SingleOptionParser> optionParsers,
OutputConfiguration outputConfiguration}) {
+
+ var extensions = new ExtensionRegistry();
+ Dart_options.registerAllExtensions(extensions);
+
_streamIn
.fold(new BytesBuilder(), (builder, data) => builder..add(data))
.then((builder) => builder.takeBytes())
.then((List<int> bytes) {
- var request = new CodeGeneratorRequest.fromBuffer(bytes);
+ var request = new CodeGeneratorRequest.fromBuffer(bytes, extensions);
Søren Gjesse 2015/06/22 18:29:38 Long line.
skybrian 2015/06/23 02:21:25 Done.
var response = new CodeGeneratorResponse();
// Parse the options in the request. Return the errors is any.
« no previous file with comments | « no previous file | lib/file_generator.dart » ('j') | lib/message_generator.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698