diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/IPDOMIndexerTask.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/IPDOMIndexerTask.java index dae6d7e7db1..2304a20549f 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/IPDOMIndexerTask.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/IPDOMIndexerTask.java @@ -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. * diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/PDOMIndexerTask.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/PDOMIndexerTask.java index c56edbcc7fb..6f79c03fd0d 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/PDOMIndexerTask.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/PDOMIndexerTask.java @@ -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,