当前位置: 首页>>代码示例>>Java>>正文


Java StringFieldEditor.setEmptyStringAllowed方法代码示例

本文整理汇总了Java中org.eclipse.jface.preference.StringFieldEditor.setEmptyStringAllowed方法的典型用法代码示例。如果您正苦于以下问题:Java StringFieldEditor.setEmptyStringAllowed方法的具体用法?Java StringFieldEditor.setEmptyStringAllowed怎么用?Java StringFieldEditor.setEmptyStringAllowed使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.jface.preference.StringFieldEditor的用法示例。


在下文中一共展示了StringFieldEditor.setEmptyStringAllowed方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: additionalFields

import org.eclipse.jface.preference.StringFieldEditor; //导入方法依赖的package包/类
@Override
protected List<FieldEditor> additionalFields(Composite fieldEditorParent) {
	Label filters = new Label(fieldEditorParent, SWT.NONE);
	filters.setText("Import filters to use:");

	List<FieldEditor> fes = new LinkedList<FieldEditor>();

	Map<String, ISimulinkImportFilter> filtersById = ImportFilterRegistry.INSTANCE.getFiltersById();
	for (String filterId : filtersById.keySet()) {
		ISimulinkImportFilter filter = filtersById.get(filterId);
		BooleanFieldEditor filterCheckbox = new BooleanFieldEditor(filterId, filter.getName(), fieldEditorParent);
		filterCheckbox.setPreferenceStore(store);
		filterCheckbox.setPreferenceName(filterId);
		filterCheckbox.load();
		filterCheckbox.getDescriptionControl(fieldEditorParent).setToolTipText(filter.getDescription());
		fes.add(filterCheckbox);
		filterSelectors.put(filterId, filterCheckbox);
	}

	importedModelNameEditor = new StringFieldEditor("", "Result Model Name:", fieldEditorParent);
	importedModelNameEditor.setEmptyStringAllowed(false);
	importedModelNameEditor.setStringValue(importedModelName);
	fes.add(importedModelNameEditor);

	return fes;
}
 
开发者ID:viatra,项目名称:massif,代码行数:27,代码来源:ImportSettingsDialog.java

示例2: createFieldEditors

import org.eclipse.jface.preference.StringFieldEditor; //导入方法依赖的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);
}
 
开发者ID:polyhedraltech,项目名称:SecurityTesting,代码行数:31,代码来源:ZAPPreferencePage.java

示例3: createFieldEditors

import org.eclipse.jface.preference.StringFieldEditor; //导入方法依赖的package包/类
@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);
}
 
开发者ID:google,项目名称:depan,代码行数:30,代码来源:AnalysisPreferencesPage.java

示例4: createFieldEditors

import org.eclipse.jface.preference.StringFieldEditor; //导入方法依赖的package包/类
@Override
protected void createFieldEditors() {
	StringFieldEditor mergeRenamingPrefixStringField = new StringFieldEditor(JReFrameworkerPreferences.MERGE_RENAMING_PREFIX, "&" + MERGE_RENAME_PREFIX_DESCRIPTION, getFieldEditorParent());
	// class files do not have a defined max length, see http://stackoverflow.com/a/695959/475329
	// but if long prefixes becomes a problem use the setTextLimit(int) method to limit input length
	mergeRenamingPrefixStringField.setEmptyStringAllowed(false);
	String mergeRenamingPrefix = JReFrameworkerPreferences.getMergeRenamingPrefix();
	if(mergeRenamingPrefix == null || mergeRenamingPrefix.equals("")){
		mergeRenamingPrefixStringField.setStringValue(JReFrameworkerPreferences.MERGE_RENAMING_PREFIX_DEFAULT);
	}
	addField(mergeRenamingPrefixStringField);
	addField(new BooleanFieldEditor(JReFrameworkerPreferences.VERBOSE_LOGGING, "&" + VERBOSE_LOGGING_DESCRIPTION, getFieldEditorParent()));
}
 
开发者ID:JReFrameworker,项目名称:JReFrameworker,代码行数:14,代码来源:PreferencesPage.java

示例5: createFieldEditors

import org.eclipse.jface.preference.StringFieldEditor; //导入方法依赖的package包/类
/**
 * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
 */
protected void createFieldEditors()
{
    StringFieldEditor counterName = new StringFieldEditor(IPreferencesConstants.VELOCITY_COUNTER_NAME, VelocityPlugin.getMessage(PREFIX + "counterName"), getFieldEditorParent());
    counterName.setEmptyStringAllowed(false);
    addField(counterName);
    DirectiveEditor directives = new DirectiveEditor(IPreferencesConstants.VELOCITY_USER_DIRECTIVES, VelocityPlugin.getMessage(PREFIX + "userDirectives"), getFieldEditorParent());
    addField(directives);
    StringFieldEditor resourceDir = new StringFieldEditor(IPreferencesConstants.VELOCITY_RESOURCE_DIR, VelocityPlugin.getMessage(PREFIX + "resourceDir"), getFieldEditorParent());
    addField(resourceDir);
}
 
开发者ID:ninneko,项目名称:velocity-edit,代码行数:14,代码来源:VelocityPreferencePage.java

示例6: createFieldEditors

import org.eclipse.jface.preference.StringFieldEditor; //导入方法依赖的package包/类
/**
 * 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() {
	addField(new ColorFieldEditor(ColorManager.COLOR_FOREACH_DIRECTIVE,
			UIUtil.getResourceLabel("ForeachDirective"), getFieldEditorParent()));
	addField(new ColorFieldEditor(ColorManager.COLOR_IF_DIRECTIVE, UIUtil.getResourceLabel("IfDirective"),
			getFieldEditorParent()));
	addField(new ColorFieldEditor(ColorManager.COLOR_MACRO_DIRECTIVE, UIUtil.getResourceLabel("MacroDirective"),
			getFieldEditorParent()));
	addField(new ColorFieldEditor(ColorManager.COLOR_SET_DIRECTIVE, UIUtil.getResourceLabel("SetDirective"),
			getFieldEditorParent()));
	addField(new ColorFieldEditor(ColorManager.COLOR_VARIABLE, UIUtil.getResourceLabel("VelocityVariable"),
			getFieldEditorParent()));
	addField(new ColorFieldEditor(ColorManager.COLOR_COMMENT, UIUtil.getResourceLabel("VelocityComment"),
			getFieldEditorParent()));

	addField(new ColorFieldEditor(ColorManager.COLOR_PROC_INSTR, UIUtil.getResourceLabel("XMLInstruction"),
			getFieldEditorParent()));
	addField(new ColorFieldEditor(ColorManager.COLOR_STRING, UIUtil.getResourceLabel("XMLString"),
			getFieldEditorParent()));
	addField(new ColorFieldEditor(ColorManager.COLOR_TAG, UIUtil.getResourceLabel("XMLTag"), getFieldEditorParent()));
	addField(new ColorFieldEditor(ColorManager.COLOR_XML_COMMENT, UIUtil.getResourceLabel("XMLComment"),
			getFieldEditorParent()));
	{
		IntegerFieldEditor integerFieldEditor = new IntegerFieldEditor(AUTO_COMPLETE_DEPLAY, "Auto Completion Delay(ms):",
				getFieldEditorParent());
		integerFieldEditor.setStringValue("80");
		integerFieldEditor.setValidRange(0, 9999);
		addField(integerFieldEditor);
	}
	{
		StringFieldEditor stringFieldEditor = new StringFieldEditor(MACRO_TEMPLATE_PATH, "Macro Template Path:", 40, StringFieldEditor.VALIDATE_ON_KEY_STROKE, getFieldEditorParent());
		stringFieldEditor.setEmptyStringAllowed(false);
		stringFieldEditor.setStringValue("/src/main/webapp/home/templates/");
		addField(stringFieldEditor);
	}
}
 
开发者ID:ninneko,项目名称:velocity-edit,代码行数:41,代码来源:MainPreferences.java

示例7: createFieldEditors

import org.eclipse.jface.preference.StringFieldEditor; //导入方法依赖的package包/类
@Override
protected void createFieldEditors() {
	StringFieldEditor localRestServiceUri = new StringFieldEditor(
			Activator.REST_URI_PREFERENCE,
			Messages.getString("esb.preferences.rest.service.uri.default"),
			getFieldEditorParent());
	localRestServiceUri.setEmptyStringAllowed(false);
	addField(localRestServiceUri);

	StringFieldEditor defaultServiceNamespace = new StringFieldEditor(
			Activator.DEFAULT_SL_NAMESPACE_PREF,
			Messages.EsbPreferencePage_SL_NAMESPACE, getFieldEditorParent());
	defaultServiceNamespace.setEmptyStringAllowed(false);
	addField(defaultServiceNamespace);
}
 
开发者ID:Talend,项目名称:tesb-studio-se,代码行数:16,代码来源:EsbPreferencePage.java

示例8: createFieldEditors

import org.eclipse.jface.preference.StringFieldEditor; //导入方法依赖的package包/类
@Override
protected void createFieldEditors()
{
    StringFieldEditor wndTitle =
            new StringFieldEditor(PreferenceConstants.P_APP_WINDOW_TITLE,
                                   "Window title (empty for default title)",
                                   getFieldEditorParent());
    wndTitle.setEmptyStringAllowed(true);
    addField(wndTitle);
}
 
开发者ID:vobject,项目名称:maru,代码行数:11,代码来源:Root.java

示例9: createFieldEditors

import org.eclipse.jface.preference.StringFieldEditor; //导入方法依赖的package包/类
@Override
protected void createFieldEditors() {
    final Composite p = getFieldEditorParent();
    multiBlock = new StringFieldEditor(MULTI_BLOCK_COMMENT_CHAR, "Multi-block char (ctrl+4):", 2, p);
    multiBlock.getTextControl(p).setTextLimit(1);
    multiBlock.setEmptyStringAllowed(false);
    addField(multiBlock);

    addField(new BooleanFieldEditor(MULTI_BLOCK_COMMENT_SHOW_ONLY_CLASS_NAME,
            "In a class name, create block only with class name above of class?", p));
    addField(new BooleanFieldEditor(MULTI_BLOCK_COMMENT_SHOW_ONLY_FUNCTION_NAME,
            "In a function name, create block only with function name above of function?", p));

    labelMulti = new Label(p, SWT.NONE);

    singleBlock = new StringFieldEditor(SINGLE_BLOCK_COMMENT_CHAR, "Single-block char (ctrl+shift+4):", 2, p);
    singleBlock.setEmptyStringAllowed(false);
    singleBlock.getTextControl(p).setTextLimit(1);
    addField(singleBlock);

    alignSingle = new BooleanFieldEditor(SINGLE_BLOCK_COMMENT_ALIGN_RIGHT,
            "Align text in single-block to the right?", p);
    addField(alignSingle);
    labelSingle = new Label(p, SWT.NONE);

    IPreferenceStore store = getPreferenceStore();
    setLabelFont(p, labelSingle);
    setLabelFont(p, labelMulti);

    updateMulti(store.getString(MULTI_BLOCK_COMMENT_CHAR));
    updateSingle(store.getString(SINGLE_BLOCK_COMMENT_CHAR), store.getBoolean(SINGLE_BLOCK_COMMENT_ALIGN_RIGHT));
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:33,代码来源:CommentBlocksPreferences.java

示例10: createFieldEditors

import org.eclipse.jface.preference.StringFieldEditor; //导入方法依赖的package包/类
@Override
protected void createFieldEditors() {
	addField(new StringFieldEditor(JENKINS, "* Jenkins Server URL", getFieldEditorParent()));
	username = new StringFieldEditor(USERNAME, "* Jenkins Username", getFieldEditorParent());
	username.setEmptyStringAllowed(false);
	addField(username);

	addField(new PasswordFieldEditor(PASSWORD, "* Jenkins Password", getFieldEditorParent()));

	jobname = new JobPicker(JOBNAME, "* Jenkins Job Name", getFieldEditorParent());
	addField(jobname);

	addField(new StringFieldEditor(BRANCH_URL, "* Branch URL", getFieldEditorParent()));
	addField(new StringFieldEditor(SDK_BUNDLES_FOLDER, "* SDK-Bundles Folder", getFieldEditorParent()));
	addField(new StringFieldEditor(SDK_TARGET_PLATFORM_FILE, "* Target Platform Definition File", getFieldEditorParent()));
	addField(new StringFieldEditor(SDK_ARTIFACT_TO_DOWNLOAD, "* Zip artifact to download to SDK folder:", getFieldEditorParent()));
	IntegerFieldEditor numberOfBuilds = new IntegerFieldEditor(MAX_BUILDS_TO_PROCESS, "Limit number of builds to choose", getFieldEditorParent());
	numberOfBuilds.setValidRange(1, 100);
	addField(numberOfBuilds);
	addField(new StringFieldEditor(SVN_RELEASE_URL, "SVN release tag url", getFieldEditorParent()));
	addField(new BooleanFieldEditor(DO_UPDATE_TO_REVISION_AUTOMATICALLY, "Automatically update all workspace projects's to downloaded build's revision",
			getFieldEditorParent()));
	addField(new BooleanFieldEditor(DO_DELETE_AUTOMATICALLY, "Automatically delete duplicated binaries after checkout svn projects", getFieldEditorParent()));
	addField(new BooleanFieldEditor(USE_IMAGE_DECORATION, "Use image decoration (Except a target-platform project)", getFieldEditorParent()));
	addField(new BooleanFieldEditor(USE_TEXT_DECORATION, "Use text decoration on source project (Except a target platform project)", getFieldEditorParent()));
	addField(new BooleanFieldEditor(DO_SCAN_BUILDS_PERIODICALLY, "Obtain builds on background", getFieldEditorParent()));
	IntegerFieldEditor updateBuildsEvery = new IntegerFieldEditor(DO_SCAN_BUILDS_EVERY, "Obtain builds on background every (min)", getFieldEditorParent());
	updateBuildsEvery.setValidRange(1, 3600);
	addField(updateBuildsEvery);

	IntegerFieldEditor depth = new IntegerFieldEditor(DEPTH_OF_SVN_SCAN, "The scanning depth of nested SVN folders", getFieldEditorParent());
	depth.setValidRange(0, 99);
	addField(depth);
}
 
开发者ID:azachar,项目名称:GrayTin,代码行数:35,代码来源:SDKBundleUpdatePreferencePage.java

示例11: create

import org.eclipse.jface.preference.StringFieldEditor; //导入方法依赖的package包/类
public StringFieldEditor create() {
  final StringFieldEditor stringFieldEditor = optionalValidation.isPresent() ? createWithValidation() : createWihtoutValidation();
  stringFieldEditor.setEmptyStringAllowed(emptyStringAllowed);
  return stringFieldEditor;
}
 
开发者ID:sealuzh,项目名称:Permo,代码行数:6,代码来源:StringFieldEditorBuilder.java

示例12: createFieldEditors

import org.eclipse.jface.preference.StringFieldEditor; //导入方法依赖的package包/类
@Override
protected void createFieldEditors()
{
    Composite parent = getFieldEditorParent();
    parent.setLayout(new GridLayout(1, false));
    
    Composite general = new Composite(parent, SWT.NONE);
    general.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    general.setLayout(new GridLayout(2, false));
    
    StringFieldEditor ipField = new StringFieldEditor(
            InteractionPreferenceInitializer.SERVER_HOST,
            Messages.InteractionPreferencePage_Server_IP, general);
    ipField.setEmptyStringAllowed(false);
    ipField.fillIntoGrid(general, 2);
    addField(ipField);
    StringFieldEditor portField = new StringFieldEditor(
            InteractionPreferenceInitializer.SERVER_PORT,
            Messages.InteractionPreferencePage_Server_Port, general);
    portField.setEmptyStringAllowed(false);
    portField.fillIntoGrid(general, 2);
    addField(portField);
    IntegerFieldEditor timeoutField = new IntegerFieldEditor(
            InteractionPreferenceInitializer.LOCATION,
            Messages.InteractionPreferencePage_Location, general);
    timeoutField.setValidRange(0, Integer.MAX_VALUE);
    timeoutField.fillIntoGrid(general, 2);
    addField(timeoutField);
    
    //        IntegerFieldEditor timeoutField = new IntegerFieldEditor(
    //                InteractionPreferenceInitializer.TIME_OUT, Messages.InteractionPreferencePage_Timeout, general);
    //        timeoutField.setValidRange(0, Integer.MAX_VALUE);
    //        timeoutField.fillIntoGrid(general, 2);
    //        addField(timeoutField);
    //        
    //        StringFieldEditor successField = new StringFieldEditor(
    //                InteractionPreferenceInitializer.SUCC_MARK, Messages.InteractionPreferencePage_Succ_Mark,
    //                general);
    //        successField.setEmptyStringAllowed(false);
    //        successField.fillIntoGrid(general, 2);
    //        addField(successField);
    //        
    Group group = new Group(parent, SWT.NONE);
    GridData data = new GridData(GridData.FILL_HORIZONTAL);
    group.setLayoutData(data);
    group.setLayout(new GridLayout(2, false));
    group.setText(Messages.InteractionPreferencePage_Services);
    StringFieldEditor serviceSuccField = new StringFieldEditor(
            InteractionPreferenceInitializer.SUCCESS_SERVICE,
            Messages.InteractionPreferencePage_Service_Succ, group);
    serviceSuccField.setEmptyStringAllowed(false);
    serviceSuccField.fillIntoGrid(group, 2);
    addField(serviceSuccField);
    
    StringFieldEditor serviceFailField = new StringFieldEditor(
            InteractionPreferenceInitializer.FAIL_SERVICE,
            Messages.InteractionPreferencePage_Service_Fail, group);
    serviceFailField.setEmptyStringAllowed(false);
    serviceFailField.fillIntoGrid(group, 2);
    addField(serviceFailField);
    //        
    //        StringFieldEditor serviceTimeoutField = new StringFieldEditor(
    //                InteractionPreferenceInitializer.TIMEOUT_SERVICE,
    //                Messages.InteractionPreferencePage_Service_Timeout, group);
    //        serviceTimeoutField.setEmptyStringAllowed(false);
    //        serviceTimeoutField.fillIntoGrid(group, 2);
    //        addField(serviceTimeoutField);
}
 
开发者ID:eSDK,项目名称:esdk_ide_ev3,代码行数:69,代码来源:InteractionPreferencePage.java


注:本文中的org.eclipse.jface.preference.StringFieldEditor.setEmptyStringAllowed方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。