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$ }
private String getProcessPreference(String key, String pid) { String result = Platform.getPreferencesService().getString (IntroPlugin.PLUGIN_ID, pid + '_' + key, "", null); //$NON-NLS-1$ if (result.length() == 0) { result = Platform.getPreferencesService().getString (IntroPlugin.PLUGIN_ID, key, "", null); //$NON-NLS-1$ } return result; } }
private String getString(IScopeContext[] contexts, String optionName) { if(contexts == null) { return null; } IPreferencesService service = Platform.getPreferencesService(); return service.getString(MavenJdtAptPlugin.PLUGIN_ID, optionName, null, contexts); }
/** * @return the default API baseline saved in the preferences, or * <code>null</code> if there isn't one */ private String getDefaultProfilePref() { IPreferencesService service = Platform.getPreferencesService(); return service.getString(ApiPlugin.PLUGIN_ID, DEFAULT_BASELINE, null, new IScopeContext[] { InstanceScope.INSTANCE }); }
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 (); } }
public CriteriaManager() { criteriaEnabled = Platform.getPreferencesService().getBoolean(HelpPlugin.PLUGIN_ID, ENABLE_CRITERIA, false, null); supportedCriteria = new ArrayList<>(); StringTokenizer criteria = new StringTokenizer(Platform.getPreferencesService().getString(HelpPlugin.PLUGIN_ID, SUPPORTED_CRITERIA, "", null), ",;"); //$NON-NLS-1$ //$NON-NLS-2$ while (criteria.hasMoreTokens()) { supportedCriteria.add(criteria.nextToken().toLowerCase().trim()); } allCriteriaValues = new HashMap<>(); if (criteriaDefinitionManager == null){ criteriaDefinitionManager = new CriteriaDefinitionManager(); } }
public static String getMethodsOrder(){ IPreferencesService service = Platform.getPreferencesService(); return service.getString(JSchCorePlugin.ID, IConstants.PREF_PREFERRED_AUTHENTICATION_METHODS_ORDER, getDefaultAuthMethods(), null); }
/** * 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); }
public static String getEnabledPreferredMACMethods(){ IPreferencesService service = Platform.getPreferencesService(); return service.getString(JSchCorePlugin.ID, IConstants.PREF_PREFERRED_MAC_METHODS, getDefaultMACMethods(), null); }
protected HashSet<String> getDisabledModules() { IScopeContext[] scopes = {ConfigurationScope.INSTANCE, DefaultScope.INSTANCE}; IPreferencesService preferencesService = Platform.getPreferencesService(); String defaultPreferenceValue = ""; //$NON-NLS-1$ String tmp = preferencesService.getString(PREFERENCES_PLUGIN, IStorageConstants.DISABLED_PROVIDERS_KEY, defaultPreferenceValue, scopes); HashSet<String> disabledModules = splitModuleIds(tmp); return disabledModules; }
public static String getKEXMethodsOrder(){ IPreferencesService service = Platform.getPreferencesService(); return service.getString(JSchCorePlugin.ID, IConstants.PREF_PREFERRED_KEYEXCHANGE_METHODS_ORDER, getDefaultKEXMethods(), null); }
/** * Returns the string preference for the given preference id * @param project to use as a project specific settings scope, or null * @param flagId the id of the preference to retrieve * @return preference value or an empty string, never <code>null</code> */ public static String getString(IProject project, String flagId) { IPreferencesService service = Platform.getPreferencesService(); IScopeContext[] contexts = project == null ? null : new IScopeContext[] {new ProjectScope(project)}; return service.getString(PDE.PLUGIN_ID, flagId, "", project == null ? null : contexts); //$NON-NLS-1$ }
public static String getEnabledPreferredAuthMethods(){ IPreferencesService service = Platform.getPreferencesService(); return service.getString(JSchCorePlugin.ID, IConstants.PREF_PREFERRED_AUTHENTICATION_METHODS, getDefaultAuthMethods(), null); }
/** * @since 2.3 */ public static String getLineDelimiter(String workspacePath) { return Platform.getPreferencesService().getString (Platform.PI_RUNTIME, Platform.PREF_LINE_SEPARATOR, System.getProperty(Platform.PREF_LINE_SEPARATOR), new IScopeContext[] { new ProjectScope(ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(workspacePath)).getProject()), new InstanceScope() }); }
@SuppressWarnings("deprecation") private static String convertLineDelimiters(IFile file, String text) { IProject project = file.getProject(); String lineDelimiter = Platform.getPreferencesService().getString (Platform.PI_RUNTIME, Platform.PREF_LINE_SEPARATOR, System.getProperty(Platform.PREF_LINE_SEPARATOR), new IScopeContext[] { new ProjectScope(project), new InstanceScope() }); return text.replaceAll("\r?\n", lineDelimiter); }
/** * 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); }
/** * 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[] { InstanceScope.INSTANCE }; 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() == null ? null : DebugOptionsHandler.getDebugOptions().getFile().getAbsolutePath(), lookupOrder); }