Bug 56957 [Encoding] Reusable EncodingFieldEditor
I have added the ability to set an encoding for a repository so that commit messages and file names can be properly translated between a client and server whose encodings differ. I have extracted much of the code from IDEEditorsPreferencePage into an EncodingFieldEditor class so I could us it. I was planning on providing a patch to the UI with the hope that this class could be API but there is a roadblock that prevents this. Basically, the encoding preference is in a org.eclipse.core.Preferences node but a field editor requires an IPreferenceStore. There are already two adapters for this is the platform but one is a private inner class of AbstractUIPlugin and the other lives in the text plugin. Instead of creating a patch, I'm just attaching the EncodingFieldEditor class for future consideration.
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceInfoPage.java
return composite;
	}
	/**
	 * Create the isEditable button and it's associated label as a child of
	 * parent using the editableValue of the receiver. The Composite will be the
	 * parent of the button.
	 */
	private void createEditableButton(Composite composite) {
		this.editableBox = new Button(composite, SWT.CHECK | SWT.RIGHT);
		this.editableBox.setAlignment(SWT.LEFT);
		this.editableBox.setText(READ_ONLY);
		this.editableBox.setSelection(this.previousReadOnlyValue);
		this.editableBox.setFont(composite.getFont());
		GridData data = new GridData();
		data.horizontalSpan = 2;
		this.editableBox.setLayoutData(data);
	}
	/**
	 * Create the derived button and it's associated label as a child of parent
	 * using the derived of the receiver. The Composite will be the parent of
	 * the button.
	 */
	private void createDerivedButton(Composite composite) {
		this.derivedBox = new Button(composite, SWT.CHECK | SWT.RIGHT);
		this.derivedBox.setAlignment(SWT.LEFT);
		this.derivedBox.setText(DERIVED);
		this.derivedBox.setSelection(this.previousDerivedValue);
		this.derivedBox.setFont(composite.getFont());
		GridData data = new GridData();
		data.horizontalSpan = 2;