From 5221dcbe479ed765d8103ed7601c69b6d8d6ca4f Mon Sep 17 00:00:00 2001 From: Jisi Liu Date: Fri, 29 Jan 2016 13:51:05 -0800 Subject: Integrate from google internal. Java files are moved to un-do the hack in the prevous commit, which moved the java files to the original position for integration. --- src/google/protobuf/descriptor.proto | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'src/google/protobuf/descriptor.proto') diff --git a/src/google/protobuf/descriptor.proto b/src/google/protobuf/descriptor.proto index c59a6022..3e664d59 100644 --- a/src/google/protobuf/descriptor.proto +++ b/src/google/protobuf/descriptor.proto @@ -379,7 +379,7 @@ message FileOptions { // Whether the nano proto compiler should generate in the deprecated non-nano // suffixed package. - optional bool javanano_use_deprecated_package = 38; + optional bool javanano_use_deprecated_package = 38 [deprecated = true]; // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; @@ -777,3 +777,29 @@ message SourceCodeInfo { repeated string leading_detached_comments = 6; } } + +// Describes the relationship between generated code and its original source +// file. A GeneratedCodeInfo message is associated with only one generated +// source file, but may contain references to different source .proto files. +message GeneratedCodeInfo { + // An Annotation connects some span of text in generated code to an element + // of its generating .proto file. + repeated Annotation annotation = 1; + message Annotation { + // Identifies the element in the original source .proto file. This field + // is formatted the same as SourceCodeInfo.Location.path. + repeated int32 path = 1 [packed=true]; + + // Identifies the filesystem path to the original source .proto. + optional string source_file = 2; + + // Identifies the starting offset in bytes in the generated code + // that relates to the identified object. + optional int32 begin = 3; + + // Identifies the ending offset in bytes in the generated code that + // relates to the identified offset. The end offset should be one past + // the last relevant byte (so the length of the text = end - begin). + optional int32 end = 4; + } +} -- cgit v1.2.3