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
protected IStatus run(IProgressMonitor monitor) {
				try {
					if (!hasSameEncoding) {
						if (resource instanceof IContainer) {
							((IContainer) resource).setDefaultCharset(
									finalEncoding, monitor);
						} else {
							((IFile) resource).setCharset(finalEncoding,
									monitor);
						}
					}
					if (!hasSameSeparateDerivedEncodings) {
						Preferences prefs = new ProjectScope((IProject) resource).getNode(ResourcesPlugin.PI_RESOURCES);
						if (getStoredSeparateDerivedEncodingsValue())
							prefs.remove(ResourcesPlugin.PREF_SEPARATE_DERIVED_ENCODINGS);
						else
							prefs.putBoolean(ResourcesPlugin.PREF_SEPARATE_DERIVED_ENCODINGS, true);
					}
					return Status.OK_STATUS;
				} catch (CoreException e) {
					
					IDEWorkbenchPlugin
							.log(
									IDEWorkbenchMessages.ResourceEncodingFieldEditor_ErrorStoringMessage,
									e.getStatus());
					return e.getStatus();
				}
			}
		};
		charsetJob.schedule();