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 boolean deleteSelected() {
		if (!(fSelected instanceof CustomProfile)) 
			return false;
		
		Profile removedProfile= fSelected;
		
		int index= fProfilesByName.indexOf(removedProfile);
		
		fProfiles.remove(removedProfile.getID());
		fProfilesByName.remove(removedProfile);
		
		((CustomProfile)removedProfile).setManager(null);
		
		if (index >= fProfilesByName.size())
			index--;
		fSelected= (Profile) fProfilesByName.get(index);
		if (!removedProfile.isSharedProfile()) {
			updateProfilesWithName(removedProfile.getID(), null);
		}
		
		notifyObservers(PROFILE_DELETED_EVENT);
		return true;
	}
	
	public void profileRenamed(CustomProfile profile, String oldID) {
		fProfiles.remove(oldID);
		fProfiles.put(profile.getID(), profile);
		if (!profile.isSharedProfile()) {
			updateProfilesWithName(oldID, profile);