Class ResourceEncodingFieldEditor


  • public final class ResourceEncodingFieldEditor
    extends AbstractEncodingFieldEditor
    The ResourceEncodingFieldEditor is a field editor for editing the encoding of a resource and does not use a preference store.

    This class may be instantiated; it is not intended to be subclassed.

    Since:
    3.1
    • Constructor Detail

      • ResourceEncodingFieldEditor

        public ResourceEncodingFieldEditor​(String labelText,
                                           Composite parent,
                                           IResource charsetResource)
        Creates a new encoding field editor for setting the encoding on the given resource.
        Parameters:
        labelText - the label text of the field editor
        parent - the parent of the field editor's control
        charsetResource - must be an IContainer or an IFile.
        See Also:
        IContainer.getDefaultCharset(), IFile.getCharset()
    • Method Detail

      • doStore

        protected void doStore()
        Description copied from class: FieldEditor
        Stores the preference value from this field editor into the preference store.

        Subclasses must implement this method to save the entered value into the preference store.

        Specified by:
        doStore in class FieldEditor
      • store

        public void store()
        Description copied from class: FieldEditor
        Stores this field editor's value back into the preference store.
        Overrides:
        store in class FieldEditor
      • load

        public void load()
        Description copied from class: FieldEditor
        Initializes this field editor with the preference value from the preference store.
        Overrides:
        load in class FieldEditor
      • loadDefault

        public void loadDefault()
        Description copied from class: FieldEditor
        Initializes this field editor with the default preference value from the preference store.
        Overrides:
        loadDefault in class FieldEditor
      • doLoadDefault

        protected void doLoadDefault()
        Description copied from class: FieldEditor
        Initializes this field editor with the default preference value from the preference store.

        Subclasses must implement this method to properly initialize the field editor.

        Overrides:
        doLoadDefault in class AbstractEncodingFieldEditor
      • setEnabled

        public void setEnabled​(boolean enabled,
                               Composite parent)
        Description copied from class: FieldEditor
        Set whether or not the controls in the field editor are enabled.
        Overrides:
        setEnabled in class AbstractEncodingFieldEditor
        Parameters:
        enabled - The enabled state.
        parent - The parent of the controls in the group. Used to create the controls if required.