Project: JDT
Bug 56465 Compiler compiliance setting and 'assert' is missleading [build path]
Reported: 2004-03-27 10:26:31 | Status: resolved fixed

The preference page for compiler compliance settings is missleading. Allthough they don't allow illegal combinations it is uncommon to change settings that are fixed in some states. Example (from a posting): ---- 3.0 M8 will not allow me to set "Compiler/Compliance and Classfiles/Source compatibility" to 1.4 when I have "Compiler Compliance Level" and "Source Compatibility" to 1.4 and "Disallow identifiers called 'assert'" to "ignore". The error I get is: When source compatibility is 1.4, 'assert' cannot be an identifier. This makes M8 completely unusable for me since I have tons of asserts in all my code. Any workaround? Steve Buroff ---- This is not a good UI. If the source compatibility is set to 1.4 then "Disallow identifiers called 'assert'" should be automatically set to "error" and the control should be disabled to indicate that this setting is not changable when source compatibility is set to 1.4. The current behavior confuses users (as seen above) and should be changed to a more smart behavior. We don't need to show error messages when we can solve them automatically.

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CompilerConfigurationBlock.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/OptionsConfigurationBlock.java