Java Code Examples for org.eclipse.core.runtime.Platform#getDebugOption()
The following examples show how to use
org.eclipse.core.runtime.Platform#getDebugOption() .
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: FindbugsPlugin.java From spotbugs with GNU Lesser General Public License v2.1 | 5 votes |
public void configurePluginDebugOptions() { if (isDebugging()) { // debugging for the plugin itself String option = Platform.getDebugOption(PLUGIN_DEBUG); FindbugsPlugin.DEBUG = Boolean.valueOf(option).booleanValue(); // debugging for the builder and friends option = Platform.getDebugOption(BUILDER_DEBUG); FindBugsBuilder.DEBUG = Boolean.valueOf(option).booleanValue(); FindBugsWorker.DEBUG = FindBugsBuilder.DEBUG; // debugging for the nature option = Platform.getDebugOption(NATURE_DEBUG); FindBugsNature.DEBUG = Boolean.valueOf(option).booleanValue(); // debugging for the reporter option = Platform.getDebugOption(REPORTER_DEBUG); Reporter.DEBUG = Boolean.valueOf(option).booleanValue(); // debugging for the content provider option = Platform.getDebugOption(CONTENT_DEBUG); BugContentProvider.DEBUG = Boolean.valueOf(option).booleanValue(); option = Platform.getDebugOption(PROFILER_DEBUG); if (Boolean.valueOf(option).booleanValue()) { System.setProperty("profiler.report", "true"); } } }
Example 2
Source File: TmfCoreTracer.java From tracecompass with Eclipse Public License 2.0 | 4 votes |
/** * Set the tracing flags according to the launch configuration */ public static synchronized void init() { String traceKey; boolean isTracing = false; traceKey = Platform.getDebugOption(COMPONENT_TRACE_KEY); if (traceKey != null) { fComponentClassEnabled = Boolean.parseBoolean(traceKey); isTracing |= fComponentClassEnabled; } traceKey = Platform.getDebugOption(REQUEST_TRACE_KEY); if (traceKey != null) { fRequestClassEnabled = Boolean.parseBoolean(traceKey); isTracing |= fRequestClassEnabled; } traceKey = Platform.getDebugOption(SIGNAL_TRACE_KEY); if (traceKey != null) { fSignalClassEnabled = Boolean.parseBoolean(traceKey); isTracing |= fSignalClassEnabled; } traceKey = Platform.getDebugOption(EVENT_TRACE_KEY); if (traceKey != null) { fEventClassEnabled = Boolean.parseBoolean(traceKey); isTracing |= fEventClassEnabled; } traceKey = Platform.getDebugOption(ANALYSIS_TRACE_KEY); if (traceKey != null) { fAnalysisClassEnabled = Boolean.parseBoolean(traceKey); isTracing |= fAnalysisClassEnabled; } traceKey = Platform.getDebugOption(INDEXER_TRACE_KEY); if (traceKey != null) { fIndexerClassEnabled = Boolean.parseBoolean(traceKey); isTracing |= fIndexerClassEnabled; } // Create trace log file if any of the flags was set if (isTracing) { try { fTraceFile = new BufferedWriter(new FileWriter(TRACE_FILE_NAME)); } catch (IOException e) { Activator.logError("Error opening log file " + TRACE_FILE_NAME, e); fTraceFile = null; } } }
Example 3
Source File: TmfUiTracer.java From tracecompass with Eclipse Public License 2.0 | 4 votes |
/** * Initialize tracing */ public static void init() { String traceKey; boolean isTracing = false; traceKey = Platform.getDebugOption(pluginID + "/error"); if (traceKey != null) { fError = Boolean.parseBoolean(traceKey); isTracing |= fError; } traceKey = Platform.getDebugOption(pluginID + "/warning"); if (traceKey != null) { fWarning = Boolean.parseBoolean(traceKey); isTracing |= fWarning; } traceKey = Platform.getDebugOption(pluginID + "/info"); if (traceKey != null) { fInfo = Boolean.parseBoolean(traceKey); isTracing |= fInfo; } traceKey = Platform.getDebugOption(pluginID + "/updateindex"); if (traceKey != null) { fIndex = Boolean.parseBoolean(traceKey); isTracing |= fIndex; } traceKey = Platform.getDebugOption(pluginID + "/display"); if (traceKey != null) { fDisplay = Boolean.parseBoolean(traceKey); isTracing |= fDisplay; } traceKey = Platform.getDebugOption(pluginID + "/sorting"); if (traceKey != null) { fSorting = Boolean.parseBoolean(traceKey); isTracing |= fSorting; } // Create trace log file if needed if (isTracing) { fTraceLog = openLogFile(LOGNAME); } }
Example 4
Source File: LTTngControlServiceMI.java From tracecompass with Eclipse Public License 2.0 | 4 votes |
private static boolean isSchemaValidationEnabled() { String schemaValidationKey = Platform.getDebugOption(MI_SCHEMA_VALIDATION_KEY); String systemProperty = System.getProperty(MI_SCHEMA_VALIDATION_KEY); return schemaValidationKey != null && Boolean.parseBoolean(schemaValidationKey) || systemProperty != null && Boolean.parseBoolean(systemProperty); }
Example 5
Source File: TMEclipseRegistryPlugin.java From tm4e with Eclipse Public License 1.0 | 2 votes |
/** * Returns true if the debug option is enabled and false otherwise. * * @param option * the option name * @return true if the debug option is enabled and false otherwise. */ public static boolean isDebugOptionEnabled(String option) { String enabled = Platform.getDebugOption(option); return enabled != null && new Boolean(enabled).booleanValue(); }
Example 6
Source File: EclipsePlatform.java From birt with Eclipse Public License 1.0 | 2 votes |
/** * get debug options. * * call Eclipse's getDebugeOption directly. * * @param option * option name * @return option value */ public String getDebugOption( String option ) { return Platform.getDebugOption( option ); }