5

I'm trying to use Google Protocol Buffers in my project and I'd like to have some tooling support from Eclipse. In particular, I want Eclipse to call protoc every time I make changes to the .proto files and then rebuild all code that depends on the generated code.

I tried to set up a Custom Builder but it keeps bugging me with errors I don't understand, most often it complains that the .proto file is not on the path given by --proto-path, which it should be by all I can tell. Also, because I use ${build_files}, Eclipse passes all changed files to the compiler (instead of those that I have configured to trigger the build).

NetBeans seems to have a protobuf-Plugin, but I can't find one for Eclipse. Is there one?

Hanno Fietz
  • 30,799
  • 47
  • 148
  • 234
  • duplicate of http://stackoverflow.com/questions/968578/eclipse-plugin-for-working-with-protobuf – Thilo Jan 09 '10 at 03:59

5 Answers5

3

Theres a protoclipse plugin on googlecode, which is in the initial stages: http://code.google.com/p/protoclipse/

mo-seph
  • 6,073
  • 9
  • 34
  • 35
1

Not sure if there is a builder, but I did find a plugin for syntax highlighting for protocol buffers.

You can define an external builder on the plugin that invokes an ant task. It is an ugly kludge, but until there is a better solution this may serve your purposes.

Rich Seller
  • 83,208
  • 23
  • 172
  • 177
1

In practice, syntax highlighting turned out to not be that important, I hardly edit these files, and they tend to be very small. Maven and the m2eclipse plugin handle the building side of things great.

Hanno Fietz
  • 30,799
  • 47
  • 148
  • 234
0

While this question is close to other Eclipse plugin for working with protobuf, answers here are different.

Well, yes, if you use maven/gradle to invoke protoc (Protobuf compiler), than you may need no Eclipse plugin at all.
Colorizing editor helps for long file or with many comments. Know there are 2 editor plugins for Eclipse.

Community
  • 1
  • 1
Paul Verest
  • 60,022
  • 51
  • 208
  • 332
0

I recommend using Google's "Protocol Buffers Development Tools". It is a plugin for Eclipse that features automagic regeneration and error checking, among other things. It's available here: http://code.google.com/p/protobuf-dt/ .

unBrice
  • 359
  • 2
  • 9