Community
Participate
Working Groups
I20080918-0100 Add "Set all to Ignore"/Warning/Error buttons to "Errors/Warnings" prefs page, similar to the PDE "API Errors/Warnings" page. This came up during a JDT status call. Do we have a real use case / request for this? If yes, what was the concrete scenario? If this is mainly used to quickly switch off optional compiler warnings and later on reenabling the previous options again, then the "Set all to ..." buttons are not the right UI, since they won't allow to revert to the previous options. In that case, a better solution would be that JDT/Core makes the -nowarn option from the batch compiler also available as a normal compiler option in JavaCore. In the UI, we would then add a master switch like on the Javadoc preference page.
It came up when discussing bug 220928 (problem config per source folder).
Note that the batch compiler argument "-nowarn" is not an option per se. It just clears out all warnings that were put on the command line before "-nowarn". E.g. "-warn:deprecation -warn:boxing -nowarn -warn:emptyBlock" will only warn for empty block usage.
> Note that the batch compiler argument "-nowarn" is not an option per se. From a user's point of view, the -nowarn can be used as a "catch all" option (if put on the command line as last argument). I'm only referring to this use case. The option in the compiler API could also be named differently.
The idea to add core API for global "-nowarn"-like switch would not support the other scenarios in which the user wants to set all to warning or error permanently. We can add the "Set all to: Ignore/Warning/Error" buttons at the UI side though, if someone writes a patch for this. The fix would probably be to extract a method that creates the Ignore/Warning/Error options and collects them in a list while the UI is created. That would spare us from maintaining a separate list of all the affected options.