Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Eclipse be configured to disable warnings for derived source files?

I am using ANTLR to generate Java source files. I can make Eclipse understand the generated files are derived, but it still gives me warnings about harmless things (e.g. unnecessary imports and so on). I would like to configure Eclipse to ignore derived files when showing warnings. Is this possible?

like image 670
Gabe Johnson Avatar asked Nov 24 '09 21:11

Gabe Johnson


People also ask

How can I see warnings in eclipse?

Click on the small triangle in the upper right corner of the problems view and select "Configure Contents". In that dialog check "Show all items" and uncheck "Use item limits" to show all warnings.


1 Answers

I'm afraid that what you see (in the Preferences) is what you get.

However, if you're going to have ANTLR producing code for you anyway, why not go one step further and have your build script (ant, Maven, ...) wrap that code into a Jar for you? Set up that Jar file as your dependency in Eclipse and Eclipse won't have to look at the ugly auto-generated code and throw a fit about it.

like image 140
Carl Smotricz Avatar answered Nov 15 '22 22:11

Carl Smotricz