Bug 101619 [formatter] Formatter profiles store even though I clicked 'Cancel'
I20050624-0010 1. open the formatter preference page 2. switch from existing profile p1 to another, lets say p2 3. click 'Cancel' Expected: my formatter profile is still p1 but it is now p2.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/ProfileVersioner.java
public static final int CURRENT_VERSION= VERSION_8;
	
	public static void updateAndComplete(CustomProfile profile) {
		final Map oldSettings= profile.getSettings();
		Map newSettings= updateAndComplete(oldSettings, profile.getVersion());
		profile.setVersion(CURRENT_VERSION);
		profile.setSettings(newSettings);
	}
	
	public static Map updateAndComplete(Map oldSettings, int version) {
		final Map newSettings= ProfileManager.getDefaultSettings();
		
		switch (version) {
		case VERSION_1:
			version1to2(oldSettings);
			
		case VERSION_2:
			version2to3(oldSettings);
			
		case VERSION_3:
		    version3to4(oldSettings);
		    
		case VERSION_4:
		    version4to5(oldSettings);
		    
		case VERSION_5:
		    version5to6(oldSettings);
			
		case VERSION_6:
		    version6to7(oldSettings);