Example usage for org.eclipse.jface.preference StringFieldEditor StringFieldEditor

List of usage examples for org.eclipse.jface.preference StringFieldEditor StringFieldEditor

Introduction

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

Prototype

public StringFieldEditor(String name, String labelText, Composite parent) 

Source Link

Document

Creates a string field editor of unlimited width.

Usage

From source file:org.eclipse.ptp.internal.remote.terminal.TerminalPrefsPage.java

License:Open Source License

@Override
protected void createFieldEditors() {
    Composite parent = getFieldEditorParent();
    addField(new StringFieldEditor(TerminalPrefsInitializer.SHELL_STARTUP_COMMAND,
            Messages.STARTUP_COMMAND_TITLE, parent));
}

From source file:org.eclipse.ptp.pldt.mpi.core.prefs.MPIPreferencePage.java

License:Open Source License

protected void createFieldEditors() {
    BooleanFieldEditor bPrefix = new BooleanFieldEditor(MpiIDs.MPI_RECOGNIZE_APIS_BY_PREFIX_ALONE,
            MPI_RECOGNIZE_APIS_BY_PREFIX_ALONE_LABEL, getFieldEditorParent());
    addField(bPrefix);//  w  w  w.j  a  va2  s.  c  om

    PathEditor pathEditor = new PathEditor(MpiIDs.MPI_INCLUDES, MPI_INCLUDES_PREFERENCE_LABEL,
            MPI_INCLUDES_PREFERENCE_BROWSE, getFieldEditorParent());
    addField(pathEditor);

    StringFieldEditor sed = new StringFieldEditor(MpiIDs.MPI_BUILD_CMD, MPI_BUILD_COMMAND_LABEL,
            getFieldEditorParent());
    addField(sed);

    StringFieldEditor sedCpp = new StringFieldEditor(MpiIDs.MPI_CPP_BUILD_CMD, MPI_CPP_BUILD_COMMAND_LABEL,
            getFieldEditorParent());
    addField(sedCpp);

    BooleanFieldEditor bed = new BooleanFieldEditor(MpiIDs.MPI_PROMPT_FOR_OTHER_INCLUDES,
            PROMPT_FOR_OTHERS_LABEL, getFieldEditorParent());
    addField(bed);

}

From source file:org.eclipse.ptp.remotetools.environment.generichost.preferences.ui.PreferencePage.java

License:Open Source License

@Override
protected void createFieldEditors() {
    // setTitle must be called here or it wont work
    setTitle(Messages.PreferencePage_Title);

    addField(new LabelFieldEditor(Messages.PreferencePage_HeaderConnection, getFieldEditorParent()));

    StringFieldEditor addrfield = new StringFieldEditor(ConfigFactory.ATTR_CONNECTION_ADDRESS,
            Messages.PreferencePage_LabelConnectionAddress, getFieldEditorParent());
    addrfield.setEmptyStringAllowed(true);
    addField(addrfield);//from  w  ww  .  j  a va2 s.  c o  m

    IntegerFieldEditor portfield = new IntegerFieldEditor(ConfigFactory.ATTR_CONNECTION_PORT,
            Messages.PreferencePage_LabelConnectionPort, getFieldEditorParent());
    portfield.setEmptyStringAllowed(false);
    addField(portfield);

    StringFieldEditor userfield = new StringFieldEditor(ConfigFactory.ATTR_LOGIN_USERNAME,
            Messages.PreferencePage_LabelLoginUserName, getFieldEditorParent());
    userfield.setEmptyStringAllowed(true);
    addField(userfield);

    BooleanFieldEditor loggingField = new BooleanFieldEditor(LOGGING_PREF, "Enable logging",
            getFieldEditorParent());
    addField(loggingField);
}

From source file:org.eclipse.ptp.remotetools.environment.launcher.preferences.LauncherPreferencePage.java

License:Open Source License

protected void createFieldEditors() {
    workingDirectory = new StringFieldEditor(LaunchPreferences.ATTR_WORKING_DIRECTORY,
            Messages.LauncherPreferencePage_RemoteWorkingDirectoryLabel, getFieldEditorParent());
    addField(workingDirectory);/*from w  ww  .  j  ava 2 s .  c  om*/
}

From source file:org.eclipse.scanning.event.ui.preference.ActiveMQPage.java

License:Open Source License

@Override
protected void createFieldEditors() {

    final StringFieldEditor uri = new StringFieldEditor(CommandConstants.JMS_URI, "Comamnd Server",
            getFieldEditorParent());/*www  .j ava 2s. c  o  m*/
    addField(uri);

    final StringFieldEditor checking = new StringFieldEditor(CommandConstants.DIR_CHECKING_URI,
            "Directory Permisssion Checker", getFieldEditorParent());
    addField(checking);
}

From source file:org.eclipse.simpl.rrs.transformation.preferences.TransformationPreferencePage.java

License:Apache License

public void createFieldEditors() {
    addField(new StringFieldEditor("TRANSFORMER_ADDRESS", "Transformation Service address:",
            getFieldEditorParent()));/*from   w  ww .ja  v  a 2s  .c o  m*/
}

From source file:org.eclipse.stem.ui.ge.views.GEPreferencePage.java

License:Open Source License

/**
 * 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./*from ww  w. j a  va2  s  .  c  o  m*/
 */
public void createFieldEditors() {

    addField(new RadioGroupFieldEditor(P_METHOD, "&Choose the method used to display STEM results.", 1,
            new String[][] { { "LogOnly    - KML files will be logged for later display", "1" },
                    { "Log+Servlet - KML files logged and displayed by GoogleEarth", "2" },
                    { "AsyncServlet - KML written to Control.kml and Async read by Servlet ", "3" },
                    { "DirectLaunch - At each Nth cycle, directly launch the file to GE ", "4" },
                    { "ManualDisplay - Use DisplayMap command to display", "5" } },
            getFieldEditorParent()));

    addField(new DirectoryFieldEditor(P_FOLDER, "&Folder for KML logging:", getFieldEditorParent()));

    addField(new BooleanFieldEditor(P_INTERNAL_SERVER, "&Use internal webserver", getFieldEditorParent()));

    addField(new StringFieldEditor(P_SERVER_HOST, "Hostname:port for external webserver:",
            getFieldEditorParent()));

    addField(new BooleanFieldEditor(P_AUTO_LAUNCH, "&Automatically startup GoogleEarth",
            getFieldEditorParent()));
    addField(new BooleanFieldEditor(P_AUTO_LOGGING, "&Automatically process every simulation",
            getFieldEditorParent()));

    addField(new IntegerFieldEditor(P_WHICH_CYCLE, "Write KML files only every N th cycle",
            getFieldEditorParent(), 2));
    // if aspect uninitialized, then get from Visualization page
    String a = preferences.getString(P_ASPECT);
    if ("".equals(a)) {
        getVisualizationPreferences();
        //a = preferences.getString(P_ASPECT);
    }

    //GELog.debug(this,"Initial visualizationAspect="+a);
    // if we have initialized the aspects - show selection
    String[][] aspectList = aspects();
    if (aspectList != null) {

        addField(new RadioGroupFieldEditor(P_ASPECT, "&Choose the STEM Aspect to be Logged.", 2, aspects(),
                getFieldEditorParent()));
    }

}

From source file:org.eclipse.stem.ui.populationmodels.preferences.PopulationPreferencePage.java

License:Open Source License

/**
 * 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.
 *//*from  w w w .  jav  a  2  s. c o m*/
@Override
public void createFieldEditors() {

    IPreferenceStore store = Activator.getDefault().getPreferenceStore();
    long refPop = store.getLong(PreferenceConstants.REFERENCE_POPULATION);
    long refDens = store.getLong(PreferenceConstants.REFERENCE_DENSITY);

    final StringFieldEditor referencePopulationThreadsFieldEditor = new StringFieldEditor(
            PreferenceConstants.REFERENCE_POPULATION,
            PopulationModelWizardMessages.getString("ReferencePopulation"), getFieldEditorParent()); //$NON-NLS-1$

    referencePopulationThreadsFieldEditor.setStringValue("" + refPop);
    addField(referencePopulationThreadsFieldEditor);

    final StringFieldEditor referenceDensityThreadsFieldEditor = new StringFieldEditor(
            PreferenceConstants.REFERENCE_DENSITY, PopulationModelWizardMessages.getString("ReferenceDensity"), //$NON-NLS-1$
            getFieldEditorParent());
    referencePopulationThreadsFieldEditor.setStringValue("" + refDens);
    addField(referenceDensityThreadsFieldEditor);

}

From source file:org.eclipse.stp.bpmn.preferences.BpmnDiagramsPreferencePage.java

License:Open Source License

protected void addFields(Composite parent) {

    Group bpmnFirstSettings = new Group(parent, SWT.NONE);
    GridLayout gridLayout = new GridLayout(1, false);
    bpmnFirstSettings.setLayout(gridLayout);
    GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
    gridData.grabExcessHorizontalSpace = true;
    bpmnFirstSettings.setLayoutData(gridData);
    bpmnFirstSettings.setText(BpmnDiagramMessages.BpmnDiagramsPreferencePage_diagram_creation_group_title);
    addField(new StringFieldEditor(BpmnDiagramPreferenceInitializer.PREF_AUTHOR,
            BpmnDiagramMessages.BpmnDiagramsPreferencePage_author, bpmnFirstSettings));

    super.addFields(parent);

    Group bpmnGlobalGroup = new Group(parent, SWT.NONE);
    gridLayout = new GridLayout(2, false);
    bpmnGlobalGroup.setLayout(gridLayout);
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    gridData.grabExcessHorizontalSpace = true;
    gridData.horizontalSpan = 2;// w ww  .  ja va  2  s  .c o  m
    bpmnGlobalGroup.setLayoutData(gridData);
    bpmnGlobalGroup.setText(BpmnDiagramMessages.BpmnDiagramsPreferencePage_other_settings_group_title);

    BooleanFieldEditor snapGeomEd = new BooleanFieldEditor(PREF_SNAP_TO_GEOMETRY,
            BpmnDiagramMessages.BpmnDiagramsPreferencePage_snap_to_geometry_label, bpmnGlobalGroup);
    super.addField(snapGeomEd);
    BooleanFieldEditor collapseStyle = new BooleanFieldEditor(
            BpmnDiagramPreferenceInitializer.PREF_SP_COLLAPSE_STYLE,
            BpmnDiagramMessages.BpmnDiagramsPreferencePage_collapse_expand_policy_label, bpmnGlobalGroup);
    super.addField(collapseStyle);

    IntegerFieldEditor delayEd = new IntegerFieldEditor(PREF_CONN_DIAG_ASSISTANT_DELAY_MS,
            BpmnDiagramMessages.BpmnDiagramsPreferencePage_connection_assistant_appearance_delay_label,
            bpmnGlobalGroup);
    delayEd.setErrorMessage(
            BpmnDiagramMessages.BpmnDiagramsPreferencePage_connection_assistant_appareance_delay_error_message);
    delayEd.setValidRange(0, 20000);
    super.addField(delayEd);

    addField(new BooleanFieldEditor(BpmnDiagramPreferenceInitializer.PREF_BPMN1_1_STYLE,
            BpmnDiagramMessages.BpmnDiagramsPreferencePage_bpmn_style, bpmnGlobalGroup));

    ScaleFieldEditor shadowsTransparency = new ScaleFieldEditor(
            BpmnDiagramPreferenceInitializer.PREF_SHOW_SHADOWS_TRANSPARENCY,
            BpmnDiagramMessages.BpmnDiagramsPreferencePage_shadow_label, bpmnGlobalGroup, 0, 255, 1, 5);
    shadowsTransparency.setPreferenceStore(super.getPreferenceStore());
    super.addField(shadowsTransparency);
}

From source file:org.eclipse.swordfish.registry.tooling.preferences.RegistryPreferencePage.java

License:Open Source License

/**
 * 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.//from w ww. j  ava  2  s  . c  o  m
 */
public void createFieldEditors() {
    addField(new StringFieldEditor(PreferenceConstants.REGISTRY_URL, "URL:", getFieldEditorParent()));
}