Index: test/protos/dart_options.proto |
diff --git a/test/protos/dart_options.proto b/test/protos/dart_options.proto |
index 7a16d818606f5a865c456b856ee29380b84ec3e5..413fa594862a28baa3079676be7a302b7d06d241 100644 |
--- a/test/protos/dart_options.proto |
+++ b/test/protos/dart_options.proto |
@@ -10,8 +10,28 @@ package dart_options; |
import "descriptor_2_5_opensource.proto"; |
+// A mixin to be applied in the 'with' clause of a generated proto in dart. |
+message DartMixin { |
+ // Class name of the mixin class. |
+ optional string name = 1; |
+ |
+ // File from which the mixin class is imported. |
+ // The generated Dart code will use this in an import statement. |
+ optional string import_from = 2; |
+ |
+ // Used to apply multiple mixins to a proto. |
+ // The mixin listed in parent will always be applied before this one, |
+ // making the generated proto implement both mixins. |
+ optional string parent = 3; |
+} |
+ |
extend google.protobuf.FileOptions { |
+ // Defines the named mixins to be used on messages in this file. |
+ // These mixins are in addition to internally defined mixins (e.g PbMapMixin) |
+ // and may override them. |
skybrian
2016/06/22 20:29:53
Need a warning here: there is no error-checking fo
frederikmutzel
2016/06/23 12:30:16
Done.
|
+ repeated DartMixin mixins = 28125061; |
+ |
// Applies the named mixin to all messages in this file. |
// (May be overridden by the "mixin" option on a message.) |
// For now, "PbMapMixin" is the only available mixin. |
@@ -28,6 +48,9 @@ extend google.protobuf.MessageOptions { |
extend google.protobuf.FieldOptions { |
+ // Specifies a field to override getters/setters from the inherited mixin. |
skybrian
2016/06/22 20:29:53
I don't see any implementation of "override" - tha
frederikmutzel
2016/06/23 12:30:16
Right, removed for now.
|
+ optional bool override = 28205290; |
+ |
// Uses the given name for getters, setters and as suffixes for has/clear |
// methods in the generated Dart file. Should be lowerCamelCase. |
optional string dart_name = 28700919; |