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


Java ConfigurationScope.INSTANCE属性代码示例

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


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

示例1: getEclipsePreferences

/**
 * Returns the eclipse preferences.
 * @return the eclipse preferences
 */
public IEclipsePreferences getEclipsePreferences() {
	if (eclipsePreferences==null) {
		IScopeContext iScopeContext = ConfigurationScope.INSTANCE;
		eclipsePreferences = iScopeContext.getNode(PlugInActivator.PLUGIN_ID);
		eclipsePreferences.addPreferenceChangeListener(this.getChangeListener());
	}
	return eclipsePreferences;
}
 
开发者ID:EnFlexIT,项目名称:AgentWorkbench,代码行数:12,代码来源:BundleProperties.java

示例2: getTimeZone

public static TimeZone getTimeZone ()
{
    final IScopeContext[] scopeContext = new IScopeContext[] { ConfigurationScope.INSTANCE };
    final String tzId = Platform.getPreferencesService ().getString ( PLUGIN_ID, TIME_ZONE_KEY, TimeZone.getDefault ().getID (), scopeContext );
    if ( Arrays.asList ( TimeZone.getAvailableIDs () ).contains ( tzId ) )
    {
        return TimeZone.getTimeZone ( tzId );
    }
    return TimeZone.getDefault ();
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:10,代码来源:Activator.java

示例3: resolveScopeContext

/**
 * Resolve the given scheme to a preference scope.
 * 
 * @param scheme the preference scheme
 * @return the corresponding preference scope
 * @throws IllegalArgumentException if unable to resolve the scheme to a preference scope
 */
private static IScopeContext resolveScopeContext(String scheme) throws IllegalArgumentException {
  switch (scheme) {
    case "instance":
      return InstanceScope.INSTANCE;
    case "configuration":
      return ConfigurationScope.INSTANCE;
    default:
      throw new IllegalArgumentException("Unknown scheme: " + scheme);
  }
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:17,代码来源:PreferenceResolver.java

示例4: isAutoBuildEnabled

protected static boolean isAutoBuildEnabled() {
	IPreferencesService service = Platform.getPreferencesService();
	String qualifier = ResourcesPlugin.getPlugin().getBundle().getSymbolicName();
	String key = "description.autobuilding";
	IScopeContext[] contexts = { InstanceScope.INSTANCE, ConfigurationScope.INSTANCE };
	return service.getBoolean(qualifier, key, false, contexts);
}
 
开发者ID:SAP,项目名称:hybris-commerce-eclipse-plugin,代码行数:7,代码来源:BuildUtils.java

示例5: isAutoBuildEnabled

protected boolean isAutoBuildEnabled()
{
	IPreferencesService service = Platform.getPreferencesService();
	String qualifier = ResourcesPlugin.getPlugin().getBundle().getSymbolicName();
	String key = "description.autobuilding";
	IScopeContext[] contexts = { InstanceScope.INSTANCE, ConfigurationScope.INSTANCE };
	return service.getBoolean(qualifier, key, false, contexts);
}
 
开发者ID:SAP,项目名称:hybris-commerce-eclipse-plugin,代码行数:8,代码来源:EclipseRefreshAndBuildHandler.java

示例6: isAutoBuildEnabled

protected boolean isAutoBuildEnabled()
{
	IPreferencesService service = Platform.getPreferencesService();
	String qualifier = ResourcesPlugin.getPlugin().getBundle().getSymbolicName();
	String key = "description.autobuilding";
	IScopeContext[] contexts = { InstanceScope.INSTANCE, ConfigurationScope.INSTANCE};
	return service.getBoolean( qualifier, key, false, contexts );
}
 
开发者ID:SAP,项目名称:hybris-commerce-eclipse-plugin,代码行数:8,代码来源:SynchronizePlatformWizard.java

示例7: initializeDefaultPreferences

@Override
public void initializeDefaultPreferences() {
	// 设置 colors 首选项页的初始值
	IPreferenceStore store = Activator.getDefault().getPreferenceStore();
	PreferenceConverter.setDefault(store, IColorPreferenceConstant.TAG_FG_COLOR, new RGB(234, 234, 234));
	PreferenceConverter.setDefault(store, IColorPreferenceConstant.TAG_BG_COLOR, new RGB(223, 112, 0));
	PreferenceConverter.setDefault(store, IColorPreferenceConstant.WRONG_TAG_COLOR, new RGB(255, 0, 0));
	PreferenceConverter.setDefault(store, IColorPreferenceConstant.DIFFERENCE_FG_COLOR, new RGB(255, 0, 0));
	PreferenceConverter.setDefault(store, IColorPreferenceConstant.DIFFERENCE_BG_COLOR, new RGB(244, 244, 159));

	PreferenceConverter.setDefault(store, IColorPreferenceConstant.PT_COLOR, new RGB(255, 0, 0));
	PreferenceConverter.setDefault(store, IColorPreferenceConstant.QT_COLOR, new RGB(255, 204, 204));
	PreferenceConverter.setDefault(store, IColorPreferenceConstant.MT_COLOR, new RGB(171, 217, 198));
	PreferenceConverter.setDefault(store, IColorPreferenceConstant.TM_MATCH101_COLOR, new RGB(255, 255, 204));
	PreferenceConverter.setDefault(store, IColorPreferenceConstant.TM_MATCH100_COLOR, new RGB(37, 168, 204));
	PreferenceConverter.setDefault(store, IColorPreferenceConstant.TM_MATCH90_COLOR, new RGB(79, 185, 214));
	PreferenceConverter.setDefault(store, IColorPreferenceConstant.TM_MATCH80_COLOR, new RGB(114, 199, 222));
	PreferenceConverter.setDefault(store, IColorPreferenceConstant.TM_MATCH70_COLOR, new RGB(155, 215, 231));
	PreferenceConverter.setDefault(store, IColorPreferenceConstant.TM_MATCH0_COLOR, new RGB(198, 240, 251));

	PreferenceConverter.setDefault(store, IColorPreferenceConstant.HIGHLIGHTED_TERM_COLOR, new RGB(170, 255, 85));

	// 设置 net.heartsome.cat.common.core 插件中的语言代码初始值
	IPreferenceStore corePreferenceStore = new ScopedPreferenceStore(ConfigurationScope.INSTANCE, CoreActivator
			.getDefault().getBundle().getSymbolicName());
	corePreferenceStore.setDefault(IPreferenceConstants.LANGUAGECODE, LocaleService.getLanguageConfigAsString());

	// 设置选择路径对话框的初始值
	PlatformUI.getPreferenceStore()
			.setDefault(IPreferenceConstants.LAST_DIRECTORY, System.getProperty("user.home"));
	
	ColorConfigLoader.init();
}
 
开发者ID:heartsome,项目名称:translationstudio8,代码行数:33,代码来源:TSPreferenceInitializer.java

示例8: isParamAttrGenerated

private boolean isParamAttrGenerated()
{
	IScopeContext[] contexts;
	if (project != null)
	{
		contexts = new IScopeContext[]{
			new ProjectScope(project.getProject()), InstanceScope.INSTANCE,
			ConfigurationScope.INSTANCE, DefaultScope.INSTANCE
		};
	}
	else
	{
		contexts = new IScopeContext[]{
			InstanceScope.INSTANCE, ConfigurationScope.INSTANCE, DefaultScope.INSTANCE
		};
	}
	for (int j = 0; j < contexts.length; ++j)
	{
		String value = contexts[j].getNode(JavaCore.PLUGIN_ID)
			.get(JavaCore.COMPILER_CODEGEN_METHOD_PARAMETERS_ATTR, null);
		if (value != null)
		{
			value = value.trim();
			if (!value.isEmpty())
				return "generate".equals(value.trim());
		}
	}
	return false;
}
 
开发者ID:mybatis,项目名称:mybatipse,代码行数:29,代码来源:JavaMapperUtil.java

示例9: onCreateComponent

@Override
protected IJp2pComponent<IManagedPropertyListener<IJp2pProperties, Object>> onCreateComponent(
		IJp2pPropertySource<IJp2pProperties> source) {
	IPersistedProperties<IJp2pProperties, String,Object> properties = new PersistedProperties( (IJp2pWritePropertySource<IJp2pProperties>) super.getPropertySource(), ConfigurationScope.INSTANCE );
	PersistenceService<String,Object> service = new PersistenceService<String,Object>((IJp2pWritePropertySource<IJp2pProperties>) source, properties );
	service.start();
	return service;
}
 
开发者ID:chaupal,项目名称:jp2p,代码行数:8,代码来源:OsgiPersistenceFactory.java

示例10: getPreferenceStore

static IPreferenceStore getPreferenceStore() {
  return new ScopedPreferenceStore(ConfigurationScope.INSTANCE, PREFERENCE_PATH);
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:3,代码来源:AnalyticsPreferences.java

示例11: initializeDefaultPreferences

@Override
public void initializeDefaultPreferences()
{
	IPreferenceStore store = new ScopedPreferenceStore(ConfigurationScope.INSTANCE, "org.bbaw.bts.app");	
	
	System.out.println("Enter in default Preference Initializer");
	IEclipsePreferences defaultPrefs = DefaultScope.INSTANCE.getNode("org.bbaw.bts.app");
	IEclipsePreferences prefs = DefaultScope.INSTANCE.getNode("org.bbaw.bts.app");

	store.setDefault(BTSPluginIDs.PREF_ACTIVE_CORPORA, defaultPrefs.get(BTSPluginIDs.PREF_ACTIVE_CORPORA, null));
	prefs.put(BTSPluginIDs.PREF_ACTIVE_CORPORA, defaultPrefs.get(BTSPluginIDs.PREF_ACTIVE_CORPORA, null));

	store.setDefault(BTSPluginIDs.PREF_MAIN_CORPUS_KEY, defaultPrefs.get(BTSPluginIDs.PREF_MAIN_CORPUS_KEY, null));
	prefs.put(BTSPluginIDs.PREF_ACTIVE_CORPORA, defaultPrefs.get(BTSPluginIDs.PREF_ACTIVE_CORPORA, null));


	
	
}
 
开发者ID:cplutte,项目名称:bts,代码行数:19,代码来源:DefaultValuesInitializer.java

示例12: getScope

public static IScopeContext getScope() {
    if (scope == null) {
        scope = ConfigurationScope.INSTANCE;
    }
    return scope;
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:6,代码来源:MissionConstants.java

示例13: RailroadViewPreferences

public RailroadViewPreferences() {
  preferenceStore = new ScopedPreferenceStore(ConfigurationScope.INSTANCE, "ANTLR Syntax Diagram");
}
 
开发者ID:antlr4ide,项目名称:antlr4ide,代码行数:3,代码来源:RailroadViewPreferences.java

示例14: getGlobalPreference

/**
 * Set the global preference value for the passed key
 * 
 * @param project
 * @param key
 * @param value
 */
public static IEclipsePreferences getGlobalPreference() {
	IScopeContext context = ConfigurationScope.INSTANCE;
	IEclipsePreferences projectPreferences = context.getNode(Activator.PLUGIN_ID);
	return projectPreferences;
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:12,代码来源:SettingsManager.java


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