Reputation: 10346
I am wondering if it possible to, for example, set the warning level for unused import statements on files that end in *Impl.java?
I know I can use the @SupressWarnings annotations, but the files that I want excluded are built from another project. I simply want to ignore their problems...at least for the time being.
I don't see any customizable options that would achieve this and my Google-Fu is failing me.
I assume it is simply not an available option, but I thought I would ask the experts before I wrote it off completely.
Thanks!
Upvotes: 1
Views: 1211
Reputation: 13222
Perhaps keep those files in a different project. Set the project settings so it doesn't display the warnings. Than include this project in your current project. Not sure if it works and if this is what you wants but it might be a workaround.
Upvotes: 1
Reputation: 11923
Go to Window > Preferences > Java > Compiler > Errors/Warnings
This menu gives you the option to choose which occurrences of events you want to treat as error/warning/not-at-all.
(There are more places where you can configure additional cases, e.g. Window > Preferences > Java Persistence > Errors/Warnings
for the Java Persistence framework. To find them all use the in-menu search (top left corner in the preferences menu) and search for 'warning' or something like that.)
As far as I know it is not possible to specify any further conditions for the configuration of the warn levels.
Isn't it an option to just switch the option to 'ignore' for the time you work on this specific project?
A work around could be to have a second workspace just for that project. As eclipse saves its preferences workspace-wise this would not affect your other projects.
Upvotes: 2