From b208d1adfd009f975fdc7ec10bac8e404d5f96ba Mon Sep 17 00:00:00 2001 From: John Camelon Date: Tue, 31 May 2005 18:55:35 +0000 Subject: [PATCH] Patch for Devin Steffler. This patch gets rid of the work around added to CoreModel with the last patch. It was required in order to get C(PP)SelectionTests*Indexer working but the better way to do this is to create a scanner config for the projects for those tests. This patch also improves the speeds of CSelectionTestsCTagsIndexer and CPPSelectionTestsCTagsIndexer by adding CTagsIndexer#notifyListeners(IndexDelta) to Index.java. --- .../core/index/cindexstorage/Index.java | 4 ++++ .../org/eclipse/cdt/core/model/CoreModel.java | 2 +- core/org.eclipse.cdt.ui.tests/plugin.xml | 1 + .../CPPSelectionTestsCTagsIndexer.java | 14 ++++++++++++-- .../CPPSelectionTestsDOMIndexer.java | 14 ++++++++++++-- .../CSelectionTestsCTagsIndexer.java | 17 +++++++++++++---- .../CSelectionTestsDOMIndexer.java | 14 +++++++++++--- 7 files changed, 54 insertions(+), 12 deletions(-) diff --git a/core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/index/cindexstorage/Index.java b/core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/index/cindexstorage/Index.java index 94b992a58c1..d0783ab2b4c 100644 --- a/core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/index/cindexstorage/Index.java +++ b/core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/index/cindexstorage/Index.java @@ -32,6 +32,7 @@ import org.eclipse.cdt.internal.core.index.cindexstorage.io.IndexInput; import org.eclipse.cdt.internal.core.index.cindexstorage.io.IndexOutput; import org.eclipse.cdt.internal.core.index.cindexstorage.io.MergeFactory; import org.eclipse.cdt.internal.core.index.cindexstorage.io.SimpleIndexInput; +import org.eclipse.cdt.internal.core.index.ctagsindexer.CTagsIndexer; import org.eclipse.cdt.internal.core.index.impl.IndexDelta; import org.eclipse.cdt.internal.core.index.impl.Int; import org.eclipse.cdt.internal.core.index.sourceindexer.SourceIndexer; @@ -315,6 +316,9 @@ public class Index implements IIndex, ICIndexStorageConstants, ICSearchConstants if (indexer instanceof SourceIndexer){ IndexDelta indexDelta = new IndexDelta(null,null,IIndexDelta.MERGE_DELTA); ((SourceIndexer) indexer).notifyListeners(indexDelta); + } else if (indexer instanceof CTagsIndexer) { + IndexDelta indexDelta = new IndexDelta(null,null,IIndexDelta.MERGE_DELTA); + ((CTagsIndexer) indexer).notifyListeners(indexDelta); } } } diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CoreModel.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CoreModel.java index d238669eef0..598e8941f9b 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CoreModel.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CoreModel.java @@ -1098,7 +1098,7 @@ public class CoreModel { public static boolean isScannerInformationEmpty(IResource resource) { final int PATH_ENTRY_MASK = IPathEntry.CDT_INCLUDE | IPathEntry.CDT_MACRO | - IPathEntry.CDT_INCLUDE_FILE | IPathEntry.CDT_MACRO_FILE | IPathEntry.CDT_SOURCE; + IPathEntry.CDT_INCLUDE_FILE | IPathEntry.CDT_MACRO_FILE; boolean rc = true; IPath resPath = resource.getFullPath(); IProject project = resource.getProject(); diff --git a/core/org.eclipse.cdt.ui.tests/plugin.xml b/core/org.eclipse.cdt.ui.tests/plugin.xml index 83c621813b6..af580df3816 100644 --- a/core/org.eclipse.cdt.ui.tests/plugin.xml +++ b/core/org.eclipse.cdt.ui.tests/plugin.xml @@ -30,6 +30,7 @@ +