since this is pretty much the only place I could find an exact description for the issue I was facing with Idea, I'm replying even if it's an old question.
It turns out that if the .java
file that's generated by the protocol buffers compiler is larger than 2.5MB (default setting), Idea ignores it altogether. Even if there is a .class
file, even if compile/make succeed, even if you build your project just fine with Maven.
To fix that, simply edit your idea.properties
file (it's inside the bin
folder in your Idea installation folder), and either comment out this setting, or set it to something larger than your generated .java
file (in my case, I set it to 15000
, as my generated file is currently about 8MB in size):
#---------------------------------------------------------------------
# Maximum file size (kilobytes) IDE should provide code assistance for.
# The larger file is the slower its editor works and higher overall system memory requirements are
# if code assistance is enabled. Remove this property or set to very large number if you need
# code assistance for any files available regardless their size.
#---------------------------------------------------------------------
idea.max.intellisense.filesize=2500
Note: at least on Linux, where the default update policy seems to be "overwrite the old Idea folder with what you just downloaded", this change must be applied after every update/upgrade.