diff --git a/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/internal/core/browser/cache/IndexerTypesJob2.java b/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/internal/core/browser/cache/IndexerTypesJob2.java index 7176f616177..99c47798be8 100644 --- a/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/internal/core/browser/cache/IndexerTypesJob2.java +++ b/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/internal/core/browser/cache/IndexerTypesJob2.java @@ -99,17 +99,32 @@ public class IndexerTypesJob2 extends IndexerJob2 { addType(entry, getPathForEntry( entry ), index2ICElement( entry.getKind() ), name, entry.getEnclosingNames(), monitor); } break; - case IIndex.TYPE_DERIVED : - if (name.length() != 0) { // skip anonymous structs - addSuperTypeReference(entry, name, entry.getEnclosingNames(), monitor); - } - break; default: break; } } } } + + IEntryResult[] typeEntries = fProjectIndex.getEntries( IIndex.TYPE, IIndex.TYPE_DERIVED, IIndex.ANY ); + for( int j = 0; j < typeEntries.length; ++j ) + { + if (monitor.isCanceled()) + throw new InterruptedException(); + + IEntryResult entry = typeEntries[j]; + String name = entry.extractSimpleName(); + switch( entry.getKind() ) + { + case IIndex.TYPE_DERIVED : + if (name.length() != 0) { // skip anonymous structs + addSuperTypeReference(entry, name, entry.getEnclosingNames(), monitor); + } + break; + default: + break; + } + } } private String getPathForEntry(IEntryResult entry) { @@ -176,7 +191,8 @@ public class IndexerTypesJob2 extends IndexerJob2 { throw new InterruptedException(); IPath path = PathUtil.getWorkspaceRelativePath(getPathForEntry( entry, i )); - info.addDerivedReference(new TypeReference(path, fProject)); + + info.addDerivedReference(new TypeReference(path, fProject)); // // // get absolute path // IPath path = new Path(file.getPath()); diff --git a/core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/index/ctagsindexer/CTagEntry.java b/core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/index/ctagsindexer/CTagEntry.java index 06a26ea3b4d..54bad0260f1 100644 --- a/core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/index/ctagsindexer/CTagEntry.java +++ b/core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/index/ctagsindexer/CTagEntry.java @@ -187,16 +187,16 @@ class CTagEntry{ funEntry.serialize(output); } } else if (kind.equals(CTagsConsoleParser.STRUCT)){ - TypeEntry typeEntry = new TypeEntry(IIndex.TYPE_STRUCT,IIndex.DECLARATION, fullName, getModifiers(), fileNum); + TypeEntry typeEntry = new TypeEntry(IIndex.TYPE_STRUCT,IIndex.DEFINITION, fullName, getModifiers(), fileNum); typeEntry.setNameOffset(lineNumber, 1, IIndex.LINE); typeEntry.setBaseTypes(getInherits()); typeEntry.serialize(output); } else if (kind.equals(CTagsConsoleParser.TYPEDEF)){ - TypeEntry typeEntry = new TypeEntry(IIndex.TYPE_TYPEDEF,IIndex.DECLARATION, fullName, getModifiers(), fileNum); + TypeEntry typeEntry = new TypeEntry(IIndex.TYPE_TYPEDEF,IIndex.DEFINITION, fullName, getModifiers(), fileNum); typeEntry.setNameOffset(lineNumber, 1, IIndex.LINE); typeEntry.serialize(output); } else if (kind.equals(CTagsConsoleParser.UNION)){ - TypeEntry typeEntry = new TypeEntry(IIndex.TYPE_UNION,IIndex.DECLARATION, fullName, getModifiers(), fileNum); + TypeEntry typeEntry = new TypeEntry(IIndex.TYPE_UNION,IIndex.DEFINITION, fullName, getModifiers(), fileNum); typeEntry.setNameOffset(lineNumber, 1, IIndex.LINE); typeEntry.serialize(output); } else if (kind.equals(CTagsConsoleParser.VARIABLE)){