本文整理汇总了Java中org.eclipse.jface.preference.FileFieldEditor类的典型用法代码示例。如果您正苦于以下问题:Java FileFieldEditor类的具体用法?Java FileFieldEditor怎么用?Java FileFieldEditor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
FileFieldEditor类属于org.eclipse.jface.preference包,在下文中一共展示了FileFieldEditor类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createFieldEditors
import org.eclipse.jface.preference.FileFieldEditor; //导入依赖的package包/类
@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()));
}
示例2: createFieldEditors
import org.eclipse.jface.preference.FileFieldEditor; //导入依赖的package包/类
/** 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));
}
示例3: createFieldEditors
import org.eclipse.jface.preference.FileFieldEditor; //导入依赖的package包/类
@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);
}
}
示例4: createAdvancedControls
import org.eclipse.jface.preference.FileFieldEditor; //导入依赖的package包/类
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);
}
示例5: createAdvancedControls
import org.eclipse.jface.preference.FileFieldEditor; //导入依赖的package包/类
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);
}
示例6: createAdvancedControls
import org.eclipse.jface.preference.FileFieldEditor; //导入依赖的package包/类
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);
}
示例7: createFieldEditors
import org.eclipse.jface.preference.FileFieldEditor; //导入依赖的package包/类
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);
}
示例8: createFieldEditors
import org.eclipse.jface.preference.FileFieldEditor; //导入依赖的package包/类
@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$
}
示例9: createCompilerSettings
import org.eclipse.jface.preference.FileFieldEditor; //导入依赖的package包/类
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));
}
示例10: createControl
import org.eclipse.jface.preference.FileFieldEditor; //导入依赖的package包/类
@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);
}
示例11: createControl
import org.eclipse.jface.preference.FileFieldEditor; //导入依赖的package包/类
@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);
}
示例12: ProgramFieldEditor
import org.eclipse.jface.preference.FileFieldEditor; //导入依赖的package包/类
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]);
}
示例13: createAdvancedControls
import org.eclipse.jface.preference.FileFieldEditor; //导入依赖的package包/类
/**
* @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);
}
示例14: createAdvancedControls
import org.eclipse.jface.preference.FileFieldEditor; //导入依赖的package包/类
/**
* @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);
}
示例15: createFieldEditors
import org.eclipse.jface.preference.FileFieldEditor; //导入依赖的package包/类
/**
* 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);
}