Antlr plugin does not work well with Idea

When using Antlr plugin and Idea plugin, generated sources are not seen by Idea, so “Make” menu option won’t work. The reason is that .java files are generated in build/generated-src/, but Idea plugin excludes the whole build/ directory. Idea does not see files inside it.

A good solution has been suggested on StackOverflow, where build/ directory is not excluded, instead all of its subdirectories except generated-src/ are. Maybe Idea plugin should detect Antlr plugin is loaded and do this by default?

I would suggest that additionally build/generated-src/antlr/main/ directory may be removed from Idea sourceDirs and added to generatedSourceDirs.