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 ((IFile) resource).getCharset(false);
		} catch (CoreException e) {
			IDEWorkbenchPlugin
					.log(
							IDEWorkbenchMessages.ResourceEncodingFieldEditor_ErrorLoadingMessage,
							e.getStatus());
			return WorkbenchEncoding.getWorkbenchDefaultEncoding();
		}
	}
	private boolean getStoredSeparateDerivedEncodingsValue() {
		
		Preferences node = Platform.getPreferencesService().getRootNode()
				.node(ProjectScope.SCOPE);
		String projectName = ((IProject) resource).getName();
		try {
			
			
			
			
			if (!node.nodeExists(projectName))
				return false;
			node = node.node(projectName);
			if (!node.nodeExists(ResourcesPlugin.PI_RESOURCES))
				return false;
			node = node.node(ResourcesPlugin.PI_RESOURCES);
			return node.getBoolean(
					ResourcesPlugin.PREF_SEPARATE_DERIVED_ENCODINGS, false);
		} catch (BackingStoreException e) {
			
			return false;