[protobuf] Some great work!

2011-08-03 Thread Ben Wright
appreciative and I'm certain the rest of the protobuf community will be as well. -Ben Wright On Tuesday, August 2, 2011 10:26:52 PM UTC-4, Alex Ruiz wrote: Greetings, I'm proud to announce that today we released a new Eclipse-based editor for protocol buffer descriptors: https://code.google.com/p

Re: Re:Re: [protobuf] Re: Is any method available to convert a protobuf object to XML?

2011-06-27 Thread Ben Wright
Have you tried http://code.google.com/p/protostuff/ ? -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To view this discussion on the web visit https://groups.google.com/d/msg/protobuf/-/hTS8SDZLVvgJ. To post to this group, send email to

[protobuf] Re: NoClassDefFoundError

2011-06-10 Thread Ben Wright
Did you remember to compile descriptor.proto with protoc? -- 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] Re: NoClassDefFoundError

2011-06-10 Thread Ben Wright
The descriptor.proto is the proto that describes proto files. This supports that Java and C++ reflection language feature and is required to be part of the java library. descriptor.proto is located at protobuf-2.4.1/src/google/protobuf/ descriptor.proto (with the C++ code) Please see the file

[protobuf] Re: Numeric range not supported?

2011-06-02 Thread Ben Wright
You can use custom field options to support validation of this type. Take a look at extending com.google.FieldOptions You can create an option field like max_inclusive and then access it at run-time from the FieldDescriptor and use the information for validation. Unfortunately this is still

[protobuf] Re: Message.getField(FieldDescriptor) and enum values.

2011-05-23 Thread Ben Wright
Assuming you know the Java Enum Type for which the EnumValueDescriptor is describing a type of... MyJavaEnum.valueOf((EnumValueDescriptor)value) will return the appropriate java enum value. On May 23, 1:42 pm, Jim Mayer j...@pentastich.org wrote: In the Java protocol buffer binding, is there a

[protobuf] Re: Proto file generation from Descriptors in Java (DebugString)

2011-05-19 Thread Ben Wright
previous thread: http://groups.google.com/group/protobuf/browse_thread/thread/4bf8bca8c88e82ba/dbaa2803984f3934?lnk=gstq=debugString()#dbaa2803984f3934 On May 18, 6:05 pm, Ben Wright compuware...@gmail.com wrote: There has been some back and forth previously about java language support

[protobuf] Proto file generation from Descriptors in Java (DebugString)

2011-05-18 Thread Ben Wright
There has been some back and forth previously about java language support for generating a proto file from a Descriptor. The suggested implementation was to either wrap or port the DebugString capability from decriptor.cc I recently ported the DebugString capability to java - it's a bit rough as

[protobuf] Re: Generated hashcode() returns different values across JVM instances?

2011-05-11 Thread Ben Wright
Jay: Using the class name to generate the hashcode is logically incorrect because the class name can be derived by the options java_package_ name and java_outer_classname. Additionally (although less likely to matter), separate protocol buffer files can define an identical class names with

[protobuf] Re: Generated hashcode() returns different values across JVM instances?

2011-05-11 Thread Ben Wright
is the need for a hashCode implementation for Descriptor based on the actual Descriptor's content... On May 11, 4:54 pm, Ben Wright compuware...@gmail.com wrote: Jay: Using the class name to generate the hashcode is logically incorrect because the class name can be derived by the options java_package_

[protobuf] Re: Generated hashcode() returns different values across JVM instances?

2011-05-11 Thread Ben Wright
than an hour to push into the stream and could make it into the next release. On May 11, 5:25 pm, Ben Wright compuware...@gmail.com wrote: Alternatively... instead of putting the onus on the compiler, the hashcode could be computed by the JVM at initialization time for the Descriptor instance

[protobuf] Eclipse Feature for authoring editing .proto files

2011-05-10 Thread Ben Wright
Does anyone know of a (good) implementation for protocol buffer file editor in the Eclipse IDE? I've found a couple of scattered, incomplete, and abandoned protobuf- related eclipse plugins... but I'm just looking for a text editor implementation with syntax highlighting and content assist. I

[protobuf] Generated Comments

2011-05-06 Thread Ben Wright
I was wondering if there was any convenient way to add comments into a .proto file that would be included in generated code for context help. If not, is there an existing plug-in project anyone knows of that provides anything like that? i.e. message Foo { option documentation = A Foo

[protobuf] Re: UnmodifiableLazyStringList is not Serializable

2011-04-13 Thread Ben Wright
I agree with J.S. on this one - there are many situations in Java EE environments where Serializable is checked or java serialization used when it's not simple or feasible to leverage protobuf serialization. Most of these situations are invm / in memory transfers. Sometimes java serialization is

[protobuf] Re: Protobuf in JAX-WS

2011-03-31 Thread Ben Wright
to them. If you want more info you can ask more questions or do a search on RESTful web services (and yes JAX-WS supports RESTful but still using XML...) Best of luck, Ben Wright On Mar 31, 10:38 pm, Canggih PW cangca...@gmail.com wrote: hi, Sorry, i'm new in Java. Currently, i make a web

[protobuf] Re: How to use the FieldOptions in java

2011-03-04 Thread Ben Wright
You need to use the field descriptor for the field you want to look at. You can get ahold of the field descriptor by using findFieldByName or findFieldByNumber FieldDescriptor myFieldDescriptor =

[protobuf] Re: issue with protocol buffers when using with java generics.

2011-02-22 Thread Ben Wright
You will need to provide the type during construction of your instance. You will also want to provide the Descriptor for the type you want to deserialize in order to safely perform that step. i.e. public GPBFormat(ClassT clazz, Descriptor d) { //save the type information to instance variables }

[protobuf] Re: constants, enums, signed vs unsigned

2011-02-22 Thread Ben Wright
Seems an odd use case to capture a constant in a proto file... but my suggestion would be to extend FileOptions or MessageOptions and provide options that hold your constant values. On Feb 14, 12:15 pm, maxw mwindi...@videotron.ca wrote: Hello, I didn't find crystal-clear confirmation in the

[protobuf] Re: Alternate names for enumeration values

2011-02-04 Thread Ben Wright
I have just the solution for you... I'll start by warning you that I use PB mainly in Java, so things may look slightly different in C++ - but this method should still work. You're going to want to define an extension to google.protobuf.EnumValueOptions in your .proto file you will need to add

[protobuf] Re: Generate .proto file from FileDescriptor?

2011-02-04 Thread Ben Wright
Anyone know if this can be accomplished without resorting to JNI? On Feb 3, 4:01 pm, Jason Hsueh jas...@google.com wrote: C++'s FileDescriptor::DebugString() produces text that is reparsable as a .proto file On Thu, Feb 3, 2011 at 12:52 PM, Ben Wright compuware...@gmail.com wrote: I've