Bug 56465 Compiler compiliance setting and 'assert' is missleading [build path]
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.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CompilerConfigurationBlock.java
private static final String PREF_PB_UNDOCUMENTED_EMPTY_BLOCK= JavaCore.COMPILER_PB_UNDOCUMENTED_EMPTY_BLOCK;
	private static final String PREF_PB_FINALLY_BLOCK_NOT_COMPLETING= JavaCore.COMPILER_PB_FINALLY_BLOCK_NOT_COMPLETING;
	private static final String PREF_PB_UNUSED_DECLARED_THROWN_EXCEPTION= JavaCore.COMPILER_PB_UNUSED_DECLARED_THROWN_EXCEPTION;
	private static final String PREF_PB_UNUSED_DECLARED_THROWN_EXCEPTION_WHEN_OVERRIDING= JavaCore.COMPILER_PB_UNUSED_DECLARED_THROWN_EXCEPTION_WHEN_OVERRIDING;
	private static final String PREF_PB_UNQUALIFIED_FIELD_ACCESS= JavaCore.COMPILER_PB_UNQUALIFIED_FIELD_ACCESS;
	
	private static final String INTR_DEFAULT_COMPLIANCE= "internal.default.compliance"; 
	
	private static final String GENERATE= JavaCore.GENERATE;
	private static final String DO_NOT_GENERATE= JavaCore.DO_NOT_GENERATE;
	
	private static final String PRESERVE= JavaCore.PRESERVE;
	private static final String OPTIMIZE_OUT= JavaCore.OPTIMIZE_OUT;
	
	private static final String VERSION_1_1= JavaCore.VERSION_1_1;
	private static final String VERSION_1_2= JavaCore.VERSION_1_2;
	private static final String VERSION_1_3= JavaCore.VERSION_1_3;
	private static final String VERSION_1_4= JavaCore.VERSION_1_4;
	
	private static final String ERROR= JavaCore.ERROR;
	private static final String WARNING= JavaCore.WARNING;
	private static final String IGNORE= JavaCore.IGNORE;
	private static final String ABORT= JavaCore.ABORT;
	private static final String CLEAN= JavaCore.CLEAN;
	private static final String ENABLED= JavaCore.ENABLED;
	private static final String DISABLED= JavaCore.DISABLED;
	
	private static final String PUBLIC= JavaCore.PUBLIC;
	private static final String PROTECTED= JavaCore.PROTECTED;
	private static final String DEFAULT= JavaCore.DEFAULT;