diff options
Diffstat (limited to 'src/google/protobuf/compiler/javanano/javanano_generator.cc')
-rw-r--r-- | src/google/protobuf/compiler/javanano/javanano_generator.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/google/protobuf/compiler/javanano/javanano_generator.cc b/src/google/protobuf/compiler/javanano/javanano_generator.cc index 19a3dccd..4b6b6a59 100644 --- a/src/google/protobuf/compiler/javanano/javanano_generator.cc +++ b/src/google/protobuf/compiler/javanano/javanano_generator.cc @@ -57,6 +57,10 @@ void UpdateParamsRecursively(Params& params, params.set_java_package( file->name(), file->options().java_package()); } + if (file->options().has_java_multiple_files()) { + params.set_java_multiple_files( + file->name(), file->options().java_multiple_files()); + } // Loop through all dependent files recursively // adding dep @@ -84,11 +88,6 @@ bool JavaNanoGenerator::Generate(const FileDescriptor* file, string output_list_file; Params params(file->name()); - // Get options from the proto file - if (file->options().has_java_multiple_files()) { - params.set_java_multiple_files(file->options().java_multiple_files()); - } - // Update per file params UpdateParamsRecursively(params, file); @@ -118,7 +117,7 @@ bool JavaNanoGenerator::Generate(const FileDescriptor* file, } else if (options[i].first == "store_unknown_fields") { params.set_store_unknown_fields(options[i].second == "true"); } else if (options[i].first == "java_multiple_files") { - params.set_java_multiple_files(options[i].second == "true"); + params.set_override_java_multiple_files(options[i].second == "true"); } else { *error = "Ignore unknown javanano generator option: " + options[i].first; } |