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
IPath location = resolvedLocation;
		if (resource.isLinked()) {
			location = resource.getRawLocation();
		}
		if (location == null) {
			return NOT_EXIST_TEXT;
		} else {
			String locationString = location.toOSString();
			if (resolvedLocation != null && !isPathVariable(resource)) {
				
				
				File file = resolvedLocation.toFile();
				if (!file.exists()) {
					locationString += " " + FILE_NOT_EXIST_TEXT;  
				}
			}
			return locationString;
		}
	}
	/**
	 * Get the resolved location of a resource. This resolves path variables if
	 * present in the resource path.
	 */
	private String getResolvedLocationText(IResource resource) {
		if (!resource.isLocal(IResource.DEPTH_ZERO))
			return NOT_LOCAL_TEXT;
		IPath location = resource.getLocation();
		if (location == null) {
			if (resource.isLinked())
				return MISSING_PATH_VARIABLE_TEXT;