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/CodeFormatterConfigurationBlock.java
protected final ProfileManager fProfileManager;
	
	/**
	 * The JavaPreview.
	 */
	protected CompilationUnitPreview fJavaPreview;
	private PixelConverter fPixConv;
	private IScopeContext fCurrContext;
	
	/**
	 * Create a new <code>CodeFormatterConfigurationBlock</code>.
	 */
	public CodeFormatterConfigurationBlock(IProject project) {
		List profiles= null;
		try {
		    profiles= ProfileStore.readProfiles();
		} catch (CoreException e) {
			JavaPlugin.log(e);
		}
		
		if (profiles == null) 
		    profiles= new ArrayList();
		
		if (project != null) {
			fCurrContext= new ProjectScope(project);
		} else {
			fCurrContext= new InstanceScope();
		}
		
		fProfileManager= new ProfileManager(profiles, fCurrContext);