/** * 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); }
/** * 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$ }
/** * 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[] {new InstanceScope()}; 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 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); }
/** * 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); }