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/ModifyDialog.java
}
	
	private void applyPressed() {
		 if (fProfile instanceof BuiltInProfile) {
		 	CustomProfile newProfile= new CustomProfile("", new HashMap(fWorkingValues), ProfileVersioner.CURRENT_VERSION); 
		 	RenameProfileDialog dialog= new RenameProfileDialog(getShell(), newProfile, fProfileManager);
		 	if (dialog.open() != Window.OK) {
		 		return;
		 	}
		 	fProfileManager.addProfile(newProfile);
			fProfile= newProfile;
		    fStandardStatus= new Status(IStatus.OK, JavaPlugin.getPluginId(), IStatus.OK, "", null); 
			updateStatus(fStandardStatus);
		 } else {
		 	fProfile.setSettings(new HashMap(fWorkingValues));
		 }
		 fApplyButton.setEnabled(false);
	}
    
    protected void createButtonsForButtonBar(Composite parent) {
	    fApplyButton= createButton(parent, IDialogConstants.CLIENT_ID, FormatterMessages.ModifyDialog_apply_button, false); 
		fApplyButton.setEnabled(false);
		
		GridLayout layout= (GridLayout) parent.getLayout();
		layout.numColumns++;
		layout.makeColumnsEqualWidth= false;
		Label label= new Label(parent, SWT.NONE);
		GridData data= new GridData();
		data.widthHint= layout.horizontalSpacing;
		label.setLayoutData(data);