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
return defaultCharset;
		}
		return super.findDefaultEncoding();
	}
	/**
	 * Returns the charset from the content description if there is one.
	 * 
	 * @return the charset from the content description, or <code>null</code>
	 */
	private String getCharsetFromDescription() {
		IContentDescription description = getContentDescription();
		if (description != null) {
			return description.getCharset();
		}
		return null;
	}
	/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.ui.ide.dialogs.AbstractEncodingFieldEditor#defaultButtonText()
	 */
	protected String defaultButtonText() {
		if (resource instanceof IWorkspaceRoot) {
			return super.defaultButtonText();
		}
		if (resource instanceof IFile) {
			try {
				IContentDescription description = ((IFile) resource)
						.getContentDescription();