Example usage for org.eclipse.jface.preference FileFieldEditor setFilterPath

List of usage examples for org.eclipse.jface.preference FileFieldEditor setFilterPath

Introduction

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

Prototype

public void setFilterPath(File path) 

Source Link

Document

Sets the initial path for the Browse dialog.

Usage

From source file:org.robotframework.ide.eclipse.main.plugin.preferences.DefaultLaunchConfigurationPreferencePage.java

License:Apache License

private void createExecutorLaunchConfigurationPreferences(final Composite parent) {
    final Group group = new Group(parent, SWT.NONE);
    group.setText("Executor tab");
    GridLayoutFactory.fillDefaults().applyTo(group);
    GridDataFactory.fillDefaults().grab(true, false).indent(0, 10).span(2, 1).applyTo(group);

    final StringFieldEditor additionalInterpreterArguments = new StringFieldEditor(
            RedPreferences.LAUNCH_ADDITIONAL_INTERPRETER_ARGUMENTS, "Additional interpreter arguments:", group);
    additionalInterpreterArguments.load();
    addField(additionalInterpreterArguments);

    final FileFieldEditor scriptPathEditor = new FileFieldEditor(RedPreferences.LAUNCH_EXECUTABLE_FILE_PATH,
            "Executable file:", true, StringFieldEditor.VALIDATE_ON_KEY_STROKE, group);
    scriptPathEditor.setFileExtensions(RobotLaunchConfiguration.getSystemDependentExecutableFileExtensions());
    scriptPathEditor.setFilterPath(ResourcesPlugin.getWorkspace().getRoot().getLocation().toFile());
    scriptPathEditor.load();/*from   w  w  w  .  j  a v  a 2s  . c o m*/
    addField(scriptPathEditor);

    final StringFieldEditor additionalScriptArguments = new StringFieldEditor(
            RedPreferences.LAUNCH_ADDITIONAL_EXECUTABLE_FILE_ARGUMENTS, "Additional executable file arguments:",
            group);
    additionalScriptArguments.load();
    addField(additionalScriptArguments);

    GridDataFactory.fillDefaults().span(2, 1).applyTo(scriptPathEditor.getLabelControl(group));
}

From source file:pl.robakowski.preferences.ComposerSearchPreferencePage.java

License:Open Source License

private void createComposerPharField() {
    FileFieldEditor composerPath = new FileFieldEditor("composerPath", "Composer.phar path:",
            getFieldEditorParent());//from w  w  w  .j a  v  a 2s . c  o  m
    String[] ext = new String[] { "*.phar" };
    composerPath.setFileExtensions(ext);
    composerPath.setEmptyStringAllowed(false);
    composerPath.setFilterPath(CURRENT_DIR);

    addField(composerPath);
}

From source file:pl.robakowski.preferences.ComposerSearchPreferencePage.java

License:Open Source License

private void createPhpField() {
    FileFieldEditor phpPath = new PHPFieldEditor("phpPath", "PHP path:", getFieldEditorParent());
    String[] ext = new String[] { "*.exe" };
    phpPath.setFileExtensions(ext);//w  w w.j a va  2 s. c om
    phpPath.setEmptyStringAllowed(false);
    phpPath.setFilterPath(CURRENT_DIR);
    addField(phpPath);
}