mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-28 19:35:36 +02:00
allow trace to be activated by internal means
This commit is contained in:
parent
d9c7b670d1
commit
8f5f85122a
2 changed files with 11 additions and 6 deletions
|
@ -14,6 +14,7 @@
|
|||
*/
|
||||
package org.eclipse.cdt.core.dom;
|
||||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
|
||||
|
||||
|
@ -22,7 +23,10 @@ import org.eclipse.core.runtime.IProgressMonitor;
|
|||
*
|
||||
*/
|
||||
public interface IPDOMIndexerTask {
|
||||
|
||||
public static final String TRACE_ACTIVITY = CCorePlugin.PLUGIN_ID + "/debug/indexer/activity"; //$NON-NLS-1$
|
||||
public static final String TRACE_STATISTICS = CCorePlugin.PLUGIN_ID + "/debug/indexer/statistics"; //$NON-NLS-1$
|
||||
public static final String TRACE_PROBLEMS = CCorePlugin.PLUGIN_ID + "/debug/indexer/problems"; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Run the sub job progress to the main job.
|
||||
*
|
||||
|
|
|
@ -115,14 +115,15 @@ public abstract class PDOMIndexerTask implements IPDOMIndexerTask {
|
|||
private int fProblemBindingCount= 0;
|
||||
|
||||
protected PDOMIndexerTask() {
|
||||
fShowActivity= checkDebugOption("indexer/activity", "true"); //$NON-NLS-1$//$NON-NLS-2$
|
||||
fShowStatistics= checkDebugOption("indexer/statistics", "true"); //$NON-NLS-1$//$NON-NLS-2$
|
||||
fShowProblems= checkDebugOption("indexer/problems", "true"); //$NON-NLS-1$//$NON-NLS-2$
|
||||
fShowActivity= checkDebugOption(TRACE_ACTIVITY, "true"); //$NON-NLS-1$
|
||||
fShowStatistics= checkDebugOption(TRACE_STATISTICS, "true"); //$NON-NLS-1$
|
||||
fShowProblems= checkDebugOption(TRACE_PROBLEMS, "true"); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
private boolean checkDebugOption(String option, String value) {
|
||||
String trace = Platform.getDebugOption(CCorePlugin.PLUGIN_ID + "/debug/" + option); //$NON-NLS-1$
|
||||
return (trace != null && trace.equalsIgnoreCase(value));
|
||||
String trace= Platform.getDebugOption(option);
|
||||
boolean internallyActivated= Boolean.getBoolean(option);
|
||||
return internallyActivated || (trace != null && trace.equalsIgnoreCase(value));
|
||||
}
|
||||
|
||||
protected void processDelta(ICElementDelta delta, Collection added, Collection changed, Collection removed,
|
||||
|
|
Loading…
Add table
Reference in a new issue