mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 17:35:35 +02:00
Made the DOM Indexer the default and put in better names for the indexers.
This commit is contained in:
parent
676745b0e6
commit
967a5b1d91
6 changed files with 41 additions and 43 deletions
|
@ -21,6 +21,8 @@ import org.eclipse.core.runtime.IPath;
|
||||||
|
|
||||||
public class DOMSourceIndexer extends SourceIndexer {
|
public class DOMSourceIndexer extends SourceIndexer {
|
||||||
|
|
||||||
|
public static String ID = CCorePlugin.PLUGIN_ID + ".domsourceindexer"; //$NON-NLS-1$
|
||||||
|
|
||||||
public DOMSourceIndexer() {
|
public DOMSourceIndexer() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,8 +69,3 @@ cxxHeaderName=C++ Header File
|
||||||
asmSourceName=Assembly Source File
|
asmSourceName=Assembly Source File
|
||||||
|
|
||||||
cdt_pathentry_var.description=CDT PathEntry Variable
|
cdt_pathentry_var.description=CDT PathEntry Variable
|
||||||
|
|
||||||
CDTIndexer.originalsourceindexer=Original C/C++ Indexer
|
|
||||||
CDTIndexer.domsourceindexer=DOM AST C/C++ Indexer
|
|
||||||
CDTIndexer.ctagsindexer=CTags Indexer
|
|
||||||
CDTIndexer.nullindexer=No Indexer
|
|
|
@ -550,16 +550,6 @@
|
||||||
<extension point="org.eclipse.core.runtime.preferences">
|
<extension point="org.eclipse.core.runtime.preferences">
|
||||||
<initializer class="org.eclipse.cdt.internal.core.CCorePreferenceInitializer"/>
|
<initializer class="org.eclipse.cdt.internal.core.CCorePreferenceInitializer"/>
|
||||||
</extension>
|
</extension>
|
||||||
<extension
|
|
||||||
name="%CDTIndexer.originalsourceindexer"
|
|
||||||
id="originalsourceindexer"
|
|
||||||
point="org.eclipse.cdt.core.CIndexer">
|
|
||||||
<cextension>
|
|
||||||
<run
|
|
||||||
class="org.eclipse.cdt.internal.core.index.sourceindexer.SourceIndexer">
|
|
||||||
</run>
|
|
||||||
</cextension>
|
|
||||||
</extension>
|
|
||||||
<extension
|
<extension
|
||||||
name="%CDTIndexer.domsourceindexer"
|
name="%CDTIndexer.domsourceindexer"
|
||||||
id="domsourceindexer"
|
id="domsourceindexer"
|
||||||
|
@ -570,18 +560,6 @@
|
||||||
</run>
|
</run>
|
||||||
</cextension>
|
</cextension>
|
||||||
</extension>
|
</extension>
|
||||||
|
|
||||||
<!-- =================================================================================== -->
|
|
||||||
<!-- Dynamic Variables -->
|
|
||||||
<!-- =================================================================================== -->
|
|
||||||
<extension
|
|
||||||
point="org.eclipse.core.variables.dynamicVariables">
|
|
||||||
<variable
|
|
||||||
name="cdt_pathentry_var"
|
|
||||||
resolver="org.eclipse.cdt.internal.core.PathEntryVariableResolver"
|
|
||||||
description="%cdt_pathentry_var.description">
|
|
||||||
</variable>
|
|
||||||
</extension>
|
|
||||||
<extension
|
<extension
|
||||||
id="ctagsindexer"
|
id="ctagsindexer"
|
||||||
name="%CDTIndexer.ctagsindexer"
|
name="%CDTIndexer.ctagsindexer"
|
||||||
|
@ -602,5 +580,27 @@
|
||||||
</run>
|
</run>
|
||||||
</cextension>
|
</cextension>
|
||||||
</extension>
|
</extension>
|
||||||
|
<extension
|
||||||
|
name="%CDTIndexer.originalsourceindexer"
|
||||||
|
id="originalsourceindexer"
|
||||||
|
point="org.eclipse.cdt.core.CIndexer">
|
||||||
|
<cextension>
|
||||||
|
<run
|
||||||
|
class="org.eclipse.cdt.internal.core.index.sourceindexer.SourceIndexer">
|
||||||
|
</run>
|
||||||
|
</cextension>
|
||||||
|
</extension>
|
||||||
|
<extension
|
||||||
|
point="org.eclipse.core.variables.dynamicVariables">
|
||||||
|
<variable
|
||||||
|
name="cdt_pathentry_var"
|
||||||
|
resolver="org.eclipse.cdt.internal.core.PathEntryVariableResolver"
|
||||||
|
description="%cdt_pathentry_var.description">
|
||||||
|
</variable>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<!-- =================================================================================== -->
|
||||||
|
<!-- Dynamic Variables -->
|
||||||
|
<!-- =================================================================================== -->
|
||||||
|
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
|
@ -318,6 +318,6 @@ indexerPrefName=Indexer
|
||||||
|
|
||||||
# indexer names
|
# indexer names
|
||||||
CDTIndexer.originalsourceindexer=Original C/C++ Indexer
|
CDTIndexer.originalsourceindexer=Original C/C++ Indexer
|
||||||
CDTIndexer.domsourceindexer=DOM AST C/C++ Indexer
|
CDTIndexer.domsourceindexer=Full C/C++ Indexer (declarations and cross references)
|
||||||
CDTIndexer.ctagsindexer=CTags Indexer
|
CDTIndexer.ctagsindexer=CTags Indexer (declarations only)
|
||||||
CDTIndexer.nullindexer=No Indexer
|
CDTIndexer.nullindexer=No Indexer (search-based features will not work correctly)
|
||||||
|
|
|
@ -1339,22 +1339,16 @@
|
||||||
</extension>
|
</extension>
|
||||||
<extension
|
<extension
|
||||||
point="org.eclipse.cdt.ui.IndexerPage">
|
point="org.eclipse.cdt.ui.IndexerPage">
|
||||||
<indexerUI
|
|
||||||
class="org.eclipse.cdt.ui.dialogs.SourceIndexerBlock"
|
|
||||||
indexerID="org.eclipse.cdt.core.originalsourceindexer"
|
|
||||||
name="%CDTIndexer.originalsourceindexer"
|
|
||||||
id="org.eclipse.cdt.ui.originalSourceIndexerUI"/>
|
|
||||||
<indexerUI
|
<indexerUI
|
||||||
class="org.eclipse.cdt.ui.dialogs.NullIndexerBlock"
|
class="org.eclipse.cdt.ui.dialogs.NullIndexerBlock"
|
||||||
indexerID="org.eclipse.cdt.core.nullindexer"
|
indexerID="org.eclipse.cdt.core.nullindexer"
|
||||||
name="%CDTIndexer.nullindexer"
|
name="%CDTIndexer.nullindexer"
|
||||||
id="org.eclipse.cdt.ui.nullindexerUI"/>
|
id="org.eclipse.cdt.ui.nullindexerUI"/>
|
||||||
<!--TODO reverse this <indexerUI
|
<indexerUI
|
||||||
class="org.eclipse.cdt.ui.dialogs.NullIndexerBlock"
|
class="org.eclipse.cdt.ui.dialogs.SourceIndexerBlock"
|
||||||
id="org.eclipse.cdt.ui.DOMASTSourceIndexerUI"
|
indexerID="org.eclipse.cdt.core.originalsourceindexer"
|
||||||
indexerID="org.eclipse.cdt.core.domsourceindexer"
|
name="%CDTIndexer.originalsourceindexer"
|
||||||
name="%CDTIndexer.domsourceindexer"/>
|
id="org.eclipse.cdt.ui.originalSourceIndexerUI"/>
|
||||||
-->
|
|
||||||
<indexerUI
|
<indexerUI
|
||||||
class="org.eclipse.cdt.ui.dialogs.SourceIndexerBlock"
|
class="org.eclipse.cdt.ui.dialogs.SourceIndexerBlock"
|
||||||
id="org.eclipse.cdt.ui.DOMASTSourceIndexerUI"
|
id="org.eclipse.cdt.ui.DOMASTSourceIndexerUI"
|
||||||
|
@ -1365,6 +1359,12 @@
|
||||||
indexerID="org.eclipse.cdt.core.ctagsindexer"
|
indexerID="org.eclipse.cdt.core.ctagsindexer"
|
||||||
name="%CDTIndexer.ctagsindexer"
|
name="%CDTIndexer.ctagsindexer"
|
||||||
id="org.eclipse.cdt.ui.ctagsIndexerUI"/>
|
id="org.eclipse.cdt.ui.ctagsIndexerUI"/>
|
||||||
|
<!--TODO reverse this <indexerUI
|
||||||
|
class="org.eclipse.cdt.ui.dialogs.NullIndexerBlock"
|
||||||
|
id="org.eclipse.cdt.ui.DOMASTSourceIndexerUI"
|
||||||
|
indexerID="org.eclipse.cdt.core.domsourceindexer"
|
||||||
|
name="%CDTIndexer.domsourceindexer"/>
|
||||||
|
-->
|
||||||
</extension>
|
</extension>
|
||||||
<extension
|
<extension
|
||||||
point="org.eclipse.cdt.ui.completionContributors">
|
point="org.eclipse.cdt.ui.completionContributors">
|
||||||
|
|
|
@ -18,6 +18,7 @@ import java.util.List;
|
||||||
import org.eclipse.cdt.core.CCorePlugin;
|
import org.eclipse.cdt.core.CCorePlugin;
|
||||||
import org.eclipse.cdt.core.ICDescriptor;
|
import org.eclipse.cdt.core.ICDescriptor;
|
||||||
import org.eclipse.cdt.core.ICDescriptorOperation;
|
import org.eclipse.cdt.core.ICDescriptorOperation;
|
||||||
|
import org.eclipse.cdt.internal.core.index.domsourceindexer.DOMSourceIndexer;
|
||||||
import org.eclipse.cdt.internal.ui.CUIMessages;
|
import org.eclipse.cdt.internal.ui.CUIMessages;
|
||||||
import org.eclipse.cdt.ui.CUIPlugin;
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.cdt.ui.index.AbstractIndexerPage;
|
import org.eclipse.cdt.ui.index.AbstractIndexerPage;
|
||||||
|
@ -229,7 +230,7 @@ public class IndexerBlock extends AbstractCOptionPage {
|
||||||
String indexerId=prefStore.getString(CCorePlugin.PREF_INDEXER);
|
String indexerId=prefStore.getString(CCorePlugin.PREF_INDEXER);
|
||||||
String preferredIndexer=null;
|
String preferredIndexer=null;
|
||||||
if (indexerId.equals("")) { //$NON-NLS-1$
|
if (indexerId.equals("")) { //$NON-NLS-1$
|
||||||
preferredIndexer=getIndexerPageName("org.eclipse.cdt.core.nullindexer"); //$NON-NLS-1$
|
preferredIndexer=getIndexerPageName(DOMSourceIndexer.ID);
|
||||||
} else {
|
} else {
|
||||||
preferredIndexer=getIndexerPageName(indexerId);
|
preferredIndexer=getIndexerPageName(indexerId);
|
||||||
}
|
}
|
||||||
|
@ -237,7 +238,7 @@ public class IndexerBlock extends AbstractCOptionPage {
|
||||||
String[] indexerList = indexersComboBox.getItems();
|
String[] indexerList = indexersComboBox.getItems();
|
||||||
int selectedIndex = 0;
|
int selectedIndex = 0;
|
||||||
for (int i=0; i<indexerList.length; i++){
|
for (int i=0; i<indexerList.length; i++){
|
||||||
if (indexerList[i].equals(preferredIndexer)) //$NON-NLS-1$
|
if (indexerList[i].equals(preferredIndexer))
|
||||||
selectedIndex = i;
|
selectedIndex = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue