public static final int getScalePercentage() { int scale = Platform.getPreferencesService().getInt(IntroPlugin.PLUGIN_ID, (SCALE_FACTOR), 0, null); return scale; }
public static int getMarkerSeverity() { return Platform.getPreferencesService().getInt(SonarLintCorePlugin.UI_PLUGIN_ID, PREF_MARKER_SEVERITY, PREF_MARKER_SEVERITY_DEFAULT, null); }
@Override public void load() { setStringValue(Integer.toString(Platform.getPreferencesService().getInt(node, key, defaultvalue, null))); }
/** * Accessor for the maximum file size in the preference store * * @return The maximum file size in the preference store or the value 1000 if it's not defined. */ public static int getMaxFileSize() { final IScopeContext[] lookupOrder = new IScopeContext[] { InstanceScope.INSTANCE }; IPreferencesService prefService = Platform.getPreferencesService(); prefService.setDefaultLookupOrder(TracingConstants.BUNDLE_ID, null, new String[] {InstanceScope.SCOPE}); return prefService.getInt(TracingConstants.BUNDLE_ID, TracingConstants.PREFERENCE_MAX_FILE_SIZE_IDENTIFIER, 1000, lookupOrder); }
/** * Accessor for the maximum file count in the preference store * * @return The maximum file count in the preference store or the value 10 if it's not defined. */ public static int getMaxFileCount() { final IScopeContext[] lookupOrder = new IScopeContext[] { InstanceScope.INSTANCE }; IPreferencesService prefService = Platform.getPreferencesService(); prefService.setDefaultLookupOrder(TracingConstants.BUNDLE_ID, null, new String[] {InstanceScope.SCOPE}); return prefService.getInt(TracingConstants.BUNDLE_ID, TracingConstants.PREFERENCE_MAX_FILE_COUNT_IDENTIFIER, 10, lookupOrder); }
/** * Allows arguments to be specified * @param map argument map * @param portNumber the port number */ protected void specifyArguments(Map<String, Connector.Argument> map, int portNumber) { // XXX: Revisit - allows us to put a quote (") around the classpath Connector.IntegerArgument port= (Connector.IntegerArgument) map.get("port"); //$NON-NLS-1$ port.setValue(portNumber); Connector.IntegerArgument timeoutArg= (Connector.IntegerArgument) map.get("timeout"); //$NON-NLS-1$ if (timeoutArg != null) { int timeout = Platform.getPreferencesService().getInt( LaunchingPlugin.ID_PLUGIN, JavaRuntime.PREF_CONNECT_TIMEOUT, JavaRuntime.DEF_CONNECT_TIMEOUT, null); timeoutArg.setValue(timeout); } }
/** * Allows arguments to be specified * @param map argument map * @param portNumber the port number */ protected void specifyArguments(Map<String, Connector.Argument> map, int portNumber) { // XXX: Revisit - allows us to put a quote (") around the classpath Connector.IntegerArgument port= (Connector.IntegerArgument) map.get("port"); //$NON-NLS-1$ port.setValue(portNumber); Connector.IntegerArgument timeoutArg= (Connector.IntegerArgument) map.get("timeout"); //$NON-NLS-1$ if (timeoutArg != null) { int timeout = Platform.getPreferencesService().getInt( LaunchingPlugin.ID_PLUGIN, JavaRuntime.PREF_CONNECT_TIMEOUT, JavaRuntime.DEF_CONNECT_TIMEOUT, null); timeoutArg.setValue(timeout); } }
/** * Accessor for the maximum file count in the preference store * * @return The maximum file count in the preference store or the value 10 if it's not defined. */ public static int getMaxFileCount() { final IScopeContext[] lookupOrder = new IScopeContext[] {new InstanceScope()}; IPreferencesService prefService = Platform.getPreferencesService(); prefService.setDefaultLookupOrder(TracingConstants.BUNDLE_ID, null, new String[] {InstanceScope.SCOPE}); return prefService.getInt(TracingConstants.BUNDLE_ID, TracingConstants.PREFERENCE_MAX_FILE_COUNT_IDENTIFIER, 10, lookupOrder); }
/** * Accessor for the maximum file size in the preference store * * @return The maximum file size in the preference store or the value 1000 if it's not defined. */ public static int getMaxFileSize() { final IScopeContext[] lookupOrder = new IScopeContext[] {new InstanceScope()}; IPreferencesService prefService = Platform.getPreferencesService(); prefService.setDefaultLookupOrder(TracingConstants.BUNDLE_ID, null, new String[] {InstanceScope.SCOPE}); return prefService.getInt(TracingConstants.BUNDLE_ID, TracingConstants.PREFERENCE_MAX_FILE_SIZE_IDENTIFIER, 1000, lookupOrder); }
fTestRunSessions.addFirst(testRunSession); int maxCount = Platform.getPreferencesService().getInt(JUnitCorePlugin.CORE_PLUGIN_ID, JUnitPreferencesConstants.MAX_TEST_RUNS, 10, null); int size= fTestRunSessions.size(); if (size > maxCount) {
fTestRunSessions.addFirst(testRunSession); int maxCount = Platform.getPreferencesService().getInt(JUnitCorePlugin.CORE_PLUGIN_ID, JUnitPreferencesConstants.MAX_TEST_RUNS, 10, null); int size= fTestRunSessions.size(); if (size > maxCount) {
return (T) Boolean.valueOf(getPreferenceService().getBoolean(path, key, ((Boolean) defaultValue).booleanValue(),null)); } else if (type.equals(int.class)) { return (T) Integer.valueOf(getPreferenceService().getInt(path, key, ((Integer) defaultValue).intValue(), null)); } else if (type.equals(double.class)) { return (T) Double.valueOf(getPreferenceService().getDouble(path, key, ((Double) defaultValue).doubleValue(), null)); return (T) Boolean.valueOf(getPreferenceService().getBoolean(path, key, ((Boolean) defaultValue).booleanValue(), null)); } else if (Integer.class.equals(type)) { return (T) Integer.valueOf(getPreferenceService().getInt(path, key, ((Integer) defaultValue).intValue(), null)); } else if (Double.class.equals(type)) { return (T) Double.valueOf(getPreferenceService().getDouble(path, key, ((Double) defaultValue).doubleValue(), null));
int connectTimeout = Platform.getPreferencesService().getInt( LaunchingPlugin.ID_PLUGIN, JavaRuntime.PREF_CONNECT_TIMEOUT,
private void loadOrientation() { fViewOrientation = Platform.getPreferencesService().getInt(DebugUIPlugin.getUniqueIdentifier(), getOrientationPrefId(), HORIZONTAL_VIEW_ORIENTATION, null); for (int i = 0; i < fOrientationActions.length; i++) { if (fOrientationActions[i].getOrientation() == fViewOrientation) { fOrientationActions[i].run(); } } updateOrientationActions(); }
int connectTimeout = Platform.getPreferencesService().getInt( LaunchingPlugin.ID_PLUGIN, JavaRuntime.PREF_CONNECT_TIMEOUT,
try { int total = 0; int max = Platform.getPreferencesService().getInt( LaunchingPlugin.ID_PLUGIN, JavaRuntime.PREF_CONNECT_TIMEOUT,
try { int total = 0; int max = Platform.getPreferencesService().getInt( LaunchingPlugin.ID_PLUGIN, JavaRuntime.PREF_CONNECT_TIMEOUT,
return getPreferencesService().getBoolean(nodePath, key, false, null); else if (descriptorsClass.equals(int.class)) return getPreferencesService().getInt(nodePath, key, 0, null); else if (descriptorsClass.equals(double.class)) return getPreferencesService().getDouble(nodePath, key, 0.0d, null); return getPreferencesService().getBoolean(nodePath, key, false, null); else if (Integer.class.equals(descriptorsClass)) return getPreferencesService().getInt(nodePath, key, 0, null); else if (Double.class.equals(descriptorsClass)) return getPreferencesService().getDouble(nodePath, key, 0.0d, null);