Bug 332930 Simplify code from bug 207510
There is a listener added to ProjectPreferences that will never be removed. Try to simplify the code to get rid of this listener.
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/dialogs/ResourceEncodingFieldEditor.java
}
	/* (non-Javadoc)
	 * @see org.eclipse.jface.preference.FieldEditor#doLoadDefault()
	 */
	protected void doLoadDefault() {
		super.doLoadDefault();
		if (separateDerivedEncodingsButton != null)
			separateDerivedEncodingsButton
					.setSelection(getStoredSeparateDerivedEncodingsValue());
	}
	/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.ui.ide.dialogs.AbstractEncodingFieldEditor#findDefaultEncoding()
	 */
	protected String findDefaultEncoding() {
		if (resource instanceof IWorkspaceRoot) {
			return super.findDefaultEncoding();
		}
		String defaultCharset = getCharsetFromDescription();
		if (defaultCharset != null && defaultCharset.length() > 0) {
			return defaultCharset;
		}
		try {
			
			defaultCharset = resource.getParent().getDefaultCharset(true);
		} catch (CoreException exception) {
			
		}
		if (defaultCharset != null && defaultCharset.length() > 0) {