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


Java IPreferenceStore.getString方法代码示例

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


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

示例1: openQueueMonitor

import org.eclipse.jface.preference.IPreferenceStore; //导入方法依赖的package包/类
private void openQueueMonitor() throws UnsupportedEncodingException {

		final IPreferenceStore store = Activator.getDefault().getPreferenceStore();
		String bundle = store.getString(BUNDLE);
		String bean   = store.getString(BEAN);
		String sqn    = store.getString(STATUS_QUEUE);
		String stn    = store.getString(STATUS_TOPIC);
		String submit = store.getString(SUBMIT_QUEUE);
		String part   = store.getString(PART_NAME);

		String queueViewId = QueueViews.createSecondaryId(bundle,bean, sqn, stn, submit);
		queueViewId = queueViewId+"partName="+part;
		try {
			Util.getPage().showView(StatusQueueView.ID, queueViewId, IWorkbenchPage.VIEW_VISIBLE);
		} catch (PartInitException e) {
			ErrorDialog.openError(Display.getDefault().getActiveShell(), "Cannot open view", "Cannot open view "+queueViewId,
					new Status(Status.ERROR, "org.eclipse.scanning.event.ui", e.getMessage()));
			logger.error("Cannot open view", e);
		}
	}
 
开发者ID:eclipse,项目名称:scanning,代码行数:21,代码来源:StatusQueueLaunchView.java

示例2: start

import org.eclipse.jface.preference.IPreferenceStore; //导入方法依赖的package包/类
public void start(BundleContext context) throws Exception {
	super.start(context);
	plugin = this;

	// For backward compatibility
	// Read the preference file and if there are privious version settings in the
	// file, rewrite the setings to new settings to keep compatibility.
	IPreferenceStore store = UroborosqlFormatterPlugin.getDefault().getPreferenceStore();
	String configUseUppercase = store.getString(UroborosqlFormatterPreferenceInitializer.USE_UPPERCASE);
	String configHasBackwardCompatibilityDone = store
			.getString(UroborosqlFormatterPreferenceInitializer.HAS_BACKWARD_COMPATIBILITY_DONE);

	if (configUseUppercase != null) {
		backwardCompatibility(store, configUseUppercase, configHasBackwardCompatibilityDone);
	}
}
 
开发者ID:future-architect,项目名称:eclipse-uroborosql-formatter,代码行数:17,代码来源:UroborosqlFormatterPlugin.java

示例3: getNovelCommandPreference

import org.eclipse.jface.preference.IPreferenceStore; //导入方法依赖的package包/类
/**
    * Get the command value if it has been changed by the user.
    * @param key
    * @return
    */
   private static final String getNovelCommandPreference(String key) {
	final IPreferenceStore store = getDefault().getPreferenceStore();
String val = store.getString(key);
String def = store.getDefaultString(key);
if (!val.equals(def)) return val;
return null;
    }
 
开发者ID:eclipse,项目名称:scanning,代码行数:13,代码来源:Activator.java

示例4: bind

import org.eclipse.jface.preference.IPreferenceStore; //导入方法依赖的package包/类
/**
 * Binding plugin settings to python.
 *
 * @param engine
 *            PyEngine
 */
public void bind(PyEngine engine) {
	IPreferenceStore store = UroborosqlFormatterPlugin.getDefault().getPreferenceStore();

	engine.eval("config = LocalConfig()");
	if (CaseType.LOWER.name().equals(store.getString(UroborosqlFormatterPreferenceInitializer.CASE))) {
		engine.eval("config.set_case('lower')");
	} else if (CaseType.UPPER.name().equals(store.getString(UroborosqlFormatterPreferenceInitializer.CASE))) {
		engine.eval("config.set_case('upper')");
	} else if (CaseType.CAPITALIZE.name().equals(store.getString(UroborosqlFormatterPreferenceInitializer.CASE))) {
		engine.eval("config.set_case('capitalize')");
	}
	if (CaseType.LOWER.name().equals(store.getString(UroborosqlFormatterPreferenceInitializer.RESERVED_CASE))) {
		engine.eval("config.set_reserved_case('lower')");
	} else if (CaseType.UPPER.name()
			.equals(store.getString(UroborosqlFormatterPreferenceInitializer.RESERVED_CASE))) {
		engine.eval("config.set_reserved_case('upper')");
	} else if (CaseType.CAPITALIZE.name()
			.equals(store.getString(UroborosqlFormatterPreferenceInitializer.RESERVED_CASE))) {
		engine.eval("config.set_reserved_case('capitalize')");
	}
	if (store.getString(UroborosqlFormatterPreferenceInitializer.RESERVED_WORDS) != null) {
		String inputReservedWords = store.getString(UroborosqlFormatterPreferenceInitializer.RESERVED_WORDS);
		String[] reservedWords = inputReservedWords.split(",", 0);
		List<String> reservedWordsList = new ArrayList<String>();
		for (int i = 0; i < reservedWords.length; i++) {
			reservedWordsList.add(reservedWords[i]);
		}
		engine.put("input_reserved_words", reservedWordsList);
		engine.eval("config.set_input_reserved_words(input_reserved_words)");
	}
	if (CommentSyntaxType.Doma2.name().equals(store.getString(UroborosqlFormatterPreferenceInitializer.COMMENT_SYNTAX_TYPE))) {
		engine.eval("config.set_commentsyntax(Doma2CommentSyntax())");
	}
	if (store.getBoolean(UroborosqlFormatterPreferenceInitializer.USE_BACKSLASH)) {
		engine.eval("uroborosqlfmt.config.glb.escape_sequence_u005c = True");
	}
}
 
开发者ID:future-architect,项目名称:eclipse-uroborosql-formatter,代码行数:44,代码来源:PyConfigBinder.java

示例5: validateDb

import org.eclipse.jface.preference.IPreferenceStore; //导入方法依赖的package包/类
private int validateDb() {
	editor = (DbToolGefEditor) getWorkbenchPart().getAdapter(GraphicalEditor.class);
	schema = editor.getModel();
	dbDialect = DbDialectManager.getDbDialect(schema.getCurrentDbType());
	IPreferenceStore store = Activator.getDefault().getPreferenceStore();
	String driverLocation = store.getString(schema.getCurrentDbType());
	if (driverLocation.trim().length() == 0) {
		return openDbDriverLocationDialog(schema.getCurrentDbType(), dbDialect.getJdbcDriverName(), driverLocation);
	} else {
		return attemptTestJdbcDriver(schema.getCurrentDbType(), dbDialect.getJdbcDriverName(), driverLocation);
	}
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:13,代码来源:DatabaseAction.java

示例6: getLocalBuildAdditionalPath

import org.eclipse.jface.preference.IPreferenceStore; //导入方法依赖的package包/类
static public String getLocalBuildAdditionalPath() {
       IPreferenceStore preferenceStore = ConvertigoPlugin.getDefault().getPreferenceStore();
       return preferenceStore.getString(ConvertigoPlugin.PREFERENCE_LOCAL_BUILD_ADDITIONAL_PATH);
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:5,代码来源:ConvertigoPlugin.java

示例7: getLocalBuildFolder

import org.eclipse.jface.preference.IPreferenceStore; //导入方法依赖的package包/类
static public String getLocalBuildFolder() {
       IPreferenceStore preferenceStore = ConvertigoPlugin.getDefault().getPreferenceStore();
       return preferenceStore.getString(ConvertigoPlugin.PREFERENCE_LOCAL_BUILD_FOLDER);
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:5,代码来源:ConvertigoPlugin.java

示例8: getCommandPreference

import org.eclipse.jface.preference.IPreferenceStore; //导入方法依赖的package包/类
protected String getCommandPreference(String key) {
	final IPreferenceStore store = Activator.getDefault().getPreferenceStore();
return store.getString(key);
   }
 
开发者ID:eclipse,项目名称:scanning,代码行数:5,代码来源:EventConnectionView.java

示例9: rebuildOutline

import org.eclipse.jface.preference.IPreferenceStore; //导入方法依赖的package包/类
/**
 * Does rebuild the outline - this is done asynchronous
 */
public void rebuildOutline() {
	String text = getDocumentText();

	IPreferenceStore store = BashEditorUtil.getPreferences().getPreferenceStore();

	boolean validateBlocks = store.getBoolean(VALIDATE_BLOCK_STATEMENTS.getId());
	boolean validateDo = store.getBoolean(VALIDATE_DO_STATEMENTS.getId());
	boolean validateIf = store.getBoolean(VALIDATE_IF_STATEMENTS.getId());
	boolean validateFunctions = store.getBoolean(VALIDATE_FUNCTION_STATEMENTS.getId());
	String errorLevelId = store.getString(VALIDATE_ERROR_LEVEL.getId());
	BashEditorValidationErrorLevel errorLevel = BashEditorValidationErrorLevel.fromId(errorLevelId);

	boolean debugMode = Boolean.parseBoolean(System.getProperty("basheditor.debug.enabled"));

	modelBuilder.setIgnoreBlockValidation(!validateBlocks);
	modelBuilder.setIgnoreDoValidation(!validateDo);
	modelBuilder.setIgnoreIfValidation(!validateIf);
	modelBuilder.setIgnoreFunctionValidation(!validateFunctions);

	modelBuilder.setDebug(debugMode);

	EclipseUtil.safeAsyncExec(new Runnable() {

		@Override
		public void run() {
			BashEditorUtil.removeScriptErrors(BashEditor.this);

			BashScriptModel model;
			try {
				model = modelBuilder.build(text);
			} catch (BashScriptModelException e) {
				BashEditorUtil.logError("Was not able to build validation model", e);
				model = FALLBACK_MODEL;
			}

			getOutlinePage().rebuild(model);

			if (model.hasErrors()) {
				int severity;
				if (BashEditorValidationErrorLevel.INFO.equals(errorLevel)) {
					severity = IMarker.SEVERITY_INFO;
				} else if (BashEditorValidationErrorLevel.WARNING.equals(errorLevel)) {
					severity = IMarker.SEVERITY_WARNING;
				} else {
					severity = IMarker.SEVERITY_ERROR;
				}
				addErrorMarkers(model, severity);
			}
		}
	});
}
 
开发者ID:de-jcup,项目名称:eclipse-bash-editor,代码行数:55,代码来源:BashEditor.java

示例10: makeSurePreferenceInitalizerIsCalled

import org.eclipse.jface.preference.IPreferenceStore; //导入方法依赖的package包/类
private void makeSurePreferenceInitalizerIsCalled() {
	IPreferenceStore store = Activator.getDefault().getPreferenceStore();
	store.getString("");
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:5,代码来源:Activator.java

示例11: getProperty

import org.eclipse.jface.preference.IPreferenceStore; //导入方法依赖的package包/类
public static String getProperty(String key) {
	IPreferenceStore preferenceStore = ConvertigoPlugin.getDefault().getPreferenceStore();
	logDebug3("Looking for property : \"" + key + "\"");

	String result = preferenceStore.getString(key);
	
    logDebug3("==> Getting property " + key + ": \"" + result + "\"");
    
    return result;
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:11,代码来源:ConvertigoPlugin.java


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