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
return status;
			} else if (checkValue(PREF_CODEGEN_TARGET_PLATFORM, VERSION_1_4)) {
				status.setError(PreferencesMessages.getString("CompilerConfigurationBlock.cpl13trg14.error")); 
				return status;
			}
		}
		if (checkValue(PREF_SOURCE_COMPATIBILITY, VERSION_1_4)) {
			if (!checkValue(PREF_PB_ASSERT_AS_IDENTIFIER, ERROR)) {
				status.setError(PreferencesMessages.getString("CompilerConfigurationBlock.src14asrterr.error")); 
				return status;
			}
		}
		if (checkValue(PREF_SOURCE_COMPATIBILITY, VERSION_1_4)) {
			if (!checkValue(PREF_CODEGEN_TARGET_PLATFORM, VERSION_1_4)) {
				status.setError(PreferencesMessages.getString("CompilerConfigurationBlock.src14tgt14.error")); 
				return status;
			}
		}
		return status;
	}
	
	private IStatus validateMaxNumberProblems() {
		String number= (String) fWorkingValues.get(PREF_PB_MAX_PER_UNIT);
		StatusInfo status= new StatusInfo();
		if (number.length() == 0) {
			status.setError(PreferencesMessages.getString("CompilerConfigurationBlock.empty_input")); 
		} else {
			try {
				int value= Integer.parseInt(number);
				if (value <= 0) {