Java Code Examples for org.eclipse.core.runtime.preferences.IPreferencesService#getBoolean()

The following examples show how to use org.eclipse.core.runtime.preferences.IPreferencesService#getBoolean() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BuildUtils.java    From hybris-commerce-eclipse-plugin with Apache License 2.0 5 votes vote down vote up
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);
}
 
Example 2
Source File: EclipseRefreshAndBuildHandler.java    From hybris-commerce-eclipse-plugin with Apache License 2.0 5 votes vote down vote up
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);
}
 
Example 3
Source File: SynchronizePlatformWizard.java    From hybris-commerce-eclipse-plugin with Apache License 2.0 5 votes vote down vote up
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 );
}
 
Example 4
Source File: ImportPlatformWizard.java    From hybris-commerce-eclipse-plugin with Apache License 2.0 5 votes vote down vote up
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 );
}
 
Example 5
Source File: FileFormatUtils.java    From translationstudio8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 检查是否启用 Open Office
 */
private static void checkAutomaticOO(List<ConverterBean> list) {
	IPreferencesService service = Platform.getPreferencesService();
	String qualifier = Activator.getDefault().getBundle().getSymbolicName();
	boolean automaticOO = service.getBoolean(qualifier, IPreferenceConstants.AUTOMATIC_OO, false, null);
	if (!automaticOO) {
		list.remove(new ConverterBean("MS Office Document to XLIFF Conveter", null));
	}
}
 
Example 6
Source File: FileFormatUtils.java    From translationstudio8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 检查是否启用 Open Office
 */
private static void checkAutomaticOO(List<ConverterBean> list) {
	IPreferencesService service = Platform.getPreferencesService();
	String qualifier = Activator.getDefault().getBundle().getSymbolicName();
	boolean automaticOO = service.getBoolean(qualifier, IPreferenceConstants.AUTOMATIC_OO, false, null);
	if (!automaticOO) {
		list.remove(new ConverterBean("MS Office Document to XLIFF Conveter", null));
	}
}
 
Example 7
Source File: FileFormatUtils.java    From tmxeditor8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 检查是否启用 Open Office
 */
private static void checkAutomaticOO(List<ConverterBean> list) {
	IPreferencesService service = Platform.getPreferencesService();
	String qualifier = Activator.getDefault().getBundle().getSymbolicName();
	boolean automaticOO = service.getBoolean(qualifier, IPreferenceConstants.AUTOMATIC_OO, false, null);
	if (!automaticOO) {
		list.remove(new ConverterBean("MS Office Document to XLIFF Conveter", null));
	}
}
 
Example 8
Source File: FileFormatUtils.java    From tmxeditor8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 检查是否启用 Open Office
 */
private static void checkAutomaticOO(List<ConverterBean> list) {
	IPreferencesService service = Platform.getPreferencesService();
	String qualifier = Activator.getDefault().getBundle().getSymbolicName();
	boolean automaticOO = service.getBoolean(qualifier, IPreferenceConstants.AUTOMATIC_OO, false, null);
	if (!automaticOO) {
		list.remove(new ConverterBean("MS Office Document to XLIFF Conveter", null));
	}
}
 
Example 9
Source File: CheckstyleUIPluginPrefs.java    From eclipse-cs with GNU Lesser General Public License v2.1 2 votes vote down vote up
/**
 * Returns a boolean preference for the given preference id.
 * 
 * @param prefId
 *          the preference id
 * @return the boolean result
 */
public static boolean getBoolean(String prefId) {

  IPreferencesService prefs = Platform.getPreferencesService();
  return prefs.getBoolean(CheckstyleUIPlugin.PLUGIN_ID, prefId, false, null);
}
 
Example 10
Source File: CheckstylePluginPrefs.java    From eclipse-cs with GNU Lesser General Public License v2.1 2 votes vote down vote up
/**
 * Returns a boolean preference for the given preference id.
 * 
 * @param prefId
 *          the preference id
 * @return the boolean result
 */
public static boolean getBoolean(String prefId) {

  IPreferencesService prefs = Platform.getPreferencesService();
  return prefs.getBoolean(CheckstylePlugin.PLUGIN_ID, prefId, false, null);
}