Bug 80429 [Preferences] [Dialogs] FieldEditors should relax requirements to support DialogPages
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/dialogs/ResourceEncodingFieldEditor.java
import org.eclipse.core.runtime.content.IContentDescription;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.ui.WorkbenchEncoding;
import org.eclipse.ui.ide.IDEEncoding;
import org.eclipse.ui.internal.WorkbenchPlugin;
import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
import org.eclipse.ui.internal.misc.Assert;
/**
 * The ResourceEncodingFieldEditor is a field editor for
 * editing the encoding of a resource and does not use a 
 * preference store.
 */
public class ResourceEncodingFieldEditor extends AbstractEncodingFieldEditor {
	/**
	 * The resource being edited.
	 */
	private IResource resource;
	/**
	 * Create a new instance of the receiver for setting the
	 * encoding on charsetResource.
	 * @param labelText
	 * @param parent
	 * @param charsetResource Must be an IContainer or an IFile.