diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOMManager.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOMManager.java index 3476b527b6b..5273ca41a38 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOMManager.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOMManager.java @@ -154,7 +154,7 @@ public class PDOMManager implements IPDOMManager, IElementChangedListener { public String getDefaultIndexerId() { IPreferencesService prefService = Platform.getPreferencesService(); return prefService.getString(CCorePlugin.PLUGIN_ID, INDEXER_ID_KEY, - PDOMNullIndexer.ID, null); + CCorePlugin.DEFAULT_INDEXER, null); } public void setDefaultIndexerId(String indexerId) { diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CCorePlugin.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CCorePlugin.java index f373e9e8037..7f725a4ac6c 100644 --- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CCorePlugin.java +++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CCorePlugin.java @@ -43,6 +43,7 @@ import org.eclipse.cdt.internal.core.model.DeltaProcessor; import org.eclipse.cdt.internal.core.model.IBufferFactory; import org.eclipse.cdt.internal.core.model.Util; import org.eclipse.cdt.internal.core.pdom.PDOMManager; +import org.eclipse.cdt.internal.core.pdom.indexer.fast.PDOMFastIndexer; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProjectDescription; import org.eclipse.core.resources.IResource; @@ -83,7 +84,8 @@ public class CCorePlugin extends Plugin { public static final String INDEXER_SIMPLE_ID = "CIndexer"; //$NON-NLS-1$ public static final String INDEXER_UNIQ_ID = PLUGIN_ID + "." + INDEXER_SIMPLE_ID; //$NON-NLS-1$ - public final static String PREF_INDEXER = "indexer"; //$NON-NLS-1$ + public static final String PREF_INDEXER = "indexer"; //$NON-NLS-1$ + public static final String DEFAULT_INDEXER = PDOMFastIndexer.ID; public final static String ERROR_PARSER_SIMPLE_ID = "ErrorParser"; //$NON-NLS-1$ diff --git a/core/org.eclipse.cdt.ui/plugin.properties b/core/org.eclipse.cdt.ui/plugin.properties index 868918277de..d67fb7af42d 100644 --- a/core/org.eclipse.cdt.ui/plugin.properties +++ b/core/org.eclipse.cdt.ui/plugin.properties @@ -337,9 +337,9 @@ completionContributors=Content Assist Completion Contributor indexerPrefName=Indexer # indexer names -CDTIndexer.domsourceindexer=Full C/C++ Indexer (slow but accurate) -CDTIndexer.nullindexer=No Indexer (search-based features will not work correctly) -CDTIndexer.fastindexer=Fast C/C++ Indexer (faster but less accurate) +CDTIndexer.domsourceindexer=Full C/C++ Indexer (complete parse) +CDTIndexer.nullindexer=No Indexer (search based features will not work correctly) +CDTIndexer.fastindexer=Fast C/C++ Indexer (recommended) IndexView.name=C/C++ Index RebuildIndex.name=Rebuild Index diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/IndexerBlock.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/IndexerBlock.java index ba79806ed84..008e47facc5 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/IndexerBlock.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/IndexerBlock.java @@ -15,16 +15,6 @@ import java.util.HashMap; import java.util.Iterator; import java.util.List; -import org.eclipse.cdt.core.CCorePlugin; -import org.eclipse.cdt.core.dom.IPDOMManager; -import org.eclipse.cdt.core.model.CoreModel; -import org.eclipse.cdt.core.model.ICProject; -import org.eclipse.cdt.internal.core.pdom.indexer.nulli.PDOMNullIndexer; -import org.eclipse.cdt.internal.ui.CUIMessages; -import org.eclipse.cdt.ui.CUIPlugin; -import org.eclipse.cdt.ui.index.AbstractIndexerPage; -import org.eclipse.cdt.utils.ui.controls.ControlFactory; -import org.eclipse.cdt.utils.ui.controls.TabFolderLayout; import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IConfigurationElement; @@ -42,6 +32,17 @@ import org.eclipse.swt.widgets.Combo; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Group; +import org.eclipse.cdt.core.CCorePlugin; +import org.eclipse.cdt.core.dom.IPDOMManager; +import org.eclipse.cdt.core.model.CoreModel; +import org.eclipse.cdt.core.model.ICProject; +import org.eclipse.cdt.ui.CUIPlugin; +import org.eclipse.cdt.ui.index.AbstractIndexerPage; +import org.eclipse.cdt.utils.ui.controls.ControlFactory; +import org.eclipse.cdt.utils.ui.controls.TabFolderLayout; + +import org.eclipse.cdt.internal.ui.CUIMessages; + /** * @author Bogdan Gheorghe */ @@ -401,8 +402,8 @@ public class IndexerBlock extends AbstractCOptionPage { initialSelected = indexerID; if (selectedIndexerId == null){ - CCorePlugin.getDefault().getPluginPreferences().setValue(CCorePlugin.PREF_INDEXER, PDOMNullIndexer.ID); - selectedIndexerId = PDOMNullIndexer.ID; + CCorePlugin.getDefault().getPluginPreferences().setValue(CCorePlugin.PREF_INDEXER, CCorePlugin.DEFAULT_INDEXER); + selectedIndexerId = CCorePlugin.DEFAULT_INDEXER; } //Set the appropriate indexer in the combo box