Bug 97308 [Preferences] "New text file encoding / line delimiter" preferences should be on General > Workspace
I20050527-1300 On Preferences > General > Editors, there are two preferences that don't really belong there: "New text file encoding" and "New text file line delimiter" are also applicable without editors and should therefore be on General > Workspace.
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/dialogs/AbstractEncodingFieldEditor.java
if (selectedEncoding == null)
			encodingCombo.setText(getDefaultEnc());
		else
			encodingCombo.setText(selectedEncoding);
	}
	private void updateEncodingState(boolean useDefault) {
		defaultEncodingButton.setSelection(useDefault);
		otherEncodingButton.setSelection(!useDefault);
		encodingCombo.setEnabled(!useDefault);
		updateValidState();
	}
	private void updateValidState() {
		boolean isValidNow = isEncodingValid();
		if (isValidNow != isValid) {
			isValid = isValidNow;
			if (isValid) {
				clearErrorMessage();
			} else {
				showErrorMessage(IDEWorkbenchMessages.WorkbenchPreference_unsupportedEncoding);
			}
			fireStateChanged(IS_VALID, !isValid, isValid);
			String newValue = getSelectedEncoding();
			if (isValid && !newValue.equals(oldSelectedEncoding)) {
				fireValueChanged(VALUE, oldSelectedEncoding, newValue);
				oldSelectedEncoding = newValue;
			}
		}
	}
	/**
	 * Returns the currently selected encoding.