nnmatveev / idea-plugin-protobuf

Google Protocol Buffes support for Intellij IDEA
Other
120 stars 39 forks source link

package: unresolved reference #59

Open dlazerka opened 10 years ago

dlazerka commented 10 years ago

Thanks for plugin! Here's sample of foo.proto file that shows error:

package foo;

I believe this is valid .proto file, but plugin marks it as "unresolved reference".

tcripps commented 10 years ago

I think you're correct. The plugin tries to match the package definition with a package in the java sources of the project. If it can't, it considers it an error. I think this is correct behavior as the declaration implicitly sets the package of generated java source files.

However, I think the plugin should ignore the first declaration if you have explicitly declared a java package:

option java_package = "some.package";

It doesn't currently do this.