public static String getDefaultLineDelimiter() { return Platform.getPreferencesService().getString(Platform.PI_RUNTIME, Platform.PREF_LINE_SEPARATOR, null, null); } }
protected String getLineSeparatorPreference(IScopeContext scopeContext) { String lineDelimiter = Platform.getPreferencesService().getString(Platform.PI_RUNTIME, Platform.PREF_LINE_SEPARATOR, null, new IScopeContext[] { scopeContext }); return lineDelimiter; } }
public static String getSelectedSSHAgent(){ IPreferencesService service = Platform.getPreferencesService(); return service.getString(JSchCorePlugin.ID, IConstants.PREF_PREFERRED_SSHAGENT, "", null); //$NON-NLS-1$ }
public static boolean isEnabled() { IPreferencesService preferenceService = Platform.getPreferencesService(); if (preferenceService == null) { return true; } return preferenceService.getBoolean(JavaCore.PLUGIN_ID, ENABLE_NEW_JAVA_INDEX, ENABLE_NEW_JAVA_INDEX_DEFAULT, null); }
/** * Amount of time (milliseconds) unreferenced files are allowed to sit in the index before they are discarded. * Making this too short will cause some operations (classpath modifications, closing/reopening projects, etc.) * to become more expensive. Making this too long will waste space in the database. * <p> * The value of this is stored in the JDT core preference called "garbageCleanupTimeoutMs". The default value * is 3 days. */ private static long getGarbageCleanupTimeout() { return Platform.getPreferencesService().getLong(JavaCore.PLUGIN_ID, "garbageCleanupTimeoutMs", //$NON-NLS-1$ 1000 * 60 * 60 * 24 * 3, null); }
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 (); } }
boolean isUseProxy(){ IPreferencesService ps=Platform.getPreferencesService(); String value=ps.get(IConstants.PREF_USE_PROXY, "false", getProxyPreferenceStore()); //$NON-NLS-1$ return value==null ? false : !value.equals("false"); //$NON-NLS-1$ }
public TextSearchVisitor(TextSearchRequestor collector, Pattern searchPattern) { fCollector= collector; fStatus = new MultiStatus(IConstants.PLUGIN_ID, IStatus.OK, "Problems encountered during text search.", null); fSearchPattern= searchPattern; fIsLightweightAutoRefresh= Platform.getPreferencesService().getBoolean(ResourcesPlugin.PI_RESOURCES, ResourcesPlugin.PREF_LIGHTWEIGHT_AUTO_REFRESH, false, null); }
public static String getMethodsOrder(){ IPreferencesService service = Platform.getPreferencesService(); return service.getString(JSchCorePlugin.ID, IConstants.PREF_PREFERRED_AUTHENTICATION_METHODS_ORDER, getDefaultAuthMethods(), null); }
/** * Is tracing enabled in the preferences store * * @return <code>true</code> if tracing is enabled in the preferences; Otherwise, <code>false</code> is returned. */ public static boolean isTracingEnabled() { final IScopeContext[] lookupOrder = new IScopeContext[] { InstanceScope.INSTANCE }; IPreferencesService prefService = Platform.getPreferencesService(); prefService.setDefaultLookupOrder(TracingConstants.BUNDLE_ID, null, new String[] {InstanceScope.SCOPE}); return prefService.getBoolean(TracingConstants.BUNDLE_ID, TracingConstants.PREFERENCE_ENABLEMENT_IDENTIFIER, false, lookupOrder); }
/** * Accessor for the output to standard output stream selection in the preference store * * @return The output to standard output stream selection in the preference store or the default value if it's not defined. */ public static String getOutputToStandardStream() { final IScopeContext[] lookupOrder = new IScopeContext[] { InstanceScope.INSTANCE }; IPreferencesService prefService = Platform.getPreferencesService(); prefService.setDefaultLookupOrder(TracingConstants.BUNDLE_ID, null, new String[] {InstanceScope.SCOPE}); return prefService.getString(TracingConstants.BUNDLE_ID, TracingConstants.PREFERENCE_OUTPUT_STANDARD_STREAM, "false", lookupOrder); //$NON-NLS-1$ }
public static String getEnabledPreferredKEXMethods(){ IPreferencesService service = Platform.getPreferencesService(); return service.getString(JSchCorePlugin.ID, IConstants.PREF_PREFERRED_KEYEXCHANGE_METHODS, getDefaultKEXMethods(), null); }
/** * 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); }
private String getDefaultValue() { String value = null; if (project != null) { value = getStoredValue(getPreferences(null)); } if (value == null) { value = getStoredValue(Platform.getPreferencesService().getRootNode().node(DefaultScope.SCOPE)); } return value != null ? value : System.getProperty(Platform.PREF_LINE_SEPARATOR); }
/** * Accessor for the file path in the preference store * * @return The file path in the preference store or the default value if it's not defined. */ public static String getFilePath() { final IScopeContext[] lookupOrder = new IScopeContext[] {new InstanceScope()}; IPreferencesService prefService = Platform.getPreferencesService(); prefService.setDefaultLookupOrder(TracingConstants.BUNDLE_ID, null, new String[] {InstanceScope.SCOPE}); return prefService.getString(TracingConstants.BUNDLE_ID, TracingConstants.PREFERENCE_FILE_PATH, DebugOptionsHandler.getDebugOptions().getFile().getAbsolutePath(), lookupOrder); }
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(); }
@Override protected void handleEditorInputChanged() { final IDocumentProvider provider= getDocumentProvider(); IEditorInput input= getEditorInput(); if (provider != null && input != null) { if (!isDirty() && input.getAdapter(IFile.class) != null) { if (Platform.getPreferencesService().getBoolean(ResourcesPlugin.PI_RESOURCES, ResourcesPlugin.PREF_LIGHTWEIGHT_AUTO_REFRESH, false, null)) return; } } super.handleEditorInputChanged(); }
public static void setEnabledPreferredAuthMethods(String methods, String order){ IPreferencesService service=Platform.getPreferencesService(); service.getRootNode().node(InstanceScope.SCOPE).node(JSchCorePlugin.ID).put( IConstants.PREF_PREFERRED_AUTHENTICATION_METHODS, methods); service.getRootNode().node(InstanceScope.SCOPE).node(JSchCorePlugin.ID).put( IConstants.PREF_PREFERRED_AUTHENTICATION_METHODS_ORDER, order);}
public static void setEnabledPreferredMACMethods(String methods, String order){ IPreferencesService service=Platform.getPreferencesService(); service.getRootNode().node(InstanceScope.SCOPE).node(JSchCorePlugin.ID).put( IConstants.PREF_PREFERRED_MAC_METHODS, methods); service.getRootNode().node(InstanceScope.SCOPE).node(JSchCorePlugin.ID).put( IConstants.PREF_PREFERRED_MAC_METHODS_ORDER, order); } }