Search in sources :

Example 1 with FileFieldEditor

use of org.eclipse.jface.preference.FileFieldEditor in project tdi-studio-se by Talend.

the class DocumentationPreferencePage method createFieldEditors.

/*
     * (non-Javadoc)
     * 
     * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
     */
@Override
protected void createFieldEditors() {
    sourceCodeGenFieldEditor = new BooleanFieldEditor(ITalendCorePrefConstants.DOC_GENERATESOURCECODE, org.talend.repository.i18n.Messages.getString("DocumentationPreferencePage.sourceCodeToHTML"), //$NON-NLS-1$
    getFieldEditorParent());
    addField(sourceCodeGenFieldEditor);
    generateLatestVersionFieldEditor = new BooleanFieldEditor(ITalendCorePrefConstants.DOC_GENERATE_LASTEST_VERSION, Messages.getString("PerformancePreferencePage.generateLatestVersion"), //$NON-NLS-1$
    getFieldEditorParent());
    addField(generateLatestVersionFieldEditor);
    // see the bug 7073,qli
    if (isDocumentationPluginLoaded) {
        BooleanFieldEditor booleanFieldEditor = new BooleanFieldEditor(ITalendCorePrefConstants.DOC_GENERATION, Messages.getString("PerformancePreferencePage.autoUpdateDoc"), //$NON-NLS-1$
        getFieldEditorParent());
        addField(booleanFieldEditor);
        FileFieldEditor documentationLogo = new FileFieldEditor(ITalendCorePrefConstants.DOC_USER_LOGO, Messages.getString("DocumentationPreferencePage.userDocLogo"), getFieldEditorParent());
        addField(documentationLogo);
        StringFieldEditor companyName = new StringFieldEditor(ITalendCorePrefConstants.DOC_COMPANY_NAME, Messages.getString("DocumentationPreferencePage.companyName"), getFieldEditorParent());
        addField(companyName);
    }
    useCss = new BooleanFieldEditor(ITalendCorePrefConstants.USE_CSS_TEMPLATE, Messages.getString("DocumentationPreferencePage.use_css_template"), //$NON-NLS-1$
    getFieldEditorParent());
    addField(useCss);
    documentCssFile = new FileFieldEditor(ITalendCorePrefConstants.CSS_FILE_PATH, Messages.getString("DocumentationPreferencePage.css_file"), //$NON-NLS-1$
    getFieldEditorParent());
    //$NON-NLS-1$
    documentCssFile.setFileExtensions(new String[] { "*.css" });
    addField(documentCssFile);
    activateFields(getPreferenceStore().getBoolean(ITalendCorePrefConstants.USE_CSS_TEMPLATE));
    addCssFileListener();
}
Also used : StringFieldEditor(org.eclipse.jface.preference.StringFieldEditor) FileFieldEditor(org.eclipse.jface.preference.FileFieldEditor) BooleanFieldEditor(org.eclipse.jface.preference.BooleanFieldEditor)

Example 2 with FileFieldEditor

use of org.eclipse.jface.preference.FileFieldEditor in project gfm_viewer by satyagraha.

the class PreferencePage method createFieldEditors.

/**
     * Creates the field editors. Field editors are abstractions of the common
     * GUI blocks needed to manipulate various types of preferences. Each field
     * editor knows how to save and restore itself.
     */
@Override
public void createFieldEditors() {
    Composite parent = getFieldEditorParent();
    addField(new BooleanFieldEditor(P_USE_TEMP_DIR, "Use temp dir", parent));
    addField(new StringFieldEditor(P_API_URL, "API URL:", parent));
    addField(new StringFieldEditor(P_USERNAME, "Username:", parent));
    StringFieldEditor passwordFieldEditor = new StringFieldEditor(P_PASSWORD, "Password:", parent);
    passwordFieldEditor.getTextControl(parent).setEchoChar('*');
    addField(passwordFieldEditor);
    FileFieldEditor templateEditor = new FileFieldEditor(P_TEMPLATE, "Template File:", true, parent);
    templateEditor.setFilterPath(File.listRoots()[0]);
    addField(templateEditor);
    addField(new StringFieldEditor(P_CSS_URL_1, "CSS URL 1:", parent));
    addField(new StringFieldEditor(P_CSS_URL_2, "CSS URL 2:", parent));
    addField(new StringFieldEditor(P_CSS_URL_3, "CSS URL 3:", parent));
    addField(new StringFieldEditor(P_JS_URL_1, "JS URL 1:", parent));
    addField(new StringFieldEditor(P_JS_URL_2, "JS URL 2:", parent));
    addField(new StringFieldEditor(P_JS_URL_3, "JS URL 3:", parent));
    addField(new BooleanFieldEditor(P_USE_ECLIPSE_CONSOLE, "Use Eclipse Console", parent));
    addField(new StringFieldEditor(P_MARKDOWN_EXTENSIONS, "Markdown Extensions", parent));
}
Also used : StringFieldEditor(org.eclipse.jface.preference.StringFieldEditor) FileFieldEditor(org.eclipse.jface.preference.FileFieldEditor) Composite(org.eclipse.swt.widgets.Composite) BooleanFieldEditor(org.eclipse.jface.preference.BooleanFieldEditor)

Example 3 with FileFieldEditor

use of org.eclipse.jface.preference.FileFieldEditor in project linuxtools by eclipse.

the class RpmlintPreferencePage method createFieldEditors.

@Override
protected void createFieldEditors() {
    FileFieldEditor rpmlintFileFieldEditor = new FileFieldEditor(PreferenceConstants.P_RPMLINT_PATH, Messages.RpmlintPreferencePage_0, getFieldEditorParent());
    addField(rpmlintFileFieldEditor);
    RadioGroupFieldEditor spacesAndTabsRadioGroup = new RadioGroupFieldEditor(PreferenceConstants.P_RPMLINT_TABS_AND_SPACES, Messages.RpmlintPreferencePage_1, 1, new String[][] { { Messages.RpmlintPreferencePage_2, PreferenceConstants.P_RPMLINT_SPACES }, { Messages.RpmlintPreferencePage_3, PreferenceConstants.P_RPMLINT_TABS } }, getFieldEditorParent(), true);
    addField(spacesAndTabsRadioGroup);
}
Also used : FileFieldEditor(org.eclipse.jface.preference.FileFieldEditor) RadioGroupFieldEditor(org.eclipse.jface.preference.RadioGroupFieldEditor)

Example 4 with FileFieldEditor

use of org.eclipse.jface.preference.FileFieldEditor in project knime-core by knime.

the class MetaInfoPreferencePage method createFieldEditors.

/**
 * {@inheritDoc}
 */
@Override
protected void createFieldEditors() {
    addField(new FileFieldEditor(MetaInfoFile.PREF_KEY_META_INFO_TEMPLATE_WF, "Meta Info Template for workflows:", true, getFieldEditorParent()));
    addField(new FileFieldEditor(MetaInfoFile.PREF_KEY_META_INFO_TEMPLATE_WFS, "Meta Info Template for workflow sets:", true, getFieldEditorParent()));
}
Also used : FileFieldEditor(org.eclipse.jface.preference.FileFieldEditor)

Example 5 with FileFieldEditor

use of org.eclipse.jface.preference.FileFieldEditor in project jop by jop-devel.

the class JOPPropertyPage method createFieldEditors.

/* (non-Javadoc)
     * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
     */
@Override
protected void createFieldEditors() {
    jopDirectoryEditor = new DirectoryFieldEditor(IJOPLaunchConfigurationConstants.ATTR_JOP_HOME, "JOP Directory", getFieldEditorParent());
    jopDirectoryEditor.setEmptyStringAllowed(false);
    jopDirectoryEditor.setErrorMessage("Not a valid JOP directory");
    addField(jopDirectoryEditor);
    quartusProjectFileEditor = new FileFieldEditor(IJOPLaunchConfigurationConstants.ATTR_QUARTUS_PROJECT, "Quartus project file", getFieldEditorParent());
    quartusProjectFileEditor.setEmptyStringAllowed(false);
    quartusProjectFileEditor.setFileExtensions(new String[] { "*.qpf" });
    quartusProjectFileEditor.setErrorMessage("Not a valid Quartus project file");
    addField(quartusProjectFileEditor);
    System.err.printf("Created field editors%n");
}
Also used : FileFieldEditor(org.eclipse.jface.preference.FileFieldEditor) DirectoryFieldEditor(org.eclipse.jface.preference.DirectoryFieldEditor)

Aggregations

FileFieldEditor (org.eclipse.jface.preference.FileFieldEditor)5 BooleanFieldEditor (org.eclipse.jface.preference.BooleanFieldEditor)2 StringFieldEditor (org.eclipse.jface.preference.StringFieldEditor)2 DirectoryFieldEditor (org.eclipse.jface.preference.DirectoryFieldEditor)1 RadioGroupFieldEditor (org.eclipse.jface.preference.RadioGroupFieldEditor)1 Composite (org.eclipse.swt.widgets.Composite)1