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
}
		fSelected= profile;
		
		if (context.getName() == ProjectScope.SCOPE) {
			Map map= readFromPreferenceStore(context, profile);
			if (map != null) {
				Profile matching= null;
				for (int i= 0; matching == null && i < fProfilesByName.size(); i++) {
					Profile curr= (Profile) fProfilesByName.get(i);
					if (curr.hasEqualSettings(map, getKeys())) {
						matching= curr;
					}
				}
				if (matching == null) {
					
					SharedProfile shared= new SharedProfile(map);
					shared.setManager(this);
					fProfiles.put(shared.getID(), shared);
					fProfilesByName.add(shared); 
					matching= shared;
				}
				fSelected= matching;
			}
		}
	}
	
	/**
	 * Notify observers with a message. The message must be one of the following:
	 * @param message Message to send out
	 *