Add a code generator insertion point for Java builders.

This commit is contained in:
temporal 2009-12-20 00:09:50 +00:00
parent 684d45b2fe
commit 8ee1474044
2 changed files with 7 additions and 0 deletions

View File

@ -645,6 +645,11 @@ void MessageGenerator::GenerateBuilder(io::Printer* printer) {
.GenerateBuilderMembers(printer);
}
printer->Print(
"\n"
"// @@protoc_insertion_point(builder_scope:$full_name$)\n",
"full_name", descriptor_->full_name());
printer->Outdent();
printer->Print("}\n");
}

View File

@ -61,6 +61,8 @@ class TestGenerator : public CodeGenerator {
TryInsert("Test.java", "outer_class_scope", output_directory);
TryInsert("Test.java", "class_scope:foo.Bar", output_directory);
TryInsert("Test.java", "class_scope:foo.Bar.Baz", output_directory);
TryInsert("Test.java", "builder_scope:foo.Bar", output_directory);
TryInsert("Test.java", "builder_scope:foo.Bar.Baz", output_directory);
TryInsert("Test.java", "enum_scope:foo.Qux", output_directory);
return true;
}