Search in sources :

Example 6 with FieldEditor

use of org.eclipse.jface.preference.FieldEditor in project AutoRefactor by JnRouvignac.

the class WorkspacePreferencePage method initialize.

/** Initialize. */
protected void initialize() {
    if (fields != null) {
        for (final FieldEditor field : fields) {
            field.setPage(this);
            field.setPreferenceStore(getPreferenceStore());
            field.load();
        }
    }
}
Also used : BooleanFieldEditor(org.eclipse.jface.preference.BooleanFieldEditor) FieldEditor(org.eclipse.jface.preference.FieldEditor)

Example 7 with FieldEditor

use of org.eclipse.jface.preference.FieldEditor in project AutoRefactor by JnRouvignac.

the class WorkspacePreferencePage method checkState.

/** Check the state. */
protected void checkState() {
    boolean valid = true;
    invalidFieldEditor = null;
    if (fields != null) {
        for (final FieldEditor field : fields) {
            valid = field.isValid();
            if (!valid) {
                invalidFieldEditor = field;
                break;
            }
        }
    }
    setValid(valid);
}
Also used : BooleanFieldEditor(org.eclipse.jface.preference.BooleanFieldEditor) FieldEditor(org.eclipse.jface.preference.FieldEditor)

Example 8 with FieldEditor

use of org.eclipse.jface.preference.FieldEditor in project tesb-studio-se by Talend.

the class FieldLayoutPreferencePage method initialize.

/**
     * Initializes all field editors.
     */
protected void initialize() {
    if (m_fields != null) {
        Iterator<FieldEditor> I = m_fields.iterator();
        while (I.hasNext()) {
            FieldEditor editor = I.next();
            editor.setPage(null);
            editor.setPropertyChangeListener(this);
            editor.setPreferenceStore(getPreferenceStore());
            editor.load();
        }
    }
}
Also used : FieldEditor(org.eclipse.jface.preference.FieldEditor)

Example 9 with FieldEditor

use of org.eclipse.jface.preference.FieldEditor in project tesb-studio-se by Talend.

the class FieldLayoutPreferencePage method performOk.

/**
     * The field editor preference page implementation of this <code>PreferencePage</code> method saves all field
     * editors by calling <code>FieldEditor.store</code>. Note that this method does not save the preference store
     * itself; it just stores the values back into the preference store.
     *
     * @see FieldEditor#store()
     */
@Override
public boolean performOk() {
    if (m_fields != null) {
        Iterator<FieldEditor> I = m_fields.iterator();
        while (I.hasNext()) {
            FieldEditor editor = I.next();
            editor.store();
        }
    }
    return true;
}
Also used : FieldEditor(org.eclipse.jface.preference.FieldEditor)

Example 10 with FieldEditor

use of org.eclipse.jface.preference.FieldEditor in project tesb-studio-se by Talend.

the class FieldLayoutPreferencePage method performDefaults.

/**
     * The field editor preference page implementation of a <code>PreferencePage</code> method loads all the field
     * editors with their default values.
     */
@Override
protected void performDefaults() {
    if (m_fields != null) {
        Iterator<FieldEditor> I = m_fields.iterator();
        while (I.hasNext()) {
            FieldEditor editor = I.next();
            editor.loadDefault();
        }
    }
    // Force a recalculation of my error state.
    checkState();
    super.performDefaults();
}
Also used : FieldEditor(org.eclipse.jface.preference.FieldEditor)

Aggregations

FieldEditor (org.eclipse.jface.preference.FieldEditor)10 BooleanFieldEditor (org.eclipse.jface.preference.BooleanFieldEditor)5 SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)2 SelectionEvent (org.eclipse.swt.events.SelectionEvent)2 GridData (org.eclipse.swt.layout.GridData)2 Button (org.eclipse.swt.widgets.Button)2 Composite (org.eclipse.swt.widgets.Composite)2 Group (org.eclipse.swt.widgets.Group)2 IOException (java.io.IOException)1 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 RefactoringRule (org.autorefactor.refactoring.RefactoringRule)1 IntegerFieldEditor (org.eclipse.jface.preference.IntegerFieldEditor)1 StringFieldEditor (org.eclipse.jface.preference.StringFieldEditor)1 WizardDialog (org.eclipse.jface.wizard.WizardDialog)1 GridLayout (org.eclipse.swt.layout.GridLayout)1 Label (org.eclipse.swt.widgets.Label)1 InitFinishMessageDialog (org.talend.designer.esb.runcontainer.ui.dialog.InitFinishMessageDialog)1 AddRuntimeWizard (org.talend.designer.esb.runcontainer.ui.wizard.AddRuntimeWizard)1