Java 类org.eclipse.jface.preference.FileFieldEditor 实例源码

项目:pgcodekeeper    文件:GeneralPrefPage.java   
@Override
protected void createFieldEditors() {
    addField(new BooleanFieldEditor(PREF.PGDUMP_SWITCH,
            Messages.generalPrefPage_pg_dump_switch, getFieldEditorParent()));

    addField(new FileFieldEditor(PREF.PGDUMP_EXE_PATH,
            Messages.generalPrefPage_pg_dump_executable, getFieldEditorParent()){

        @Override
        protected boolean checkState() {
            return true;
        }
    });

    addField(new StringFieldEditor(PREF.PGDUMP_CUSTOM_PARAMS,
            Messages.generalPrefPage_pg_dump_custom_parameters, getFieldEditorParent()));

    addField(new BooleanFieldEditor(PREF.FORCE_SHOW_CONSOLE,
            Messages.generalPrefPage_show_console_when_program_write_to_console, getFieldEditorParent()));

    addField(new BooleanFieldEditor(PREF.NO_PRIVILEGES,
            Messages.dbUpdatePrefPage_ignore_privileges,
            getFieldEditorParent()));

}
项目:fluentmark    文件:PrefPageStyles.java   
/** Creates the field editors. */
@Override
public void createFieldEditors() {
    Composite parent = getFieldEditorParent();

    Group frame = new Group(parent, SWT.NONE);
    frame.setText("Stylesheets");
    GridDataFactory.fillDefaults().indent(0, 6).grab(true, false).span(2, 1).applyTo(frame);
    GridLayoutFactory.fillDefaults().numColumns(3).margins(6, 6).applyTo(frame);

    Composite internal = new Composite(frame, SWT.NONE);
    GridDataFactory.fillDefaults().indent(0, 4).grab(true, false).applyTo(internal);
    GridLayoutFactory.fillDefaults().numColumns(3).applyTo(internal);

    // Github Syntax support
    addField(new BooleanFieldEditor(EDITOR_GITHUB_SYNTAX, "Support Github Syntax", internal));

    // Multi-Markdown support
    addField(new BooleanFieldEditor(EDITOR_MULTIMARKDOWN_METADATA, "Support Multi-Markdown Metadata", internal));

    // Browser CSS
    addField(new ComboFieldEditor(EDITOR_CSS_DEFAULT, "Default Stylesheet", builtins(), internal));
    addField(new FileFieldEditor(EDITOR_CSS_CUSTOM, "Custom Stylesheet", internal));
}
项目:Swiper    文件:SwiperPreferencePage.java   
@Override
protected void createFieldEditors() {


    FileFieldEditor defaultFilter = new FileFieldEditor(PREF_CUST_FILTER, "Custom XSLT Filter",
            getFieldEditorParent());    
    addField(defaultFilter);

    BooleanFieldEditor mimcXmlDeclaration = new BooleanFieldEditor(PREF_MIMICXMLDECL,
            "Mimic Dora XML Declaration (no 'encoding=UTF-8')", getFieldEditorParent());
    addField(mimcXmlDeclaration);

    BooleanFieldEditor dontAddNewLine = new BooleanFieldEditor(PREF_MIMIC_DXLEXPORT_EOF,
            "Mimic EOF of DXL Export (Add extra Line Endings to end of file)", getFieldEditorParent());
    addField(dontAddNewLine);

    if (!isPropertyPage()) {
        BooleanFieldEditor enableAll = new BooleanFieldEditor(PREF_ENABLE_ALL, "Enable Swiper for ALL Projects", getFieldEditorParent());
        addField(enableAll);
    }

}
项目:synergyview    文件:MediaImportWizardPage.java   
protected void createAdvancedControls(Composite parent) {
Composite fileSelectionArea = new Composite(parent, SWT.NONE);
GridData fileSelectionData = new GridData(GridData.GRAB_HORIZONTAL | GridData.FILL_HORIZONTAL);
fileSelectionArea.setLayoutData(fileSelectionData);

GridLayout fileSelectionLayout = new GridLayout();
fileSelectionLayout.numColumns = 3;
fileSelectionLayout.makeColumnsEqualWidth = false;
fileSelectionLayout.marginWidth = 0;
fileSelectionLayout.marginHeight = 0;
fileSelectionArea.setLayout(fileSelectionLayout);

editor = new FileFieldEditor("fileSelect", "Select File: ", fileSelectionArea); // NON-NLS-1 //NON-NLS-2
editor.getTextControl(fileSelectionArea).addModifyListener(new ModifyListener() {
    public void modifyText(ModifyEvent e) {
    IPath path = new Path(MediaImportWizardPage.this.editor.getStringValue());
    setFileName(path.lastSegment());
    }
});
String[] extensions = new String[] { "*.*" }; // NON-NLS-1
editor.setFileExtensions(extensions);
fileSelectionArea.moveAbove(null);

   }
项目:bento    文件:ImportWizardPage.java   
protected void createAdvancedControls(Composite parent) {
    Composite fileSelectionArea = new Composite(parent, SWT.NONE);
    GridData fileSelectionData = new GridData(GridData.GRAB_HORIZONTAL
            | GridData.FILL_HORIZONTAL);
    fileSelectionArea.setLayoutData(fileSelectionData);

    GridLayout fileSelectionLayout = new GridLayout();
    fileSelectionLayout.numColumns = 3;
    fileSelectionLayout.makeColumnsEqualWidth = false;
    fileSelectionLayout.marginWidth = 0;
    fileSelectionLayout.marginHeight = 0;
    fileSelectionArea.setLayout(fileSelectionLayout);

    editor = new FileFieldEditor("fileSelect","Select File: ",fileSelectionArea); //NON-NLS-1 //NON-NLS-2
    editor.getTextControl(fileSelectionArea).addModifyListener(new ModifyListener(){
        public void modifyText(ModifyEvent e) {
            IPath path = new Path(ImportWizardPage.this.editor.getStringValue());
            setFileName(path.lastSegment());
        }
    });
    String[] extensions = new String[] { "*.*" }; //NON-NLS-1
    editor.setFileExtensions(extensions);
    fileSelectionArea.moveAbove(null);

}
项目:SVoNt    文件:OntologyImportWizardPage.java   
protected void createAdvancedControls(Composite parent) {
    Composite fileSelectionArea = new Composite(parent, SWT.NONE);
    GridData fileSelectionData = new GridData(GridData.GRAB_HORIZONTAL
            | GridData.FILL_HORIZONTAL);
    fileSelectionArea.setLayoutData(fileSelectionData);

    GridLayout fileSelectionLayout = new GridLayout();
    fileSelectionLayout.numColumns = 3;
    fileSelectionLayout.makeColumnsEqualWidth = false;
    fileSelectionLayout.marginWidth = 0;
    fileSelectionLayout.marginHeight = 0;
    fileSelectionArea.setLayout(fileSelectionLayout);

    editor = new FileFieldEditor("fileSelect","Select File: ",fileSelectionArea); //NON-NLS-1 //NON-NLS-2
    editor.getTextControl(fileSelectionArea).addModifyListener(new ModifyListener(){
        public void modifyText(ModifyEvent e) {
            IPath path = new Path(OntologyImportWizardPage.this.editor.getStringValue());
            setFileName(path.lastSegment());
        }
    });
    String[] extensions = new String[] { "*.*" }; //NON-NLS-1
    editor.setFileExtensions(extensions);
    fileSelectionArea.moveAbove(null);

}
项目:seg.jUCMNav    文件:AutoLayoutPreferencePage.java   
protected void createFieldEditors() {
    // Initialize all field editors.
    FileFieldEditor dotPath = new FileFieldEditor(AutoLayoutPreferences.PREF_DOTPATH, Messages.getString("AutoLayoutDotSettingsWizardPage.dotPath"), //$NON-NLS-1$
            getFieldEditorParent());
    addField(dotPath);

    StringFieldEditor width = new StringFieldEditor(AutoLayoutPreferences.PREF_WIDTH, Messages.getString("AutoLayoutDotSettingsWizardPage.width"), //$NON-NLS-1$
            getFieldEditorParent());
    addField(width);

    StringFieldEditor height = new StringFieldEditor(AutoLayoutPreferences.PREF_HEIGHT, Messages.getString("AutoLayoutDotSettingsWizardPage.height"), //$NON-NLS-1$
            getFieldEditorParent());
    addField(height);

    String[][] values = { { Messages.getString("AutoLayoutDotSettingsWizardPage.topdown"), "TB" }, //$NON-NLS-1$ //$NON-NLS-2$
            { Messages.getString("AutoLayoutDotSettingsWizardPage.leftright"), "LR" } }; //$NON-NLS-1$ //$NON-NLS-2$

    RadioGroupFieldEditor orientation = new RadioGroupFieldEditor(AutoLayoutPreferences.PREF_ORIENTATION, Messages
            .getString("AutoLayoutDotSettingsWizardPage.orientation"), 1, values, getFieldEditorParent()); //$NON-NLS-1$
    addField(orientation);

    BooleanFieldEditor empty = new BooleanFieldEditor(AutoLayoutPreferences.PREF_EMPTYPOINTS, Messages
            .getString("AutoLayoutDotSettingsWizardPage.manipulateEmptyPoints"), getFieldEditorParent()); //$NON-NLS-1$
    addField(empty);

}
项目:elexis-3-base    文件:PreferencePage.java   
@Override
protected void createFieldEditors(){
    final Composite parentComp = getFieldEditorParent();
    final RadioGroupFieldEditor groupFieldEditor =
        new RadioGroupFieldEditor(
            BATCH_OR_FTP,
            Messages.getString("PreferencePage.direktimport.label"), 2, new String[][] { //$NON-NLS-1$
                {
                    Messages.getString("PreferencePage.batchscript.label"), BATCH}, { Messages.getString("PreferencePage.ftpserver.label"), FTP}}, //$NON-NLS-1$ //$NON-NLS-2$
            parentComp, true);
    final FileFieldEditor batchFileEditor =
        new FileFieldEditor(BATCH_DATEI, Messages.getString("PreferencePage.batchdatei.label"), //$NON-NLS-1$
            parentComp);

    addField(groupFieldEditor);
    addField(batchFileEditor);

    addField(new StringFieldEditor(FTP_HOST,
        Messages.getString("PreferencePage.label.host"), getFieldEditorParent())); //$NON-NLS-1$
    addField(new StringFieldEditor(FTP_USER,
        Messages.getString("PreferencePage.label.user"), getFieldEditorParent())); //$NON-NLS-1$
    addField(new StringFieldEditor(FTP_PWD,
        Messages.getString("PreferencePage.label.password"), getFieldEditorParent())); //$NON-NLS-1$
    addField(new InexistingDirectoryOKDirectoryFieldEditor(DL_DIR,
        Messages.getString("PreferencePage.label.download"), getFieldEditorParent())); //$NON-NLS-1$
}
项目:solidity-ide    文件:SolidityCompilerPreferencePage.java   
protected void createCompilerSettings(Composite parent) {
    Composite composite = createGroupComposite(parent, "Solc compiler");
    compilerPathFieldEditor = new FileFieldEditor(SolidityPreferences.COMPILER_PATH, "Path to solc", composite);
    addField(compilerPathFieldEditor);
    addField(new BooleanFieldEditor(SolidityPreferences.COMPILER_ENABLED, "Enable solidity compiler", composite));
    addField(new BooleanFieldEditor(SolidityPreferences.COMPILER_OUTPUT_BIN, "Enable solidity bin output",
            composite));
    addField(new BooleanFieldEditor(SolidityPreferences.COMPILER_OUTPUT_AST, "Enable solidity ast output",
            composite));
    addField(new BooleanFieldEditor(SolidityPreferences.COMPILER_OUTPUT_ASM, "Enable solidity asm output",
            composite));
    addField(new BooleanFieldEditor(SolidityPreferences.COMPILER_OUTPUT_ABI, "Enable solidity abi output",
            composite));
    addField(new StringFieldEditor(SolidityPreferences.COMPILER_OUTPUT_PATH, "Compiler output path", composite));
}
项目:hybris-commerce-eclipse-plugin    文件:AttachSourcesPage.java   
@Override
public void createControl(Composite parent) 
{
    container = new Composite(parent, SWT.NONE);
    container.setLayout(new GridLayout(2, false));

    this.sourceFileField = new FileFieldEditor("fileSelect", "[y] Source Archive:", container);
    sourceFileField.setFileExtensions( new String[]{"*.zip"} );
    // Set the starting path to the downloads folder or home dir of the current user.
    sourceFileField.setFilterPath( new File(System.getProperty("user.home")) );

    sourceFileField.getTextControl( container ).addModifyListener( new ModifyListener() 
    {
        @Override
        public void modifyText( ModifyEvent e )
        {
            // no validation just yet, as this even gets triggered:
            // (1) copy and paste: once
            // (2) manual typing: once per character entered
            // (3) per change button - selection: once
            // so because of #2: need to do validation when submitting the wizard (in it's performFinish())
            // TODO: there must be a better way, but the FocusListener does not see when the selection is done via the browse button

            setErrorMessage(null);
            setPageComplete(true);
            // let the wizard update it's buttons
            getWizard().getContainer().updateButtons();
        }
    } );

    // required to avoid an error in the system
    setControl(container);
    // if this is an optional page, we set this page to complete right away.
    setPageComplete(isOptional);
}
项目:xstreamer    文件:PlayerSquadsImportWizardPage.java   
@Override
public void createControl(Composite parent) {
    Composite fileSelectionArea = new Composite(parent, SWT.NONE);
    GridData fileSelectionData = new GridData(GridData.GRAB_HORIZONTAL
            | GridData.FILL_HORIZONTAL);
    fileSelectionArea.setLayoutData(fileSelectionData);

    GridLayout fileSelectionLayout = new GridLayout();
    fileSelectionLayout.numColumns = 3;
    fileSelectionLayout.makeColumnsEqualWidth = false;
    fileSelectionLayout.marginWidth = 0;
    fileSelectionLayout.marginHeight = 0;
    fileSelectionArea.setLayout(fileSelectionLayout);

    LabelFieldEditor player1labelFieldEditor = new LabelFieldEditor("Select Player 1 Squad.", fileSelectionArea);
    player1labelFieldEditor.adjustForNumColumns(3);

    setEditorPlayer1(new FileFieldEditor("fileSelect","Select File: ",fileSelectionArea)); //NON-NLS-1 //NON-NLS-2
    String[] extensions = new String[] { "*.json", "*.xws" }; //NON-NLS-1
    getEditorPlayer1().setFileExtensions(extensions);

    fileSelectionArea.moveAbove(null);

    new SpacerFieldEditor(fileSelectionArea);

    LabelFieldEditor player2labelFieldEditor = new LabelFieldEditor("Select Player 2 Squad.", fileSelectionArea);
    player2labelFieldEditor.adjustForNumColumns(3);
    setEditorPlayer2(new FileFieldEditor("fileSelect","Select File: ",fileSelectionArea)); //NON-NLS-1 //NON-NLS-2
    editorPlayer2.setFileExtensions(extensions);

    setControl(fileSelectionArea);
}
项目:fluentmark    文件:ProgramFieldEditor.java   
public ProgramFieldEditor(String key, String label, Composite parent, String[] msg) {
    super(key, label, true, FileFieldEditor.VALIDATE_ON_KEY_STROKE, parent);
    this.msg = msg;

    setErrorMessage(msg[0]);
    setEmptyStringAllowed(true);
    getTextControl().setToolTipText(msg[1]);
}
项目:NEXCORE-UML-Modeler    文件:RMDataExcelFileImportWizardPage.java   
/**
 * @see org.eclipse.ui.dialogs.WizardNewFileCreationPage#createAdvancedControls(org.eclipse.swt.widgets.Composite)
 */
protected void createAdvancedControls(Composite parent) {
    Composite fileSelectionArea = new Composite(parent, SWT.NONE);
    GridData fileSelectionData = new GridData(GridData.GRAB_HORIZONTAL | GridData.FILL_HORIZONTAL);
    fileSelectionArea.setLayoutData(fileSelectionData);

    GridLayout fileSelectionLayout = new GridLayout();
    fileSelectionLayout.numColumns = 3;
    fileSelectionLayout.makeColumnsEqualWidth = false;
    fileSelectionLayout.marginWidth = 0;
    fileSelectionLayout.marginHeight = 0;
    fileSelectionArea.setLayout(fileSelectionLayout);

    editor = new FileFieldEditor("fileSelect", UMLMessage.LABEL_SELECT_FILE, fileSelectionArea); //$NON-NLS-1$
    editor.getTextControl(fileSelectionArea).addModifyListener(new ModifyListener() {
        /**
         * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent)
         */
        public void modifyText(ModifyEvent e) {
            IPath path = new Path(RMDataExcelFileImportWizardPage.this.editor.getStringValue());
            setFileName(path.lastSegment());
        }
    });

    editor.setFileExtensions(UICoreConstant.PROJECT_CONSTANTS__IMPORT_RM_DATA_EXCEL_FILE_EXTENSIONS);
    fileSelectionArea.moveAbove(null);
}
项目:NEXCORE-UML-Modeler    文件:ProfileImportWizardPage.java   
/**
 * @see org.eclipse.ui.dialogs.WizardNewFileCreationPage#createAdvancedControls(org.eclipse.swt.widgets.Composite)
 */
protected void createAdvancedControls(Composite parent) {
    Composite fileSelectionArea = new Composite(parent, SWT.NONE);
    GridData fileSelectionData = new GridData(GridData.GRAB_HORIZONTAL | GridData.FILL_HORIZONTAL);
    fileSelectionArea.setLayoutData(fileSelectionData);

    GridLayout fileSelectionLayout = new GridLayout();
    fileSelectionLayout.numColumns = 3;
    fileSelectionLayout.makeColumnsEqualWidth = false;
    fileSelectionLayout.marginWidth = 0;
    fileSelectionLayout.marginHeight = 0;
    fileSelectionArea.setLayout(fileSelectionLayout);

    editor = new FileFieldEditor("fileSelect", UMLMessage.LABEL_SELECT_FILE, fileSelectionArea); //$NON-NLS-1$
    editor.getTextControl(fileSelectionArea).addModifyListener(new ModifyListener() {
        /**
         * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent)
         */
        public void modifyText(ModifyEvent e) {
            IPath path = new Path(ProfileImportWizardPage.this.editor.getStringValue());
            isSourceExist = true;
            setFileExtension(path.getFileExtension());
            setFileName(path.lastSegment());
        }
    });

    editor.setFileExtensions(UICoreConstant.PROJECT_CONSTANTS__UML_PROFILE_FILE_EXTENSIONS);
    fileSelectionArea.moveAbove(null);

}
项目:SecurityTesting    文件:ZAPPreferencePage.java   
/**
 * Add the ZAP preferences to the preferences page.
 */
@Override
protected void createFieldEditors() {
    FileFieldEditor zapJarLocation = new FileFieldEditor(ZAP_JAR_LOCATION, "ZAP JAR Location:",
            getFieldEditorParent());
    zapJarLocation.setEmptyStringAllowed(false);
    addField(zapJarLocation);

    DirectoryFieldEditor zapSessionDirectory = new DirectoryFieldEditor(ZAP_SESSION_DIRECTORY,
            "ZAP Session Directory", getFieldEditorParent());
    zapSessionDirectory.setEmptyStringAllowed(false);
    addField(zapSessionDirectory);

    StringFieldEditor zapSessionName = new StringFieldEditor(ZAP_SESSION_NAME, "ZAP Session Name",
            getFieldEditorParent());
    zapSessionName.setEmptyStringAllowed(false);
    addField(zapSessionName);

    IntegerFieldEditor zapProxyPort = new IntegerFieldEditor(ZAP_PROXY_PORT, "ZAP Proxy Port:",
            getFieldEditorParent());
    zapProxyPort.setValidRange(0, 99999);
    zapProxyPort.setEmptyStringAllowed(false);
    addField(zapProxyPort);

    StringFieldEditor zapApiKey = new StringFieldEditor(ZAP_API_KEY, "ZAP API Key", getFieldEditorParent());
    zapApiKey.setEmptyStringAllowed(false);
    addField(zapApiKey);
}
项目:depan    文件:AnalysisPreferencesPage.java   
@Override
protected void createFieldEditors() {
  Composite parent = getFieldEditorParent();

  FileFieldEditor executable = new FileFieldEditor(
      AnalysisPreferenceIds.MVN_ANALYSIS_EXECUTABLE,
      "Maven Executable", 
      true, parent);
  executable.setEmptyStringAllowed(false);

  BooleanFieldEditor systemjava = new BooleanFieldEditor(
      AnalysisPreferenceIds.MVN_ANALYSIS_SYSTEMJAVA,
      "Use System JAVA_HOME",
      BooleanFieldEditor.SEPARATE_LABEL, parent);

  final DirectoryFieldEditor javahome = new DirectoryFieldEditor(
      AnalysisPreferenceIds.MVN_ANALYSIS_JAVAHOME,
      "JAVA_HOME", parent);

  StringFieldEditor effectivepom = new StringFieldEditor(
      AnalysisPreferenceIds.MVN_ANALYSIS_EFFECTIVEPOM,
      "Maven Effective POM command", parent);
  effectivepom.setEmptyStringAllowed(false);

  addField(executable);
  addField(systemjava);
  addField(javahome);
  addField(effectivepom);
}
项目:depan    文件:AnalysisPreferencesPage.java   
@Override
protected void createFieldEditors() {
  Composite parent = getFieldEditorParent();

  FileFieldEditor executable = new FileFieldEditor(
      AnalysisPreferenceIds.MVN_ANALYSIS_EXECUTABLE,
      "Maven Executable", 
      true, parent);
  executable.setEmptyStringAllowed(false);

  BooleanFieldEditor systemjava = new BooleanFieldEditor(
      AnalysisPreferenceIds.MVN_ANALYSIS_SYSTEMJAVA,
      "Use System JAVA_HOME",
      BooleanFieldEditor.SEPARATE_LABEL, parent);

  final DirectoryFieldEditor javahome = new DirectoryFieldEditor(
      AnalysisPreferenceIds.MVN_ANALYSIS_JAVAHOME,
      "JAVA_HOME", parent);

  StringFieldEditor effectivepom = new StringFieldEditor(
      AnalysisPreferenceIds.MVN_ANALYSIS_EFFECTIVEPOM,
      "Maven Effective POM command", parent);
  effectivepom.setEmptyStringAllowed(false);

  addField(executable);
  addField(systemjava);
  addField(javahome);
  addField(effectivepom);
}
项目:Correct    文件:SelectFilePage.java   
private void checkFile(FileFieldEditor editor) {
    File f = new File(editor.getTextControl(container).getText());
    if(f.exists()) {
        wizard.setZipfile(f);
        setPageComplete(true);
    }
}
项目:SecureBPMN    文件:ActivitiPreferencePage.java   
public void createFieldEditors() {
    // <SecureBPMN>
    // Adding custom settings to the preference pane.
    addField(new FileFieldEditor(Preferences.PATH_TO_SATMC_BINARY.getPreferenceId(), 
            "&Location of the SATMC binary", getFieldEditorParent()));
    addField(new BooleanFieldEditor(Preferences.ALL_TASKS_AS_HUMANTASKS.getPreferenceId(), "&Analyze all Tasks as HumanTasks", getFieldEditorParent()));
       // </SecureBPMN>
}
项目:ContextQuickie    文件:ContextQuickie.java   
/**
 * Creates the field editors for Beyond Compare.
 */
private void createBeyondCompareFieldEditors()
{
  final ArrayList<FieldEditor> dependentFields = new ArrayList<FieldEditor>();

  final BooleanFieldEditor featureEnabledEditor = new BooleanFieldEditor(PreferenceConstants.P_BEYOND_COMPARE_ENABLED, "Enable Beyond Compare",
      getFieldEditorParent());
  addField(featureEnabledEditor);

  this.controlMapping.put(featureEnabledEditor, dependentFields);

  final FileFieldEditor fileFieldEditor = new ConditionalFileFieldEditor(PreferenceConstants.P_BEYOND_COMPARE_PATH, "Path to BCompare.exe",
      getFieldEditorParent(), featureEnabledEditor);
  fileFieldEditor.setFileExtensions(new String[]
  { "BCompare.exe" });
  addField(fileFieldEditor);
  dependentFields.add(fileFieldEditor);

  final StringFieldEditor shellRegPathEditor = new StringFieldEditor(PreferenceConstants.P_BEYOND_COMPARE_SHELL_REG_PATH, "Left Side Registy Path",
      getFieldEditorParent());
  addField(shellRegPathEditor);
  dependentFields.add(shellRegPathEditor);

  final StringFieldEditor shellRegKeyEditor = new StringFieldEditor(PreferenceConstants.P_BEYOND_COMPARE_SHELL_REG_KEY, "Left Side Registy Key",
      getFieldEditorParent());
  addField(shellRegKeyEditor);
  dependentFields.add(shellRegKeyEditor);
}
项目:OpenSPIFe    文件:ActivityDictionaryPreferencePage.java   
private void createActivityDictionaryFile(Composite parent) {
    Composite fileComp = new Composite(parent, SWT.None);
    activityDictionaryFile = new FileFieldEditor(ActivityDictionaryPreferences.ACTIVITY_DICTIONARY_LOCATION, "URL:", true, fileComp) {
        @Override
        protected String changePressed() {
            String file = super.changePressed();
            if (file != null) {
                try {
                    file = URI.createFileURI(new File(file).getPath()).toFileString();
                } catch (Exception e) {
                    file = null;
                    trace.error(e);
                }
            }
            return file;
        }

        @Override
        protected boolean checkState() {
            String path = getTextControl().getText();
            if (path != null)
                path = path.trim();
            else
                path = "";//$NON-NLS-1$

            if (path.startsWith("file:"))
                return super.checkState();
            else
                return true; // if it is not a file, then not much validation we can do right now
        }
    };
    activityDictionaryFile.setFileExtensions(getDictionaryExtensions());
    activityDictionaryFile.setChangeButtonText("Select new AD");
    activityDictionaryFile.setPage(this);
    activityDictionaryFile.setPreferenceStore(getPreferenceStore());
    activityDictionaryFile.load();
    boolean enableChange = getPreferenceStore().getBoolean(ActivityDictionaryPlugin.ACTIVITY_DICTIONARY_USER_CHANGE_PROPERTY);
    activityDictionaryFile.setEnabled(enableChange, fileComp);
    activityDictionaryFile.getTextControl(fileComp).addModifyListener(new FileModifyListener());
}
项目:CppStyle    文件:CppStylePerfPage.java   
/**
 * 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.
 */
public void createFieldEditors() {
    clangFormatPath = new FileFieldEditor(CppStyleConstants.CLANG_FORMAT_PATH, "Clang-format path:",
            getFieldEditorParent());

    addField(clangFormatPath);

    cpplintPath = new FileFieldEditor(CppStyleConstants.CPPLINT_PATH, "Cpplint path:", getFieldEditorParent());

    addField(cpplintPath);

    enableCpplintOnSave = new BooleanFieldEditor(CppStyleConstants.ENABLE_CPPLINT_ON_SAVE,
            CppStyleConstants.ENABLE_CPPLINT_TEXT, getFieldEditorParent());

    if (!checkPathExist(CppStyle.getCpplintPath())) {
        enableCpplintOnSave.setEnabled(false, getFieldEditorParent());
    }

    addField(enableCpplintOnSave);

    enableClangFormatOnSave = new BooleanFieldEditor(CppStyleConstants.ENABLE_CLANGFORMAT_ON_SAVE,
            CppStyleConstants.ENABLE_CLANGFORMAT_TEXT, getFieldEditorParent());

    if (!checkPathExist(ClangFormatFormatter.getClangFormatPath())) {
        enableClangFormatOnSave.setEnabled(false, getFieldEditorParent());
    }

    addField(enableClangFormatOnSave);
}
项目:snaker-designer    文件:SnakerPreferencePage.java   
@Override
protected void createFieldEditors() {
    FileFieldEditor editor = new FileFieldEditor(MODEL_PROCESS, "流程模型配置", getFieldEditorParent());
    editor.setEmptyStringAllowed(true);
    editor.setFileExtensions(new String[]{"*.xml"});
    addField(editor);
}
项目:jisocreator    文件:MKISOFSPreferencePage.java   
@Override
   protected Control createContents(Composite parent) {
setTitle("Iso options");
Composite top = new Composite(parent, SWT.NONE);
fieldEditors = new ArrayList<FieldEditor>();
FieldEditor editor = new FileFieldEditor("mkisofs.path", "MKISOFS Path", true,
    StringButtonFieldEditor.VALIDATE_ON_FOCUS_LOST, top);
fieldEditors.add(editor);

Group optionsGroup = new Group(top, SWT.NONE);
optionsGroup.setText("Iso creations options");

editor = new BooleanFieldEditor("mkisofs.rockridge.use", "Use RockRidge Extension", optionsGroup);
fieldEditors.add(editor);

editor = new BooleanFieldEditor("mkisofs.joliet.use", "Use Joliet Extension", optionsGroup);
fieldEditors.add(editor);

editor = new BooleanFieldEditor("mkisofs.symlinks.follow", "Follow symbolic links", optionsGroup);
fieldEditors.add(editor);

for (FieldEditor fieldEditor : fieldEditors) {
    fieldEditor.setPage(this);
    fieldEditor.setPreferenceStore(getPreferenceStore());
    fieldEditor.load();
}

GridDataFactory.defaultsFor(optionsGroup).grab(true, false).span(3, 1).applyTo(optionsGroup);
GridLayoutFactory.swtDefaults().generateLayout(optionsGroup);
GridLayoutFactory.fillDefaults().numColumns(3).generateLayout(top);
return top;
   }
项目:maru    文件:MainPage.java   
/**
 * 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()
{
    addField(new FileFieldEditor(PreferenceConstants.P_FILE, "&File preference:", false, StringButtonFieldEditor.VALIDATE_ON_FOCUS_LOST, getFieldEditorParent()));
    addField(new PathEditor(PreferenceConstants.P_PATH2, "&Path preference:", "Chooser Label", getFieldEditorParent()));
    addField(new DirectoryFieldEditor(PreferenceConstants.P_PATH, "&Directory preference:", getFieldEditorParent()));
    addField(new BooleanFieldEditor(PreferenceConstants.P_BOOLEAN, "&An example of a boolean preference", getFieldEditorParent()));
    addField(new RadioGroupFieldEditor(PreferenceConstants.P_CHOICE, "An example of a multiple-choice preference", 1, new String[][] { { "&Choice 1", "choice1" }, { "C&hoice 2", "choice2" } }, getFieldEditorParent()));
    addField(new StringFieldEditor(PreferenceConstants.P_STRING, "A &text preference:", getFieldEditorParent()));
}
项目:bento    文件:SelectComponentWizardPage.java   
@Override
public void createControl(Composite parent) {
    Composite fileSelectionArea = new Composite(parent, SWT.NONE);
    GridData fileSelectionData = new GridData(GridData.GRAB_HORIZONTAL
            | GridData.FILL_HORIZONTAL);
    fileSelectionArea.setLayoutData(fileSelectionData);

    GridLayout fileSelectionLayout = new GridLayout();
    fileSelectionLayout.numColumns = 3;
    fileSelectionLayout.makeColumnsEqualWidth = false;
    fileSelectionLayout.marginWidth = 0;
    fileSelectionLayout.marginHeight = 0;
    fileSelectionArea.setLayout(fileSelectionLayout);

    editor = new FileFieldEditor("fileSelect","Select File: ",fileSelectionArea); //NON-NLS-1 //NON-NLS-2
    editor.getTextControl(fileSelectionArea).addModifyListener(new ModifyListener(){
        public void modifyText(ModifyEvent e) {
            IPath path = new Path(SelectComponentWizardPage.this.editor.getStringValue());
            setFileName(path.lastSegment());
        }
    });
    String[] extensions = new String[] { "*.gcomponent" }; //NON-NLS-1
    editor.setFileExtensions(extensions);
    fileSelectionArea.moveAbove(null);

    initialPopulateContainerNameField();

    setControl(fileSelectionArea);
}
项目:ESPSecurityPlugin    文件:PreferencesPage.java   
@Override
protected void createFieldEditors() {

    enabled = new BooleanFieldEditor("esp.disabled", "&Disable ESP", getFieldEditorParent());

    reconciliationDelay = new IntegerFieldEditor(
            "reconciliation.delay", "&Reconcile after:", 
            getFieldEditorParent(), 4);

    reconciliationDelay.setValidRange(100, 5000);

    sourceRulesFile = new FileFieldEditor(
            "sourcerules.location", "&Source Rule location:", false, getFieldEditorParent());
    sourceRulesFile.setEmptyStringAllowed(true);

    sinkRulesFile = new FileFieldEditor(
            "sinkrules.location", "&Sink Rule location:", false, getFieldEditorParent());
    sinkRulesFile.setEmptyStringAllowed(true);

    validationRulesFile = new FileFieldEditor(
            "validationrules.location", "&Validation Rule location:", false, getFieldEditorParent());
    validationRulesFile.setEmptyStringAllowed(true);

    addField(enabled);
    addField(reconciliationDelay);
    addField(sourceRulesFile);
    addField(sinkRulesFile);
    addField(validationRulesFile);

}
项目:elexis-3-base    文件:PreferencePage.java   
@Override
protected void createFieldEditors(){
    addField(new FileFieldEditor(JAR_PATH, "OpenMedical Bibliothek (JMedTransferO.jar)",
        getFieldEditorParent()));
    addField(new FileFieldEditor(INI_PATH, "OpenMedical Konfiguration (MedTransfer.ini)",
        getFieldEditorParent()));
    addField(new DirectoryFieldEditor(DL_DIR, "Download Verzeichnis", getFieldEditorParent()));
}
项目:elexis-3-base    文件:PreferencePage.java   
@Override
protected void createFieldEditors(){
    addField(new FileFieldEditor(JAR_PATH, Messages.PreferencePage_JMedTrasferJar,
        getFieldEditorParent()));
    addField(new FileFieldEditor(INI_PATH, Messages.PreferencePage_JMedTrasferJni,
        getFieldEditorParent()));
    addField(new DirectoryFieldEditor(DL_DIR, Messages.PreferencePage_DownloadDir,
        getFieldEditorParent()));
}
项目:elexis-3-base    文件:PreferencePage.java   
@Override
protected void createFieldEditors(){
    addField(new FileFieldEditor(JAR_PATH, Messages.PreferencePage_JMedTrasferJar,
        getFieldEditorParent()));
    addField(new FileFieldEditor(INI_PATH, Messages.PreferencePage_JMedTrasferJni,
        getFieldEditorParent()));
    addField(new DirectoryFieldEditor(DL_DIR, Messages.PreferencePage_DownloadDir,
        getFieldEditorParent()));
}
项目:elexis-3-base    文件:PreferencePage.java   
@Override
protected void createFieldEditors(){
    addField(new FileFieldEditor(JAR_PATH, Messages.PreferencePage_JMedTrasferJar,
        getFieldEditorParent()));
    addField(new FileFieldEditor(INI_PATH, Messages.PreferencePage_JMedTrasferJni,
        getFieldEditorParent()));
    addField(new DirectoryFieldEditor(DL_DIR, Messages.PreferencePage_DownloadDir,
        getFieldEditorParent()));
}
项目:elexis-3-base    文件:PreferencePage.java   
@Override
protected void createFieldEditors(){
    addField(new FileFieldEditor(JAR_PATH, Messages.PreferencePage_JMedTrasferJar,
        getFieldEditorParent()));
    addField(new FileFieldEditor(INI_PATH, Messages.PreferencePage_JMedTrasferJni,
        getFieldEditorParent()));
    addField(new DirectoryFieldEditor(DL_DIR, Messages.PreferencePage_DownloadDir,
        getFieldEditorParent()));
}
项目:elexis-3-base    文件:PreferencePage.java   
@Override
protected void createFieldEditors(){
    addField(new FileFieldEditor(JAR_PATH, Messages.PreferencePage_JMedTrasferJar,
        getFieldEditorParent()));
    addField(new FileFieldEditor(INI_PATH, Messages.PreferencePage_JMedTrasferJni,
        getFieldEditorParent()));
    addField(new DirectoryFieldEditor(DL_DIR, Messages.PreferencePage_DownloadDir,
        getFieldEditorParent()));
}
项目:elexis-3-base    文件:Preferences.java   
@Override
protected void createFieldEditors(){
    addField(new FileFieldEditor(P_EDITOR, "OpenDocument Editor", getFieldEditorParent()));
    addField(new MultilineFieldEditor(P_EDITARGS, "Argumente zum Editieren", 5, SWT.V_SCROLL,
        true, getFieldEditorParent()));
    addField(new MultilineFieldEditor(P_PRINTARGS, "Argumente zum Drucken", 5, SWT.V_SCROLL,
        true, getFieldEditorParent()));
    addField(new FileFieldEditor(P_PDFCONVERTER, "PDF-Konverter", getFieldEditorParent()));
    addField(new MultilineFieldEditor(P_PDFARGS, "Argumente fuer PDF-Konvertierung", 5,
        SWT.V_SCROLL, false, getFieldEditorParent()));
    addField(new BooleanFieldEditor(P_WRAPPERSCRIPT, "Wrapper Skript aktivieren",
        getFieldEditorParent()));
}
项目:elexis-3-base    文件:PreferencePage.java   
@Override
protected void createFieldEditors(){
    addField(new FileFieldEditor(JAR_PATH, "OpenMedical Bibliothek (JMedTransferO.jar)",
        getFieldEditorParent()));
    addField(new FileFieldEditor(INI_PATH, "OpenMedical Konfiguration (MedTransfer.ini)",
        getFieldEditorParent()));
    addField(new DirectoryFieldEditor(DL_DIR, "Download Verzeichnis", getFieldEditorParent()));
}
项目:Hydrograph    文件:ImportEngineXmlWizardPage.java   
protected void createAdvancedControls(Composite parent) {
    LOGGER.debug("Creating Import Engine XML layout");
    Composite fileSelectionArea = new Composite(parent, SWT.NONE);
    fileSelectionArea.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL | GridData.FILL_HORIZONTAL));

    GridLayout fileSelectionLayout = new GridLayout();
    fileSelectionLayout.makeColumnsEqualWidth = false;
    fileSelectionLayout.marginWidth = 0;
    fileSelectionLayout.marginHeight = 0;
    fileSelectionArea.setLayout(fileSelectionLayout);

    editor = new FileFieldEditor("fileSelect", Messages.SELECT_FILE_LABEL_TEXT, fileSelectionArea);
    editor.getTextControl(fileSelectionArea).addModifyListener(new ModifyListener() {
        public void modifyText(ModifyEvent e) {
            IPath path = new Path(ImportEngineXmlWizardPage.this.editor.getStringValue());
            if (path.segment(0) != null) {
                targetxmlFilePath = editor.getStringValue();
                setFileName(path.lastSegment());
            } else {
                targetxmlFilePath = null;
                displayError();
            }
        }
    });
    String[] extensions = new String[] { ALLOWED_EXTENSIONS }; // NON-NLS-1
    editor.setFileExtensions(extensions);
    fileSelectionArea.moveAbove(null);

    Composite fileSelectionArea2 = new Composite(parent, SWT.NONE);
    fileSelectionArea2.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL | GridData.FILL_HORIZONTAL));
    GridLayout fileSelectionLayout2 = new GridLayout();
    fileSelectionLayout2.numColumns = 2;

    fileSelectionLayout2.makeColumnsEqualWidth = false;
    fileSelectionLayout2.marginWidth = 0;
    fileSelectionLayout2.marginHeight = 0;
    fileSelectionArea2.setLayout(fileSelectionLayout2);
    Font fontNote = new Font(fileSelectionArea2.getDisplay(), TIMES_NEW_ROMAN_BALTIC_FONT, 9, SWT.BOLD);
    Label lblNoteHeader = new Label(fileSelectionArea2, SWT.NONE);
    lblNoteHeader.setText(Messages.NOTE_LABEL_HEADER_TEXT);
    lblNoteHeader.setFont(fontNote);
    Label lblNote = new Label(fileSelectionArea2, SWT.NONE);

    GridData gd_lblNote = new GridData(SWT.BOTTOM, SWT.CENTER, false, false, 1, 1);
    gd_lblNote.widthHint = 391;
    lblNote.setLayoutData(gd_lblNote);
    lblNote.setText(Messages.NOTE_MESSAGE_TEXT);

}
项目:xstreamer    文件:PlayerSquadsImportWizardPage.java   
public FileFieldEditor getEditorPlayer1() {
    return editorPlayer1;
}
项目:xstreamer    文件:PlayerSquadsImportWizardPage.java   
public void setEditorPlayer1(FileFieldEditor editorPlayer1) {
    this.editorPlayer1 = editorPlayer1;
}
项目:xstreamer    文件:PlayerSquadsImportWizardPage.java   
public FileFieldEditor getEditorPlayer2() {
    return editorPlayer2;
}
项目:xstreamer    文件:PlayerSquadsImportWizardPage.java   
public void setEditorPlayer2(FileFieldEditor editorPlayer2) {
    this.editorPlayer2 = editorPlayer2;
}