Bug 11673 ESC does not cancel Apply when changing compiler options
build 20020319 Workbench->Preferences->Java->Compiler 1) Start with the default settings 2) Change "Unused local variables" to "Warning" 3) Hit Apply button 4) Dialog shows up asking if user wants a full rebuild 5) Hit Cancel to exit yes/no dialog 6) Hit cancel to exit preferences 7) Go back to the same preferences page 8) "Unused local variables" was set to "Warning" The expected behaviour was to cancel the dialog (none of the options) and cancel the preferences without modifying anything. It seems that ESC is the same as hitting NO in that dialog.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CompilerPreferencePage.java
private void updateComplianceDefaultSettings() {
		Object complianceLevel= fWorkingValues.get(PREF_COMPLIANCE);
		if (VERSION_1_3.equals(complianceLevel)) {
			fWorkingValues.put(PREF_PB_ASSERT_AS_IDENTIFIER, IGNORE);
			fWorkingValues.put(PREF_SOURCE_COMPATIBILITY, VERSION_1_3);
			fWorkingValues.put(PREF_CODEGEN_TARGET_PLATFORM, VERSION_1_1);
		} else if (VERSION_1_4.equals(complianceLevel)) {
			fWorkingValues.put(PREF_PB_ASSERT_AS_IDENTIFIER, ERROR);
			fWorkingValues.put(PREF_SOURCE_COMPATIBILITY, VERSION_1_4);
			fWorkingValues.put(PREF_CODEGEN_TARGET_PLATFORM, VERSION_1_4);
		}
		updateControls();
	}
	
	/*
	 * Evaluate if the current compliance setting correspond to a default setting
	 */
	private String getCurrentCompliance() {
		Object complianceLevel= fWorkingValues.get(PREF_COMPLIANCE);
		if ((VERSION_1_3.equals(complianceLevel)
				&& checkValue(PREF_PB_ASSERT_AS_IDENTIFIER, IGNORE)
				&& checkValue(PREF_SOURCE_COMPATIBILITY, VERSION_1_3)
				&& checkValue(PREF_CODEGEN_TARGET_PLATFORM, VERSION_1_1))
			|| (VERSION_1_4.equals(complianceLevel)
				&& checkValue(PREF_PB_ASSERT_AS_IDENTIFIER, ERROR)
				&& checkValue(PREF_SOURCE_COMPATIBILITY, VERSION_1_4)
				&& checkValue(PREF_CODEGEN_TARGET_PLATFORM, VERSION_1_4))) {
			return DEFAULT;
		}
		return USER;