You'll want to use the insertion points that are emitted by the code
generators in the core implementation. There are some references to these in
plugin.proto, but I'm not sure that we have a document listing all the
available insertion points. I believe that these insertion points are
available for each of the 3 languages:

includes
class_scope:<msg type name>
global_scope
namespace_scope

There's a class_scope for each type in the .proto file; the type name is the
fully qualified message type. It sounds like this is the one you want to
use.

On Thu, Jul 7, 2011 at 10:28 AM, Jeffrey Damick <jeffreydam...@gmail.com>wrote:

> Is there a simpler way of creating a plugin to rewrite parts of the
> generated code from the default implementation?  So if I want to
> generate the java/c++/python code for a service, but I basically want
> all the surroundings, and just modify some of the body of the
> class(es), is there any easy way to do this besides either pulling in
> most of the compile/java|cpp|python/*.[h|cc] or patching the
> java_service.[h|cc] ? Basically it'd great if there was a way to
> register a plugin to write just parts of the file, particularly in the
> case of java, c++, and python service class bodies. Any suggestions?
>
> thanks
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To post to this group, send email to protobuf@googlegroups.com.
> To unsubscribe from this group, send email to
> protobuf+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/protobuf?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to