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
* @see org.eclipse.ui.ide.dialogs.AbstractEncodingFieldEditor#createEncodingGroup(org.eclipse.swt.widgets.Composite,
	 *      int)
	 */
	protected Composite createEncodingGroup(Composite parent, int numColumns) {
		group = super.createEncodingGroup(parent, numColumns);
		String byteOrderLabel = IDEEncoding
				.getByteOrderMarkLabel(getContentDescription());
		if (byteOrderLabel != null) {
			Label label = new Label(group, SWT.NONE);
			label
					.setText(NLS
							.bind(
									IDEWorkbenchMessages.WorkbenchPreference_encoding_encodingMessage,
									byteOrderLabel));
			GridData layoutData = new GridData();
			layoutData.horizontalSpan = numColumns + 1;
			label.setLayoutData(layoutData);
		}
		if (resource.getType() == IResource.PROJECT) {
			separateDerivedEncodingsButton = new Button(group, SWT.CHECK);
			GridData data = new GridData();
			data.horizontalSpan = 2;
			separateDerivedEncodingsButton.setLayoutData(data);
			separateDerivedEncodingsButton
					.setText(IDEWorkbenchMessages.ResourceEncodingFieldEditor_SeparateDerivedEncodingsLabel);
			separateDerivedEncodingsButton
					.setSelection(getStoredSeparateDerivedEncodingsValue());
		}
		return group;
	}