everettwilson21 / protobuf-netbeans-plugin

Automatically exported from code.google.com/p/protobuf-netbeans-plugin
0 stars 0 forks source link

Enum definitions outside of message declared as errors #12

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a proto file using the default template.
2. Create an enum type.
3. The syntax parser gives an "unexpected token" error.

What is the expected output? What do you see instead?
Declaring enum outside of a message is valid, the expected output is for no
errors to appear.

What version of the product are you using? On what operating system?
Protobuf Editor reports 2.0.1, Netbeans 6.8.

Please provide any additional information below.

Original issue reported on code.google.com by Ethereal...@gmail.com on 12 Feb 2010 at 4:46

GoogleCodeExporter commented 8 years ago
Tested with:

enum Test {
    MSG1 = 1;
    MSG2 = 2;
}

and works like a charm. 

Send example 'proto' definition that is causing the problem.

Original comment by piotr.tabor on 21 Jun 2010 at 9:13

GoogleCodeExporter commented 8 years ago
I can confirm this bug.
I had this:

.
.
.
enum ReturnType {
  OK = 0;
  FAIL = 1;
}
.
.
.

Original comment by dejan.lekic on 28 Jun 2010 at 9:37

Attachments:

GoogleCodeExporter commented 8 years ago
The problem is not 'enum' support, but  '0' as enum value support. 

It works: 

enum ReturnType {
  OK = 2;
  FAIL = 1;
}

Will fix it. 

Original comment by piotr.tabor on 28 Jun 2010 at 4:20

GoogleCodeExporter commented 8 years ago
True Piotr, thanks for reply and wonderful work! :)

Original comment by dejan.lekic on 29 Jun 2010 at 8:35

GoogleCodeExporter commented 8 years ago
#3 piotr.tabor:
> The problem is not 'enum' support, but  '0' as enum value support.

will this be fixed?
I have lots of enums with 0...

Original comment by supero...@gmail.com on 31 Oct 2011 at 1:24