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/ProfileManager.java
public void setVersion(int version)	{
			fVersion= version;
		}
		
		public int compareTo(Object o) {
			if (o instanceof SharedProfile) {
				return -1;
			}
			if (o instanceof CustomProfile) {
				return getName().compareToIgnoreCase(((Profile)o).getName());
			}
			return 1;
		}
		
		public boolean isProfileToSave() {
			return true;
		}
	}
	
	public final static class SharedProfile extends CustomProfile {
		
		public SharedProfile(Map options) {
			super(FormatterMessages.ProfileManager_unnamed_profile_name0, options, ProfileVersioner.CURRENT_VERSION); 
		}
		
		public Profile rename(String name) {
			CustomProfile profile= new CustomProfile(name.trim(), getSettings(), getVersion());
			if (fManager != null) {
				fManager.profileReplaced(this, profile);