Example usage for org.eclipse.jface.preference FieldEditor getPreferenceName

List of usage examples for org.eclipse.jface.preference FieldEditor getPreferenceName

Introduction

In this page you can find the example usage for org.eclipse.jface.preference FieldEditor getPreferenceName.

Prototype

public String getPreferenceName() 

Source Link

Document

Returns the name of the preference this field editor operates on.

Usage

From source file:org.xmind.cathy.internal.GeneralPrefPage.java

License:Open Source License

public void propertyChange(PropertyChangeEvent event) {
    super.propertyChange(event);
    if (event.getSource() instanceof FieldEditor) {
        FieldEditor fe = (FieldEditor) event.getSource();
        if (event.getProperty().equals(FieldEditor.VALUE)) {
            String prefName = fe.getPreferenceName();
            if (CathyPlugin.AUTO_SAVE_ENABLED.equals(prefName)) {
                autoSaveIntervalsInput.setEnabled(((Boolean) event.getNewValue()).booleanValue());
                //                    autoSaveIntervalsField.setEnabled(
                //                            (Boolean) event.getNewValue(),
                //                            autoSaveIntervalsParent);
            } else if (PrefConstants.AUTO_BACKUP_ENABLE.equals(prefName)) {
                autoBackup = ((Boolean) event.getNewValue()).booleanValue();
            }//from   w ww.j a  v  a 2s  .  c  o m
        }
    }
}

From source file:org.xmind.ui.internal.spelling.SpellingCheckPrefPage.java

License:Open Source License

public void propertyChange(PropertyChangeEvent event) {
    FieldEditor field = (FieldEditor) event.getSource();
    if (SpellingPlugin.SPELLING_CHECK_ENABLED.equals(field.getPreferenceName())) {
        updateOptions(((BooleanFieldEditor) field).getBooleanValue());
    }/* w  w w .  j  ava  2  s  . c  om*/
    super.propertyChange(event);
}