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


Java StringFieldEditor.setStringValue方法代码示例

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


在下文中一共展示了StringFieldEditor.setStringValue方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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包/类
@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

示例3: 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

示例4: 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() {
	BooleanFieldEditor commitSignatureActive = new BooleanFieldEditor(
			PreferenceConstants.P_COMMIT_SIGNATURE_ACTIVE,
			Messages.PreferencePage_ViewCommitSignature,
			getFieldEditorParent());
	addField(commitSignatureActive);
	
	BooleanFieldEditor filterCk = new BooleanFieldEditor(
			PreferenceConstants.P_FILTER_COMMIT_MESSAGE,
			Messages.PreferencePage_FilterCommitMessage,
			getFieldEditorParent());
	filterCk.setPropertyChangeListener(new IPropertyChangeListener() {
		
		@Override
		public void propertyChange(PropertyChangeEvent arg0) {
			// TODO Auto-generated method stub
			
		}
	});
	
	addField(filterCk);
	
	final ScaleFieldEditor scaleFieldEditor = new ScaleFieldEditor(PreferenceConstants.P_FILTER_FACTOR, Messages.PreferencePage_FilterFactor, getFieldEditorParent());
	scaleFieldEditor.setMinimum(Constants.SIGNATURE_MIN_VALUE);
	scaleFieldEditor.setMaximum(Constants.SIGNATURE_MAX_VALUE);
	scaleFieldEditor.setPageIncrement(Constants.SIGNATURE_INCREMENT);
	final StringFieldEditor fieldEditor = new StringFieldEditor(PreferenceConstants.P_FILTER_FACTOR, Constants.EMPTY_STRING, getFieldEditorParent());
	fieldEditor.setEnabled(false, getFieldEditorParent());
	scaleFieldEditor.getScaleControl().addListener(SWT.Selection,
			new Listener() {
				public void handleEvent(Event event) {
					int perspectiveValue = scaleFieldEditor.getScaleControl().getSelection() + scaleFieldEditor.getMinimum();
					fieldEditor.setStringValue(perspectiveValue + Constants.SPACE + Constants.PERCENTAJE);
				}
	});
	
	fieldEditor.setStringValue(Activator.getDefault().getPreferenceStore().getDouble(PreferenceConstants.P_FILTER_FACTOR) + Constants.SPACE + Constants.PERCENTAJE);
	
	addField(scaleFieldEditor);
	addField(new StringFieldEditor(PreferenceConstants.P_AUTHOR, Messages.PreferencePage_Author, getFieldEditorParent()));
	addField(new StringFieldEditor(PreferenceConstants.P_COMMITER, Messages.PreferencePage_Commiter, getFieldEditorParent()));
}
 
开发者ID:SEMERU-WM,项目名称:ChangeScribe,代码行数:49,代码来源:PreferencePage.java


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