Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-patch] Patch for 91946


Here is a patch that refactors the "majic" constants associated with the Index storage format.   I have pushed all the implementation based constants into the implementation classes :-)   This is complete for the "write" part of the index.  The read part of the  index is still not clean (that is what I will do next.).  

The ultimate goal of this defect, is to allow the possibility of replacement of the index storage mechanism.  

        - Dave

Index: src/org/eclipse/cdt/ui/tests/IndexerView/FilterIndexerViewDialog.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/IndexerView/FilterIndexerViewDialog.java,v
retrieving revision 1.2
diff -u -r1.2 FilterIndexerViewDialog.java
--- src/org/eclipse/cdt/ui/tests/IndexerView/FilterIndexerViewDialog.java	30 Mar 2005 19:47:40 -0000	1.2
+++ src/org/eclipse/cdt/ui/tests/IndexerView/FilterIndexerViewDialog.java	19 Apr 2005 17:44:02 -0000
@@ -15,7 +15,7 @@
 import java.util.Set;
 
 import org.eclipse.cdt.core.parser.util.ArrayUtil;
-import org.eclipse.cdt.internal.core.search.indexing.IIndexConstants;
+import org.eclipse.cdt.internal.core.index.cindexstorage.IndexerOutput;
 import org.eclipse.cdt.ui.CUIPlugin;
 import org.eclipse.cdt.ui.browser.typeinfo.TypeInfoMessages;
 import org.eclipse.jface.dialogs.Dialog;
@@ -67,62 +67,62 @@
     private String message = "Filter Indexer Results (. = any character, .* = any string):"; //$NON-NLS-1$
 
     public static final int ENTRY_REF = 1;
-    public static final String ENTRY_REF_STRING = String.valueOf(IIndexConstants.REF);
+    public static final String ENTRY_REF_STRING = String.valueOf(IndexerOutput.REF);
     public static final int ENTRY_TYPE_REF = 2;
-    public static final String ENTRY_TYPE_REF_STRING = String.valueOf(IIndexConstants.TYPE_REF);
-    public static final String ENTRY_TYPE_DECL_STRING = String.valueOf(IIndexConstants.TYPE_DECL);
+    public static final String ENTRY_TYPE_REF_STRING = String.valueOf(IndexerOutput.TYPE_REF);
+    public static final String ENTRY_TYPE_DECL_STRING = String.valueOf(IndexerOutput.TYPE_DECL);
     public static final int ENTRY_FUNCTION_REF = 4;
-    public static final String ENTRY_FUNCTION_REF_STRING = String.valueOf(IIndexConstants.FUNCTION_REF);
+    public static final String ENTRY_FUNCTION_REF_STRING = String.valueOf(IndexerOutput.FUNCTION_REF);
     public static final int ENTRY_FUNCTION_DECL = 5;
-    public static final String ENTRY_FUNCTION_DECL_STRING = String.valueOf(IIndexConstants.FUNCTION_DECL);
+    public static final String ENTRY_FUNCTION_DECL_STRING = String.valueOf(IndexerOutput.FUNCTION_DECL);
     public static final int ENTRY_CONSTRUCTOR_REF = 6;
-    public static final String ENTRY_CONSTRUCTOR_REF_STRING = String.valueOf(IIndexConstants.CONSTRUCTOR_REF);
+    public static final String ENTRY_CONSTRUCTOR_REF_STRING = String.valueOf(IndexerOutput.CONSTRUCTOR_REF);
     public static final int ENTRY_CONSTRUCTOR_DECL = 7;
-    public static final String ENTRY_CONSTRUCTOR_DECL_STRING = String.valueOf(IIndexConstants.CONSTRUCTOR_DECL);
+    public static final String ENTRY_CONSTRUCTOR_DECL_STRING = String.valueOf(IndexerOutput.CONSTRUCTOR_DECL);
     public static final int ENTRY_NAMESPACE_REF = 8;
-    public static final String ENTRY_NAMESPACE_REF_STRING = String.valueOf(IIndexConstants.NAMESPACE_REF);
+    public static final String ENTRY_NAMESPACE_REF_STRING = String.valueOf(IndexerOutput.NAMESPACE_REF);
     public static final int ENTRY_NAMESPACE_DECL = 9;
-    public static final String ENTRY_NAMESPACE_DECL_STRING = String.valueOf(IIndexConstants.NAMESPACE_DECL);
+    public static final String ENTRY_NAMESPACE_DECL_STRING = String.valueOf(IndexerOutput.NAMESPACE_DECL);
     public static final int ENTRY_FIELD_REF = 10;
-    public static final String ENTRY_FIELD_REF_STRING = String.valueOf(IIndexConstants.FIELD_REF);
+    public static final String ENTRY_FIELD_REF_STRING = String.valueOf(IndexerOutput.FIELD_REF);
     public static final int ENTRY_FIELD_DECL = 11;
-    public static final String ENTRY_FIELD_DECL_STRING = String.valueOf(IIndexConstants.FIELD_DECL);
+    public static final String ENTRY_FIELD_DECL_STRING = String.valueOf(IndexerOutput.FIELD_DECL);
     public static final int ENTRY_ENUMTOR_REF = 12;
-    public static final String ENTRY_ENUMTOR_REF_STRING = String.valueOf(IIndexConstants.ENUMTOR_REF);
+    public static final String ENTRY_ENUMTOR_REF_STRING = String.valueOf(IndexerOutput.ENUMTOR_REF);
     public static final int ENTRY_ENUMTOR_DECL = 13;
-    public static final String ENTRY_ENUMTOR_DECL_STRING = String.valueOf(IIndexConstants.ENUMTOR_DECL);
+    public static final String ENTRY_ENUMTOR_DECL_STRING = String.valueOf(IndexerOutput.ENUMTOR_DECL);
     public static final int ENTRY_METHOD_REF = 14;
-    public static final String ENTRY_METHOD_REF_STRING = String.valueOf(IIndexConstants.METHOD_REF);
+    public static final String ENTRY_METHOD_REF_STRING = String.valueOf(IndexerOutput.METHOD_REF);
     public static final int ENTRY_METHOD_DECL = 15;
-    public static final String ENTRY_METHOD_DECL_STRING = String.valueOf(IIndexConstants.METHOD_DECL);
+    public static final String ENTRY_METHOD_DECL_STRING = String.valueOf(IndexerOutput.METHOD_DECL);
     public static final int ENTRY_MACRO_DECL = 16;
-    public static final String ENTRY_MACRO_DECL_STRING = String.valueOf(IIndexConstants.MACRO_DECL);
+    public static final String ENTRY_MACRO_DECL_STRING = String.valueOf(IndexerOutput.MACRO_DECL);
     public static final int ENTRY_INCLUDE_REF = 17;
-    public static final String ENTRY_INCLUDE_REF_STRING = String.valueOf(IIndexConstants.INCLUDE_REF);
+    public static final String ENTRY_INCLUDE_REF_STRING = String.valueOf(IndexerOutput.INCLUDE_REF);
     public static final int ENTRY_SUPER_REF = 18;
-    public static final String ENTRY_SUPER_REF_STRING = String.valueOf(IIndexConstants.SUPER_REF);
+    public static final String ENTRY_SUPER_REF_STRING = String.valueOf(IndexerOutput.SUPER_REF);
     public static final int ENTRY_TYPE_DECL_T = 19;
-    public static final String ENTRY_TYPE_DECL_T_STRING = String.valueOf(IIndexConstants.TYPEDEF_DECL);
+    public static final String ENTRY_TYPE_DECL_T_STRING = String.valueOf(IndexerOutput.TYPEDEF_DECL);
     public static final int ENTRY_TYPE_DECL_C = 20;
-    public static final String ENTRY_TYPE_DECL_C_STRING = String.valueOf(IIndexConstants.CLASS_DECL);
+    public static final String ENTRY_TYPE_DECL_C_STRING = String.valueOf(IndexerOutput.CLASS_DECL);
     public static final int ENTRY_TYPE_DECL_V = 21;
-    public static final String ENTRY_TYPE_DECL_V_STRING = String.valueOf(IIndexConstants.VAR_DECL);
+    public static final String ENTRY_TYPE_DECL_V_STRING = String.valueOf(IndexerOutput.VAR_DECL);
     public static final int ENTRY_TYPE_DECL_S = 22;
-    public static final String ENTRY_TYPE_DECL_S_STRING = String.valueOf(IIndexConstants.STRUCT_DECL);
+    public static final String ENTRY_TYPE_DECL_S_STRING = String.valueOf(IndexerOutput.STRUCT_DECL);
     public static final int ENTRY_TYPE_DECL_E = 23;
-    public static final String ENTRY_TYPE_DECL_E_STRING = String.valueOf(IIndexConstants.ENUM_DECL);
+    public static final String ENTRY_TYPE_DECL_E_STRING = String.valueOf(IndexerOutput.ENUM_DECL);
     public static final int ENTRY_TYPE_DECL_U = 24;
-    public static final String ENTRY_TYPE_DECL_U_STRING = String.valueOf(IIndexConstants.UNION_DECL);
+    public static final String ENTRY_TYPE_DECL_U_STRING = String.valueOf(IndexerOutput.UNION_DECL);
     public static final int ENTRY_TYPE_DECL_D = 25;
-    public static final String ENTRY_TYPE_DECL_D_STRING = String.valueOf(IIndexConstants.TYPE_DECL) + String.valueOf(IIndexConstants.DERIVED_SUFFIX) + String.valueOf(IIndexConstants.SEPARATOR);
+    public static final String ENTRY_TYPE_DECL_D_STRING = String.valueOf(IndexerOutput.TYPE_DECL) + String.valueOf(IndexerOutput.DERIVED_SUFFIX) + String.valueOf(IndexerOutput.SEPARATOR);
     public static final int ENTRY_TYPE_DECL_F = 26;
-    public static final String ENTRY_TYPE_DECL_F_STRING = String.valueOf(IIndexConstants.TYPE_DECL) + String.valueOf(IIndexConstants.FRIEND_SUFFIX) + String.valueOf(IIndexConstants.SEPARATOR);
+    public static final String ENTRY_TYPE_DECL_F_STRING = String.valueOf(IndexerOutput.TYPE_DECL) + String.valueOf(IndexerOutput.FRIEND_SUFFIX) + String.valueOf(IndexerOutput.SEPARATOR);
     public static final int ENTRY_TYPE_DECL_G = 27;
-    public static final String ENTRY_TYPE_DECL_G_STRING = String.valueOf(IIndexConstants.TYPE_DECL) + String.valueOf(IIndexConstants.FWD_CLASS_SUFFIX) + String.valueOf(IIndexConstants.SEPARATOR);
+    public static final String ENTRY_TYPE_DECL_G_STRING = String.valueOf(IndexerOutput.TYPE_DECL) + String.valueOf(IndexerOutput.FWD_CLASS_SUFFIX) + String.valueOf(IndexerOutput.SEPARATOR);
     public static final int ENTRY_TYPE_DECL_H = 28;
-    public static final String ENTRY_TYPE_DECL_H_STRING = String.valueOf(IIndexConstants.TYPE_DECL) + String.valueOf(IIndexConstants.FWD_STRUCT_SUFFIX) + String.valueOf(IIndexConstants.SEPARATOR);
+    public static final String ENTRY_TYPE_DECL_H_STRING = String.valueOf(IndexerOutput.TYPE_DECL) + String.valueOf(IndexerOutput.FWD_STRUCT_SUFFIX) + String.valueOf(IndexerOutput.SEPARATOR);
     public static final int ENTRY_TYPE_DECL_I = 29;
-    public static final String ENTRY_TYPE_DECL_I_STRING = String.valueOf(IIndexConstants.TYPE_DECL) + String.valueOf(IIndexConstants.FWD_UNION_SUFFIX) + String.valueOf(IIndexConstants.SEPARATOR);
+    public static final String ENTRY_TYPE_DECL_I_STRING = String.valueOf(IndexerOutput.TYPE_DECL) + String.valueOf(IndexerOutput.FWD_UNION_SUFFIX) + String.valueOf(IndexerOutput.SEPARATOR);
 
     private String fDialogSection;
     
Index: src/org/eclipse/cdt/ui/tests/IndexerView/IndexerNodeLeaf.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/IndexerView/IndexerNodeLeaf.java,v
retrieving revision 1.4
diff -u -r1.4 IndexerNodeLeaf.java
--- src/org/eclipse/cdt/ui/tests/IndexerView/IndexerNodeLeaf.java	18 Apr 2005 19:06:02 -0000	1.4
+++ src/org/eclipse/cdt/ui/tests/IndexerView/IndexerNodeLeaf.java	19 Apr 2005 17:44:02 -0000
@@ -17,9 +17,9 @@
 import org.eclipse.cdt.core.parser.util.ArrayUtil;
 import org.eclipse.cdt.internal.core.index.IEntryResult;
 import org.eclipse.cdt.internal.core.index.cindexstorage.IndexedFileEntry;
+import org.eclipse.cdt.internal.core.index.cindexstorage.IndexerOutput;
 import org.eclipse.cdt.internal.core.index.cindexstorage.io.BlocksIndexInput;
 import org.eclipse.cdt.internal.core.index.cindexstorage.io.IndexInput;
-import org.eclipse.cdt.internal.core.search.indexing.IIndexConstants;
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.ui.views.properties.IPropertyDescriptor;
 import org.eclipse.ui.views.properties.IPropertySource;
@@ -294,8 +294,8 @@
     }
 
     public String toString() {
-        if (!parent.isDisplayFullName() && name.indexOf(IIndexConstants.SEPARATOR) > 0)
-            return name.substring(0, name.indexOf(IIndexConstants.SEPARATOR));
+        if (!parent.isDisplayFullName() && name.indexOf(IndexerOutput.SEPARATOR) > 0)
+            return name.substring(0, name.indexOf(IndexerOutput.SEPARATOR));
         
         return name;
     }
Index: src/org/eclipse/cdt/ui/tests/IndexerView/IndexerView.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/IndexerView/IndexerView.java,v
retrieving revision 1.3
diff -u -r1.3 IndexerView.java
--- src/org/eclipse/cdt/ui/tests/IndexerView/IndexerView.java	18 Apr 2005 19:06:02 -0000	1.3
+++ src/org/eclipse/cdt/ui/tests/IndexerView/IndexerView.java	19 Apr 2005 17:44:03 -0000
@@ -17,7 +17,7 @@
 import org.eclipse.cdt.internal.core.index.IEntryResult;
 import org.eclipse.cdt.internal.core.index.IIndex;
 import org.eclipse.cdt.internal.core.index.IIndexer;
-import org.eclipse.cdt.internal.core.index.sourceindexer.AbstractIndexer;
+import org.eclipse.cdt.internal.core.index.cindexstorage.IndexerOutput;
 import org.eclipse.cdt.ui.testplugin.CTestPlugin;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.runtime.IProgressMonitor;
@@ -135,7 +135,7 @@
                             int matchMode = ICSearchConstants.PATTERN_MATCH;
                             boolean isCaseSensitive = false;
                             
-                            char[] queryString = AbstractIndexer.bestPrefix( prefix, optionalType, name, containingTypes, matchMode, isCaseSensitive);
+                            char[] queryString = IndexerOutput.bestPrefix( prefix, optionalType, name, containingTypes, matchMode, isCaseSensitive);
                             
                             IEntryResult[] results = index.queryEntries(queryString);
                             if (results == null) return Status.CANCEL_STATUS;
Index: browser/org/eclipse/cdt/internal/core/browser/cache/IndexerDependenciesJob.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.core/browser/org/eclipse/cdt/internal/core/browser/cache/IndexerDependenciesJob.java,v
retrieving revision 1.3
diff -u -r1.3 IndexerDependenciesJob.java
--- browser/org/eclipse/cdt/internal/core/browser/cache/IndexerDependenciesJob.java	7 Apr 2005 20:19:53 -0000	1.3
+++ browser/org/eclipse/cdt/internal/core/browser/cache/IndexerDependenciesJob.java	19 Apr 2005 17:43:11 -0000
@@ -18,9 +18,9 @@
 import org.eclipse.cdt.internal.core.index.IEntryResult;
 import org.eclipse.cdt.internal.core.index.IIndex;
 import org.eclipse.cdt.internal.core.index.cindexstorage.IndexedFileEntry;
+import org.eclipse.cdt.internal.core.index.cindexstorage.IndexerOutput;
 import org.eclipse.cdt.internal.core.index.cindexstorage.io.BlocksIndexInput;
 import org.eclipse.cdt.internal.core.index.cindexstorage.io.IndexInput;
-import org.eclipse.cdt.internal.core.search.indexing.IIndexConstants;
 import org.eclipse.cdt.internal.core.search.indexing.IndexManager;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.runtime.IPath;
@@ -59,7 +59,7 @@
 		if (progressMonitor.isCanceled())
 			throw new InterruptedException();
 
-		IEntryResult[] includeEntries = input.queryEntriesPrefixedBy(IIndexConstants.INCLUDE_REF);
+		IEntryResult[] includeEntries = input.queryEntriesPrefixedBy(IndexerOutput.INCLUDE_REF);
 		if (includeEntries != null) {
 			//TODO subprogress monitor
 			for (int i = 0; i < includeEntries.length; ++i) {
@@ -90,7 +90,7 @@
 
 	private IPath getIncludePath(IEntryResult entry) {
 		char[] word = entry.getWord();
-		int firstSlash = CharOperation.indexOf(IIndexConstants.SEPARATOR, word, 0);
+		int firstSlash = CharOperation.indexOf(IndexerOutput.SEPARATOR, word, 0);
 		String include = String.valueOf(CharOperation.subarray(word, firstSlash + 1, -1));
 		return PathUtil.getWorkspaceRelativePath(include);
 	}
Index: browser/org/eclipse/cdt/internal/core/browser/cache/IndexerTypesJob.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.core/browser/org/eclipse/cdt/internal/core/browser/cache/IndexerTypesJob.java,v
retrieving revision 1.7
diff -u -r1.7 IndexerTypesJob.java
--- browser/org/eclipse/cdt/internal/core/browser/cache/IndexerTypesJob.java	7 Apr 2005 20:19:53 -0000	1.7
+++ browser/org/eclipse/cdt/internal/core/browser/cache/IndexerTypesJob.java	19 Apr 2005 17:43:11 -0000
@@ -23,9 +23,9 @@
 import org.eclipse.cdt.internal.core.index.IEntryResult;
 import org.eclipse.cdt.internal.core.index.IIndex;
 import org.eclipse.cdt.internal.core.index.cindexstorage.IndexedFileEntry;
+import org.eclipse.cdt.internal.core.index.cindexstorage.IndexerOutput;
 import org.eclipse.cdt.internal.core.index.cindexstorage.io.BlocksIndexInput;
 import org.eclipse.cdt.internal.core.index.cindexstorage.io.IndexInput;
-import org.eclipse.cdt.internal.core.search.indexing.IIndexConstants;
 import org.eclipse.cdt.internal.core.search.indexing.IndexManager;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.runtime.IPath;
@@ -63,7 +63,7 @@
 		if (monitor.isCanceled())
 			throw new InterruptedException();
 
-		IEntryResult[] namespaceEntries = input.queryEntriesPrefixedBy(IIndexConstants.NAMESPACE_DECL);
+		IEntryResult[] namespaceEntries = input.queryEntriesPrefixedBy(IndexerOutput.NAMESPACE_DECL);
 		if (namespaceEntries != null) {
 			//TODO subprogress monitor
 			for (int i = 0; i < namespaceEntries.length; ++i) {
@@ -72,8 +72,8 @@
 				
 				IEntryResult entry = namespaceEntries[i];
 				char[] word = entry.getWord();
-				int firstSlash = CharOperation.indexOf(IIndexConstants.SEPARATOR, word, 0);
-				int slash = CharOperation.indexOf(IIndexConstants.SEPARATOR, word, firstSlash + 1);
+				int firstSlash = CharOperation.indexOf(IndexerOutput.SEPARATOR, word, 0);
+				int slash = CharOperation.indexOf(IndexerOutput.SEPARATOR, word, firstSlash + 1);
 				String name = String.valueOf(CharOperation.subarray(word, firstSlash + 1, slash));
 				if (name.length() != 0) {
 					String[] enclosingNames = getEnclosingNames(word, slash);
@@ -88,7 +88,7 @@
 		if (monitor.isCanceled())
 			throw new InterruptedException();
 
-		IEntryResult[] typeEntries = input.queryEntriesPrefixedBy(IIndexConstants.TYPE_DECL);
+		IEntryResult[] typeEntries = input.queryEntriesPrefixedBy(IndexerOutput.TYPE_DECL);
 		if (typeEntries != null) {
 			//TODO subprogress monitor
 			for (int i = 0; i < typeEntries.length; ++i) {
@@ -97,20 +97,20 @@
 				
 				IEntryResult entry = typeEntries[i];
 				char[] word = entry.getWord();
-				int firstSlash = CharOperation.indexOf(IIndexConstants.SEPARATOR, word, 0);
+				int firstSlash = CharOperation.indexOf(IndexerOutput.SEPARATOR, word, 0);
 				char decodedType = word[firstSlash + 1];
 				int type = getElementType(decodedType);
 				if (type != 0) {
 					firstSlash += 2;
-					int slash = CharOperation.indexOf(IIndexConstants.SEPARATOR, word, firstSlash + 1);
+					int slash = CharOperation.indexOf(IndexerOutput.SEPARATOR, word, firstSlash + 1);
 					String name = String.valueOf(CharOperation.subarray(word, firstSlash + 1, slash));
 					if (name.length() != 0) {  // skip anonymous structs
 						String[] enclosingNames = getEnclosingNames(word, slash);
 						addType(input, project, entry, type, name, enclosingNames, monitor);
 					}
-				} else if (decodedType == IIndexConstants.DERIVED_SUFFIX) {
+				} else if (decodedType == IndexerOutput.DERIVED_SUFFIX) {
 					firstSlash += 2;
-					int slash = CharOperation.indexOf(IIndexConstants.SEPARATOR, word, firstSlash + 1);
+					int slash = CharOperation.indexOf(IndexerOutput.SEPARATOR, word, firstSlash + 1);
 					String name = String.valueOf(CharOperation.subarray(word, firstSlash + 1, slash));
 					if (name.length() != 0) {  // skip anonymous structs
 						String[] enclosingNames = getEnclosingNames(word, slash);
@@ -123,15 +123,15 @@
 
 	private int getElementType(char decodedType) {
 		switch (decodedType) {
-			case IIndexConstants.CLASS_SUFFIX :
+			case IndexerOutput.CLASS_SUFFIX :
 				return ICElement.C_CLASS;
-			case IIndexConstants.STRUCT_SUFFIX :
+			case IndexerOutput.STRUCT_SUFFIX :
 				return ICElement.C_STRUCT;
-			case IIndexConstants.TYPEDEF_SUFFIX :
+			case IndexerOutput.TYPEDEF_SUFFIX :
 				return ICElement.C_TYPEDEF;
-			case IIndexConstants.ENUM_SUFFIX :
+			case IndexerOutput.ENUM_SUFFIX :
 				return ICElement.C_ENUMERATION;
-			case IIndexConstants.UNION_SUFFIX :
+			case IndexerOutput.UNION_SUFFIX :
 				return ICElement.C_UNION;
 		}
 		return 0;
Index: index/org/eclipse/cdt/internal/core/index/IIndexerOutput.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/index/IIndexerOutput.java,v
retrieving revision 1.7
diff -u -r1.7 IIndexerOutput.java
--- index/org/eclipse/cdt/internal/core/index/IIndexerOutput.java	7 Apr 2005 20:33:22 -0000	1.7
+++ index/org/eclipse/cdt/internal/core/index/IIndexerOutput.java	19 Apr 2005 17:43:11 -0000
@@ -18,14 +18,67 @@
  */
 
 public interface IIndexerOutput {
-    public void addRef(int indexedFileNumber, char[] word);
-	public void addRef(int indexedFileNumber, char[] word, int offset, int offsetLength, int offsetType);
-	public void addRef(int indexedFileNumber, String word, int offset, int offsetLength, int offsetType);
+
+	public void addEnumtorDecl(int indexedFileNumber, char [][] name, int offset, int offsetLength, int offsetType);
+	public void addEnumtorRef(int indexedFileNumber, char [][] name, int offset, int offsetLength, int offsetType);
+
+	public void addMacroDecl(int indexedFileNumber, char [][] name, int offset, int offsetLength, int offsetType);
+	public void addMacroRef(int indexedFileNumber, char [][] name, int offset, int offsetLength, int offsetType);
+
+	public void addFieldDecl(int indexedFileNumber, char [][] name, int offset, int offsetLength, int offsetType);
+	public void addFieldRef(int indexedFileNumber, char [][] name, int offset, int offsetLength, int offsetType);
+	
+	public void addMethodDecl(int indexedFileNumber, char [][] name, int offset, int offsetLength, int offsetType);
+	public void addMethodRef(int indexedFileNumber, char [][] name, int offset, int offsetLength, int offsetType);
+	
+	public void addFunctionDecl(int indexedFileNumber, char [][] name, int offset, int offsetLength, int offsetType);
+	public void addFunctionRef(int indexedFileNumber, char [][] name, int offset, int offsetLength, int offsetType);
+	
+	public void addNamespaceDecl(int indexedFileNumber, char [][] name, int offset, int offsetLength, int offsetType);
+	public void addNamespaceRef(int indexedFileNumber, char [][] name, int offset, int offsetLength, int offsetType);
+	
+	public void addIncludeRef(int indexedFileNumber, char [][] name, int offset, int offsetLength, int offsetType);
+	
+	public void addStructDecl(int indexedFileNumber, char [][] name, int offset, int offsetLength, int offsetType);
+	public void addStructRef(int indexedFileNumber, char [][] name, int offset, int offsetLength, int offsetType);
+
+	public void addTypedefDecl(int indexedFileNumber, char [][] name, int offset, int offsetLength, int offsetType);
+	public void addTypedefRef(int indexedFileNumber, char [][] name, int offset, int offsetLength, int offsetType);
+	
+	public void addUnionDecl(int indexedFileNumber, char [][] name, int offset, int offsetLength, int offsetType);
+	public void addUnionRef(int indexedFileNumber, char [][] name, int offset, int offsetLength, int offsetType);
+	
+	public void addVariableDecl(int indexedFileNumber, char [][] name, int offset, int offsetLength, int offsetType);
+	public void addVariableRef(int indexedFileNumber, char [][] name, int offset, int offsetLength, int offsetType);
+	
+	public void addClassDecl(int indexedFileNumber, char [][] name, int offset, int offsetLength, int offsetType);
+	public void addClassRef(int indexedFileNumber, char [][] name, int offset, int offsetLength, int offsetType);
+	
+	public void addEnumDecl(int indexedFileNumber, char [][] name, int offset, int offsetLength, int offsetType);
+	public void addEnumRef(int indexedFileNumber, char [][] name, int offset, int offsetLength, int offsetType);
+	
+	public void addDerivedDecl(int indexedFileNumber, char [][] name, int offset, int offsetLength, int offsetType);
+	public void addDerivedRef(int indexedFileNumber, char [][] name, int offset, int offsetLength, int offsetType);
+	
+	public void addFriendDecl(int indexedFileNumber, char [][] name, int offset, int offsetLength, int offsetType);
+	public void addFriendRef(int indexedFileNumber, char [][] name, int offset, int offsetLength, int offsetType);
+
+	public void addVarDecl(int indexedFileNumber, char [][] name, int offset, int offsetLength, int offsetType);
+	public void addVarRef(int indexedFileNumber, char [][] name, int offset, int offsetLength, int offsetType);
+	
+	public void addFwd_ClassDecl(int indexedFileNumber, char [][] name, int offset, int offsetLength, int offsetType);
+	public void addFwd_ClassRef(int indexedFileNumber, char [][] name, int offset, int offsetLength, int offsetType);
+	
+	public void addFwd_StructDecl(int indexedFileNumber, char [][] name, int offset, int offsetLength, int offsetType);
+	public void addFwd_StructRef(int indexedFileNumber, char [][] name, int offset, int offsetLength, int offsetType);
+	
+	public void addFwd_UnionDecl(int indexedFileNumber, char [][] name, int offset, int offsetLength, int offsetType);
+	public void addFwd_UnionRef(int indexedFileNumber, char [][] name, int offset, int offsetLength, int offsetType);
 	
 	public IndexedFileEntry  getIndexedFile(String path); 
 	public IndexedFileEntry  addIndexedFile(String path);
 	//For Dep Tree
-	public void addIncludeRef(int indexedFileNumber, char[] word);
+//	public void addIncludeRef(int indexedFileNumber, char[] word);
 	public void addIncludeRef(int indexedFileNumber, String word);
 	public void addRelatives(int indexedFileNumber, String inclusion, String parent);
 }
Index: index/org/eclipse/cdt/internal/core/index/cindexstorage/ICIndexStorageConstants.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/index/cindexstorage/ICIndexStorageConstants.java,v
retrieving revision 1.2
diff -u -r1.2 ICIndexStorageConstants.java
--- index/org/eclipse/cdt/internal/core/index/cindexstorage/ICIndexStorageConstants.java	8 Apr 2005 06:07:50 -0000	1.2
+++ index/org/eclipse/cdt/internal/core/index/cindexstorage/ICIndexStorageConstants.java	19 Apr 2005 17:43:12 -0000
@@ -46,18 +46,6 @@
 	final static int ENUMTOR = 7;
 	final static int INCLUDE = 8;
 
-    final static char[][] encodings = {
-            new char[] {' '},   // not used
-            "type".toCharArray(),    	// TYPES            //$NON-NLS-1$
-            "function".toCharArray(),   // FUNCTIONS        //$NON-NLS-1$
-            "method".toCharArray(),    	// METHODS          //$NON-NLS-1$
-            "field".toCharArray(),    	// FIELDS           //$NON-NLS-1$
-            "macro".toCharArray(),    	// MACROS           //$NON-NLS-1$
-            "namespace".toCharArray(),  // NAMESPACES       //$NON-NLS-1$
-            "enumtor".toCharArray(),    // ENUMERATORS      //$NON-NLS-1$
-            "include".toCharArray()   	// INCLUDES	        //$NON-NLS-1$
-        };
-    
     /**
 	 * Encoding types
 	 */
@@ -65,13 +53,6 @@
     final static int REFERENCE = 2;
     final static int DEFINITION = 3;
     
-    final static char[][] encodingTypes = {
-            new char[] {' '},   // not used
-            "Decl/".toCharArray(),   // DECLARATIONS        //$NON-NLS-1$
-            "Ref/".toCharArray(),    // REFERENCES          //$NON-NLS-1$
-            "Defn/".toCharArray()    // DEFINTIONS          //$NON-NLS-1$
-        };
-    
     /**
      * Encoding constants used in CIndexStorage
      */
@@ -86,22 +67,7 @@
 	final static int TYPE_FWD_CLASS = 9;
 	final static int TYPE_FWD_STRUCT = 10;
 	final static int TYPE_FWD_UNION = 11;
-	
-    final static char[] typeConstants = {
-            ' ',    // not used
-            'C',    // CLASS            
-            'S',    // STRUCT          
-            'U',    // UNION            
-            'E',    // ENUM             
-            'V',    // VAR              
-            'T',    // TYPEDEF          
-            'D',    // DERIVED          
-            'F',    // FRIEND           
-            'G',    // FWD_CLASS        
-            'H',    // FWD_STRUCT       
-            'I'     // FWD_UNION
-        };
-    
+
     //Used for offsets
     final static int LINE=1;
     final static int OFFSET=2;
Index: index/org/eclipse/cdt/internal/core/index/cindexstorage/IndexerOutput.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/index/cindexstorage/IndexerOutput.java,v
retrieving revision 1.3
diff -u -r1.3 IndexerOutput.java
--- index/org/eclipse/cdt/internal/core/index/cindexstorage/IndexerOutput.java	8 Apr 2005 06:07:50 -0000	1.3
+++ index/org/eclipse/cdt/internal/core/index/cindexstorage/IndexerOutput.java	19 Apr 2005 17:43:12 -0000
@@ -10,14 +10,67 @@
  *******************************************************************************/
 package org.eclipse.cdt.internal.core.index.cindexstorage;
 
+import org.eclipse.cdt.core.search.ICSearchConstants;
+import org.eclipse.cdt.internal.core.CharOperation;
 import org.eclipse.cdt.internal.core.index.IIndexerOutput;
+import org.eclipse.cdt.internal.core.index.sourceindexer.AbstractIndexer;
 
 /**
  * An indexerOutput is used by an indexer to add files and word references to
  * an inMemoryIndex. 
  */
 
-public class IndexerOutput implements IIndexerOutput {
+public class IndexerOutput implements IIndexerOutput, ICIndexStorageConstants, ICSearchConstants {   
+	
+	static final private int REFERENCE = 0;
+	static final private int DECLARATION = 1;
+	
+	static final public char CLASS_SUFFIX = 'C';		// CLASS
+	static final public char DERIVED_SUFFIX = 'D';		// DERIVED
+	static final public char ENUM_SUFFIX = 'E';			// ENUM 
+	static final public char FRIEND_SUFFIX = 'F';		// FRIEND 
+	static final public char FWD_CLASS_SUFFIX = 'G';	// FWD_CLASS
+	static final public char FWD_STRUCT_SUFFIX = 'H';	// FWD_STRUCT
+	static final public char FWD_UNION_SUFFIX = 'I';	// FWD_UNION
+	static final public char STRUCT_SUFFIX = 'S';		// STRUCT
+	static final public char TYPEDEF_SUFFIX = 'T';		// TYPEDEF 
+	static final public char UNION_SUFFIX = 'U';		// UNION 
+	static final public char VAR_SUFFIX = 'V';			// VAR
+	
+	final public static char SEPARATOR= '/';
+	
+	static public char[] REF= "ref/".toCharArray(); //$NON-NLS-1$ 
+	static public char[] TYPE_REF= "typeRef/".toCharArray(); //$NON-NLS-1$	
+	static public char[] TYPE_DECL = "typeDecl/".toCharArray(); //$NON-NLS-1$
+	static public char[] TYPE_ALL = "type".toCharArray(); //$NON-NLS-1$	
+	static public char[] NAMESPACE_REF= "namespaceRef/".toCharArray(); //$NON-NLS-1$
+	static public char[] NAMESPACE_DECL= "namespaceDecl/".toCharArray(); //$NON-NLS-1$	
+	static public char[] NAMESPACE_ALL = "namespace".toCharArray(); //$NON-NLS-1$	
+	static public char[] FIELD_REF= "fieldRef/".toCharArray(); //$NON-NLS-1$	
+	static public char[] FIELD_DECL= "fieldDecl/".toCharArray(); //$NON-NLS-1$
+	static public char[] FIELD_ALL= "field".toCharArray(); //$NON-NLS-1$	
+	static public char[] ENUMTOR_REF= "enumtorRef/".toCharArray(); //$NON-NLS-1$	
+	static public char[] ENUMTOR_DECL = "enumtorDecl/".toCharArray(); //$NON-NLS-1$
+	static public char[] ENUMTOR_ALL = "enumtor".toCharArray(); //$NON-NLS-1$	
+	static public char[] METHOD_REF= "methodRef/".toCharArray(); //$NON-NLS-1$	
+	static public char[] METHOD_DECL= "methodDecl/".toCharArray(); //$NON-NLS-1$
+	static public char[] METHOD_ALL= "method".toCharArray(); //$NON-NLS-1$		
+	static public char[] TYPEDEF_DECL = "typeDecl/T/".toCharArray(); //$NON-NLS-1$	
+	static public char[] MACRO_DECL = "macroDecl/".toCharArray(); //$NON-NLS-1$	
+	static public char[] MACRO_REF = "macroRef/".toCharArray(); //$NON-NLS-1$	
+	static public char[] INCLUDE_REF = "includeRef/".toCharArray(); //$NON-NLS-1$	
+	static public char[] FUNCTION_REF= "functionRef/".toCharArray(); //$NON-NLS-1$	
+	static public char[] FUNCTION_DECL= "functionDecl/".toCharArray(); //$NON-NLS-1$
+	static public char[] FUNCTION_ALL= "function".toCharArray(); //$NON-NLS-1$
+	static public char[] CONSTRUCTOR_REF= "constructorRef/".toCharArray(); //$NON-NLS-1$
+	static public char[] CONSTRUCTOR_DECL= "constructorDecl/".toCharArray(); //$NON-NLS-1$	
+	static public char[] SUPER_REF = "superRef/".toCharArray(); //$NON-NLS-1$
+	static public char[] CLASS_DECL= "typeDecl/C/".toCharArray(); //$NON-NLS-1$
+	static public char[] VAR_DECL= "typeDecl/V/".toCharArray(); //$NON-NLS-1$
+	static public char[] STRUCT_DECL= "typeDecl/S/".toCharArray(); //$NON-NLS-1$
+	static public char[] ENUM_DECL= "typeDecl/E/".toCharArray(); //$NON-NLS-1$
+	static public char[] UNION_DECL= "typeDecl/U/".toCharArray(); //$NON-NLS-1$	
+
 	protected InMemoryIndex index;
 	/**
 	 * IndexerOutput constructor comment.
@@ -26,17 +79,36 @@
 		this.index= index;
 	}
 	
-	/**
-	 * @deprecated
-	 */
-	public void addRef(int indexedFileNumber, char[] word){
-	    addRef(indexedFileNumber,word,1,1, 1);
-	}
+	protected void addRef(int indexedFileNumber, char [][] name, int type, LimitTo limit, int offset, int offsetLength, int offsetType) {
+		if (indexedFileNumber == 0) {
+			throw new IllegalStateException();
+		}
+		
+		if (offsetLength <= 0)
+			offsetLength = 1;
+		
+		index.addRef(
+				encodeTypeEntry(name, type, limit),
+                indexedFileNumber, offset, offsetLength, offsetType);
+	}  
 	
+	protected void addRef(int indexedFileNumber, char[][] name, char[] prefix, int prefixLength, int offset, int offsetLength, int offsetType) {
+		if (indexedFileNumber == 0) {
+			throw new IllegalStateException();
+		}
+		
+		if (offsetLength <= 0)
+			offsetLength = 1;
+		
+		index.addRef(
+				encodeEntry(name, prefix, prefixLength), 
+                indexedFileNumber, offset, offsetLength, offsetType);
+		
+	}
 	/**
 	 * Adds a reference to the given word to the inMemoryIndex.
 	 */
-	public void addRef(int indexedFileNumber, char[] word, int offset, int offsetLength, int offsetType) {
+	protected void addRef(int indexedFileNumber, char[] word, int offset, int offsetLength, int offsetType) {
 		if (indexedFileNumber == 0) {
 			throw new IllegalStateException();
 		}
@@ -46,12 +118,6 @@
 		
 		index.addRef(word, indexedFileNumber, offset, offsetLength, offsetType);
 	}  
-	/**
-	 * Adds a reference to the given word to the inMemoryIndex.
-	 */
-	public void addRef(int indexedFileNumber, String word, int offset, int offsetLength, int offsetType) {
-		addRef(indexedFileNumber, word.toCharArray(), offset, offsetLength, offsetType);
-	}
 		
 	public void addRelatives(int indexedFileNumber, String inclusion, String parent) {
 		if (indexedFileNumber == 0) {
@@ -82,5 +148,579 @@
 	public IndexedFileEntry addIndexedFile(String path) {
 		return index.addFile(path);
 	}
+
+	   /**
+     * Type entries are encoded as follow: 'typeDecl/' ('C' | 'S' | 'U' | 'E' ) '/'  TypeName ['/' Qualifier]* 
+     */
+     protected static final char[] encodeTypeEntry( char[][] fullTypeName, int typeType, LimitTo encodeType){ 
+
+        int pos = 0, nameLength = 0;
+        for (int i=0; i<fullTypeName.length; i++){
+            char[] namePart = fullTypeName[i];
+            nameLength+= namePart.length;
+        }
+        
+        char [] result = null;
+        if( encodeType == ICSearchConstants.REFERENCES ){
+            //char[] has to be of size - [type decl length + length of the name + separators + letter]
+            result = new char[TYPE_REF.length + nameLength + fullTypeName.length + 1 ];
+            System.arraycopy(TYPE_REF, 0, result, 0, pos = TYPE_REF.length);
+        
+        } else if( encodeType == ICSearchConstants.DECLARATIONS ){
+            //char[] has to be of size - [type decl length + length of the name + separators + letter]
+            result = new char[TYPE_DECL.length + nameLength + fullTypeName.length + 1 ];
+            System.arraycopy(TYPE_DECL, 0, result, 0, pos = TYPE_DECL.length);
+        }
+        switch (typeType)
+        {
+            case(TYPE_CLASS):
+            result[pos++] = CLASS_SUFFIX;
+            break;
+            
+            case(TYPE_STRUCT):
+            result[pos++] = STRUCT_SUFFIX;
+            break;
+            
+            case(TYPE_UNION):
+            result[pos++] = UNION_SUFFIX;
+            break;
+            
+            case(TYPE_ENUM):
+            result[pos++] = ENUM_SUFFIX;
+            break;
+            
+            case (TYPE_VAR):
+            result[pos++] = VAR_SUFFIX;
+            break;
+            
+            case (TYPE_TYPEDEF):
+            result[pos++] = TYPEDEF_SUFFIX;
+            break;
+            
+            case(TYPE_DERIVED):
+            result[pos++]= DERIVED_SUFFIX;
+            break;
+            
+            case(TYPE_FRIEND):
+            result[pos++]= FRIEND_SUFFIX;
+            break;
+            
+            case(TYPE_FWD_CLASS):
+            result[pos++]= FWD_CLASS_SUFFIX;
+            break;
+            
+            case (TYPE_FWD_STRUCT):
+            result[pos++]= FWD_STRUCT_SUFFIX;
+            break;
+            
+            case (TYPE_FWD_UNION):
+            result[pos++]= FWD_UNION_SUFFIX;
+            break;
+        }
+        result[pos++] = SEPARATOR;
+        //Encode in the following manner
+        //  [typeDecl info]/[typeName]/[qualifiers]
+        if (fullTypeName.length > 0){
+        //Extract the name first
+            char [] tempName = fullTypeName[fullTypeName.length-1];
+            System.arraycopy(tempName, 0, result, pos, tempName.length);
+            pos += tempName.length;
+        }
+        //Extract the qualifiers
+        for (int i=fullTypeName.length - 2; i >= 0; i--){
+            result[pos++] = SEPARATOR;
+            char [] tempName = fullTypeName[i];
+            System.arraycopy(tempName, 0, result, pos, tempName.length);
+            pos+=tempName.length;               
+        }
+        
+        if (AbstractIndexer.VERBOSE)
+            AbstractIndexer.verbose(new String(result));
+            
+        return result;
+    }
+     /**
+      * Namespace entries are encoded as follow: '[prefix]/' TypeName ['/' Qualifier]*
+      */
+     protected static final char[] encodeEntry(char[][] elementName, char[] prefix, int prefixSize){ 
+         int pos, nameLength = 0;
+         for (int i=0; i<elementName.length; i++){
+             char[] namePart = elementName[i];
+             nameLength+= namePart.length;
+         }
+         //char[] has to be of size - [type length + length of the name (including qualifiers) + 
+         //separators (need one less than fully qualified name length)
+         char[] result = new char[prefixSize + nameLength + elementName.length - 1 ];
+         System.arraycopy(prefix, 0, result, 0, pos = prefix.length);
+         if (elementName.length > 0){
+         //Extract the name first
+             char [] tempName = elementName[elementName.length-1];
+             System.arraycopy(tempName, 0, result, pos, tempName.length);
+             pos += tempName.length;
+         }
+         //Extract the qualifiers
+         for (int i=elementName.length - 2; i>=0; i--){
+             result[pos++] = SEPARATOR;
+             char [] tempName = elementName[i];
+             System.arraycopy(tempName, 0, result, pos, tempName.length);
+             pos+=tempName.length;               
+         }
+         
+         if (AbstractIndexer.VERBOSE)
+             AbstractIndexer.verbose(new String(result));
+             
+         return result;
+     }
+
+ 	public static final char[] bestTypePrefix( SearchFor searchFor, LimitTo limitTo, char[] typeName, char[][] containingTypes, int matchMode, boolean isCaseSensitive) {
+		char [] prefix = null;
+		if( limitTo == DECLARATIONS ){
+			prefix = TYPE_DECL;
+		} else if( limitTo == REFERENCES ){
+			prefix = TYPE_REF;
+		} else {
+			return TYPE_ALL;
+		}
+					
+		char classType = 0;
+		
+		if( searchFor == ICSearchConstants.CLASS ){
+			classType = CLASS_SUFFIX;
+		} else if ( searchFor == ICSearchConstants.STRUCT ){
+			classType = STRUCT_SUFFIX;
+		} else if ( searchFor == ICSearchConstants.UNION ){
+			classType = UNION_SUFFIX;
+		} else if ( searchFor == ICSearchConstants.ENUM ){
+			classType = ENUM_SUFFIX;
+		} else if ( searchFor == ICSearchConstants.TYPEDEF ){
+			classType = TYPEDEF_SUFFIX;
+		} else if ( searchFor == ICSearchConstants.DERIVED){
+			classType = DERIVED_SUFFIX;
+		} else if ( searchFor == ICSearchConstants.FRIEND){
+			classType = FRIEND_SUFFIX;
+		} else if ( searchFor == ICSearchConstants.FWD_CLASS) {
+			classType = FWD_CLASS_SUFFIX;
+		} else if ( searchFor == ICSearchConstants.FWD_STRUCT) {
+			classType = FWD_STRUCT_SUFFIX;
+		} else if ( searchFor == ICSearchConstants.FWD_UNION) {
+			classType = FWD_UNION_SUFFIX;
+		} else {
+			//could be TYPE or CLASS_STRUCT, best we can do for these is the prefix
+			return prefix;
+		}
+		
+		return bestPrefix( prefix, classType, typeName, containingTypes, matchMode, isCaseSensitive );
+	}
+	
+	public static final char[] bestNamespacePrefix(LimitTo limitTo, char[] namespaceName, char[][] containingTypes, int matchMode, boolean isCaseSensitive) {
+		char [] prefix = null;
+		if( limitTo == REFERENCES ){
+			prefix = NAMESPACE_REF;
+		} else if ( limitTo == DECLARATIONS ) {
+			prefix = NAMESPACE_DECL;
+		} else {
+			return NAMESPACE_ALL;
+		}
+		
+		return bestPrefix( prefix, (char) 0, namespaceName, containingTypes, matchMode, isCaseSensitive );
+	}	
+		
+	public static final char[] bestVariablePrefix( LimitTo limitTo, char[] varName, char[][] containingTypes, int matchMode, boolean isCaseSenstive ){
+		char [] prefix = null;
+		if( limitTo == REFERENCES ){
+			prefix = TYPE_REF;
+		} else if( limitTo == DECLARATIONS ){
+			prefix = TYPE_DECL;
+		} else {
+			return TYPE_ALL;
+		}
+		
+		return bestPrefix( prefix, VAR_SUFFIX, varName, containingTypes, matchMode, isCaseSenstive );	
+	}
+
+	public static final char[] bestFieldPrefix( LimitTo limitTo, char[] fieldName,char[][] containingTypes, int matchMode, boolean isCaseSensitive) {
+		char [] prefix = null;
+		if( limitTo == REFERENCES ){
+			prefix = FIELD_REF;
+		} else if( limitTo == DECLARATIONS ){
+			prefix = FIELD_DECL;
+		} else {
+			return FIELD_ALL;
+		}
+		
+		return bestPrefix( prefix, (char)0, fieldName, containingTypes, matchMode, isCaseSensitive );
+	}  
+	
+	public static final char[] bestEnumeratorPrefix( LimitTo limitTo, char[] enumeratorName,char[][] containingTypes, int matchMode, boolean isCaseSensitive) {
+		char [] prefix = null;
+		if( limitTo == REFERENCES ){
+			prefix = ENUMTOR_REF;
+		} else if( limitTo == DECLARATIONS ){
+			prefix = ENUMTOR_DECL;
+		} else if (limitTo == ALL_OCCURRENCES){
+			return ENUMTOR_ALL;
+		}
+		else {
+			//Definitions
+			return "noEnumtorDefs".toCharArray(); //$NON-NLS-1$
+		}
+		
+		return bestPrefix( prefix, (char)0, enumeratorName, containingTypes, matchMode, isCaseSensitive );
+	}  
+
+	public static final char[] bestMethodPrefix( LimitTo limitTo, char[] methodName,char[][] containingTypes, int matchMode, boolean isCaseSensitive) {
+		char [] prefix = null;
+		if( limitTo == REFERENCES ){
+			prefix = METHOD_REF;
+		} else if( limitTo == DECLARATIONS ){
+			prefix = METHOD_DECL;
+		} else if( limitTo == DEFINITIONS ){
+			//TODO prefix = METHOD_DEF;
+			return METHOD_ALL;	
+		} else {
+			return METHOD_ALL;
+		}
+		
+		return bestPrefix( prefix, (char)0, methodName, containingTypes, matchMode, isCaseSensitive );
+	}  
+	
+	public static final char[] bestFunctionPrefix( LimitTo limitTo, char[] functionName, int matchMode, boolean isCaseSensitive) {
+		char [] prefix = null;
+		if( limitTo == REFERENCES ){
+			prefix = FUNCTION_REF;
+		} else if( limitTo == DECLARATIONS ){
+			prefix = FUNCTION_DECL;
+		} else if ( limitTo == DEFINITIONS ){
+			//TODO prefix = FUNCTION_DEF;
+			return FUNCTION_ALL;
+		} else {
+			return FUNCTION_ALL;
+		}
+		return bestPrefix( prefix, (char)0, functionName, null, matchMode, isCaseSensitive );
+	}  
+		
+	public static final char[] bestPrefix( char [] prefix, char optionalType, char[] name, char[][] containingTypes, int matchMode, boolean isCaseSensitive) {
+		char[] 	result = null;
+		int 	pos    = 0;
+		
+		int wildPos, starPos = -1, questionPos;
+		
+		//length of prefix + separator
+		int length = prefix.length;
+		
+		//add length for optional type + another separator
+		if( optionalType != 0 )
+			length += 2;
+		
+		if (!isCaseSensitive){
+			//index is case sensitive, thus in case attempting case insensitive search, cannot consider
+			//type name.
+			name = null;
+		} else if( matchMode == PATTERN_MATCH && name != null ){
+			int start = 0;
+
+			char [] temp = new char [ name.length ];
+			boolean isEscaped = false;
+			int tmpIdx = 0;
+			for( int i = 0; i < name.length; i++ ){
+				if( name[i] == '\\' ){
+					if( !isEscaped ){
+						isEscaped = true;
+						continue;
+					} 
+					isEscaped = false;		
+				} else if( name[i] == '*' && !isEscaped ){
+					starPos = i;
+					break;
+				} 
+				temp[ tmpIdx++ ] = name[i];
+			}
+			
+			name = new char [ tmpIdx ];
+			System.arraycopy( temp, 0, name, 0, tmpIdx );				
+		
+			//starPos = CharOperation.indexOf( '*', name );
+			questionPos = CharOperation.indexOf( '?', name );
+
+			if( starPos >= 0 ){
+				if( questionPos >= 0 )
+					wildPos = ( starPos < questionPos ) ? starPos : questionPos;
+				else 
+					wildPos = starPos;
+			} else {
+				wildPos = questionPos;
+			}
+			 
+			switch( wildPos ){
+				case -1 : break;
+				case 0  : name = null;	break;
+				default : name = CharOperation.subarray( name, 0, wildPos ); break;
+			}
+		}
+		//add length for name
+		if( name != null ){
+			length += name.length;
+		} else {
+			//name is null, don't even consider qualifications.
+			result = new char [ length ];
+			System.arraycopy( prefix, 0, result, 0, pos = prefix.length );
+			if( optionalType != 0){
+				result[ pos++ ] = optionalType;
+				result[ pos++ ] = SEPARATOR; 
+			}
+			return result;
+		}
+		 		
+		//add the total length of the qualifiers
+		//we don't want to mess with the contents of this array (treat it as constant)
+		//so check for wild cards later.
+		if( containingTypes != null ){
+			for( int i = 0; i < containingTypes.length; i++ ){
+				if( containingTypes[i].length > 0 ){
+					length += containingTypes[ i ].length;
+					length++; //separator
+				}
+			}
+		}
+		
+		//because we haven't checked qualifier wild cards yet, this array might turn out
+		//to be too long. So fill a temp array, then check the length after
+		char [] temp = new char [ length ];
+		
+		System.arraycopy( prefix, 0, temp, 0, pos = prefix.length );
+		
+		if( optionalType != 0 ){
+			temp[ pos++ ] = optionalType;
+			temp[ pos++ ] = SEPARATOR;
+		}
+		
+		System.arraycopy( name, 0, temp, pos, name.length );
+		pos += name.length;
+		
+		if( containingTypes != null ){
+			for( int i = containingTypes.length - 1; i >= 0; i-- ){
+				if( matchMode == PATTERN_MATCH ){
+					starPos     = CharOperation.indexOf( '*', containingTypes[i] );
+					questionPos = CharOperation.indexOf( '?', containingTypes[i] );
+
+					if( starPos >= 0 ){
+						if( questionPos >= 0 )
+							wildPos = ( starPos < questionPos ) ? starPos : questionPos;
+						else 
+							wildPos = starPos;
+					} else {
+						wildPos = questionPos;
+					}
+					
+					if( wildPos >= 0 ){
+						temp[ pos++ ] = SEPARATOR;
+						System.arraycopy( containingTypes[i], 0, temp, pos, wildPos );
+						pos += starPos;
+						break;
+					}
+				}
+				
+				if( containingTypes[i].length > 0 ){
+					temp[ pos++ ] = SEPARATOR;
+					System.arraycopy( containingTypes[i], 0, temp, pos, containingTypes[i].length );
+					pos += containingTypes[i].length;
+				}
+			}
+		}
+	
+		if( pos < length ){
+			result = new char[ pos ];
+			System.arraycopy( temp, 0, result, 0, pos );	
+		} else {
+			result = temp;
+		}
+		
+		return result;
+	}
+
+	/**
+	 * @param _limitTo
+	 * @param simpleName
+	 * @param _matchMode
+	 * @param _caseSensitive
+	 * @return
+	 */
+	public static final char[] bestMacroPrefix( LimitTo limitTo, char[] macroName, int matchMode, boolean isCaseSenstive ){
+		//since we only index macro declarations we already know the prefix
+		char [] prefix = null;
+		if( limitTo == DECLARATIONS ){
+			prefix = MACRO_DECL;
+		} else {
+			return null;
+		}
+		
+		return bestPrefix( prefix,  (char)0, macroName, null, matchMode, isCaseSenstive );	
+	}
+	
+	/**
+	 * @param _limitTo
+	 * @param simpleName
+	 * @param _matchMode
+	 * @param _caseSensitive
+	 * @return
+	 */
+	public static final char[] bestIncludePrefix( LimitTo limitTo, char[] incName, int matchMode, boolean isCaseSenstive ){
+		//since we only index macro declarations we already know the prefix
+		char [] prefix = null;
+		if( limitTo == REFERENCES ){
+			prefix = INCLUDE_REF;
+		} else {
+			return null;
+		}
+		
+		return bestPrefix( prefix,  (char)0, incName, null, matchMode, isCaseSenstive );	
+	}
+
+	public void addEnumtorDecl(int indexedFileNumber, char[][] name, int offset, int offsetLength, int offsetType) {
+	    addRef(indexedFileNumber,  name, ENUMTOR_DECL, ENUMTOR_DECL.length, offset,offsetLength, ICIndexStorageConstants.OFFSET);
+	}
+	
+	public void addEnumtorRef(int indexedFileNumber, char[][] name, int offset, int offsetLength, int offsetType) {
+	    addRef(indexedFileNumber,  name, ENUMTOR_REF, ENUMTOR_REF.length, offset,offsetLength, ICIndexStorageConstants.OFFSET);
+	}
+	
+	public void addMacroDecl(int indexedFileNumber, char[][] name, int offset, int offsetLength, int offsetType) {
+	    addRef(indexedFileNumber,  name, MACRO_DECL, MACRO_DECL.length, offset,offsetLength, ICIndexStorageConstants.OFFSET);
+	}
+	
+	public void addMacroRef(int indexedFileNumber, char[][] name, int offset, int offsetLength, int offsetType) {
+	    addRef(indexedFileNumber,  name, MACRO_REF, MACRO_REF.length, offset,offsetLength, ICIndexStorageConstants.OFFSET);
+	}
+	
+	public void addFieldDecl(int indexedFileNumber, char[][] name, int offset, int offsetLength, int offsetType) {
+	    addRef(indexedFileNumber,  name, FIELD_DECL, FIELD_DECL.length, offset,offsetLength, ICIndexStorageConstants.OFFSET);
+	}
+	
+	public void addFieldRef(int indexedFileNumber, char[][] name, int offset, int offsetLength, int offsetType) {
+	    addRef(indexedFileNumber,  name, FIELD_REF, FIELD_REF.length, offset,offsetLength, ICIndexStorageConstants.OFFSET);
+	}
+	
+	public void addMethodDecl(int indexedFileNumber, char[][] name, int offset, int offsetLength, int offsetType) {
+	    addRef(indexedFileNumber,  name, METHOD_DECL, METHOD_DECL.length, offset,offsetLength, ICIndexStorageConstants.OFFSET);
+	}
+	
+	public void addMethodRef(int indexedFileNumber, char[][] name, int offset, int offsetLength, int offsetType) {
+	    addRef(indexedFileNumber,  name, METHOD_REF, METHOD_REF.length, offset,offsetLength, ICIndexStorageConstants.OFFSET);
+	}
+	
+	public void addFunctionDecl(int indexedFileNumber, char[][] name, int offset, int offsetLength, int offsetType) {
+	    addRef(indexedFileNumber,  name, FUNCTION_DECL, FUNCTION_DECL.length, offset,offsetLength, ICIndexStorageConstants.OFFSET);
+	}
+	
+	public void addFunctionRef(int indexedFileNumber, char[][] name, int offset, int offsetLength, int offsetType) {
+	    addRef(indexedFileNumber,  name, FUNCTION_REF, FUNCTION_REF.length, offset,offsetLength, ICIndexStorageConstants.OFFSET);
+	}
+	
+	public void addNamespaceDecl(int indexedFileNumber, char[][] name, int offset, int offsetLength, int offsetType) {
+	    addRef(indexedFileNumber,  name, NAMESPACE_DECL, NAMESPACE_DECL.length, offset,offsetLength, ICIndexStorageConstants.OFFSET);
+	}
+	
+	public void addNamespaceRef(int indexedFileNumber, char[][] name, int offset, int offsetLength, int offsetType) {
+	    addRef(indexedFileNumber,  name, NAMESPACE_REF, NAMESPACE_REF.length, offset,offsetLength, ICIndexStorageConstants.OFFSET);
+	}
+	
+	public void addIncludeRef(int indexedFileNumber, char[][] name, int offset, int offsetLength, int offsetType) {
+	    addRef(indexedFileNumber,  name, INCLUDE_REF, INCLUDE_REF.length, offset,offsetLength, ICIndexStorageConstants.OFFSET);
+	}
+
+	public void addStructDecl(int indexedFileNumber, char[][] name, int offset, int offsetLength, int offsetType) {
+		addRef(indexedFileNumber,  name, ICIndexStorageConstants.TYPE_STRUCT , ICSearchConstants.DECLARATIONS, offset,offsetLength, ICIndexStorageConstants.OFFSET);
+	}
+
+	public void addStructRef(int indexedFileNumber, char[][] name, int offset, int offsetLength, int offsetType) {
+		addRef(indexedFileNumber,  name, ICIndexStorageConstants.TYPE_STRUCT , ICSearchConstants.REFERENCES, offset,offsetLength, ICIndexStorageConstants.OFFSET);
+	}
+
+	public void addTypedefDecl(int indexedFileNumber, char[][] name, int offset, int offsetLength, int offsetType) {
+		addRef(indexedFileNumber,  name, ICIndexStorageConstants.TYPE_TYPEDEF, ICSearchConstants.DECLARATIONS, offset,offsetLength, ICIndexStorageConstants.OFFSET);
+	}
+
+	public void addTypedefRef(int indexedFileNumber, char[][] name, int offset, int offsetLength, int offsetType) {
+		addRef(indexedFileNumber,  name, ICIndexStorageConstants.TYPE_TYPEDEF, ICSearchConstants.REFERENCES, offset,offsetLength, ICIndexStorageConstants.OFFSET);
+	}
+
+	public void addUnionDecl(int indexedFileNumber, char[][] name, int offset, int offsetLength, int offsetType) {
+		addRef(indexedFileNumber,  name, ICIndexStorageConstants.TYPE_UNION, ICSearchConstants.DECLARATIONS, offset,offsetLength, ICIndexStorageConstants.OFFSET);
+	}
+
+	public void addUnionRef(int indexedFileNumber, char[][] name, int offset, int offsetLength, int offsetType) {
+		addRef(indexedFileNumber,  name, ICIndexStorageConstants.TYPE_UNION, ICSearchConstants.REFERENCES, offset,offsetLength, ICIndexStorageConstants.OFFSET);
+	}
+
+	public void addVariableDecl(int indexedFileNumber, char[][] name, int offset, int offsetLength, int offsetType) {
+		addRef(indexedFileNumber,  name, ICIndexStorageConstants.TYPE_VAR, ICSearchConstants.DECLARATIONS, offset,offsetLength, ICIndexStorageConstants.OFFSET);
+	}
+
+	public void addVariableRef(int indexedFileNumber, char[][] name, int offset, int offsetLength, int offsetType) {
+		addRef(indexedFileNumber,  name, ICIndexStorageConstants.TYPE_VAR, ICSearchConstants.REFERENCES, offset,offsetLength, ICIndexStorageConstants.OFFSET);
+	}
+	
+	public void addClassDecl(int indexedFileNumber, char[][] name, int offset, int offsetLength, int offsetType) {
+		addRef(indexedFileNumber,  name, ICIndexStorageConstants.TYPE_CLASS, ICSearchConstants.DECLARATIONS, offset,offsetLength, ICIndexStorageConstants.OFFSET);
+	}
+
+	public void addClassRef(int indexedFileNumber, char[][] name, int offset, int offsetLength, int offsetType) {
+		addRef(indexedFileNumber,  name, ICIndexStorageConstants.TYPE_CLASS, ICSearchConstants.REFERENCES, offset,offsetLength, ICIndexStorageConstants.OFFSET);
+	}
+	
+	public void addEnumDecl(int indexedFileNumber, char[][] name, int offset, int offsetLength, int offsetType) {
+		addRef(indexedFileNumber,  name, ICIndexStorageConstants.TYPE_ENUM, ICSearchConstants.DECLARATIONS, offset,offsetLength, ICIndexStorageConstants.OFFSET);
+	}
+
+	public void addEnumRef(int indexedFileNumber, char[][] name, int offset, int offsetLength, int offsetType) {
+		addRef(indexedFileNumber,  name, ICIndexStorageConstants.TYPE_ENUM, ICSearchConstants.REFERENCES, offset,offsetLength, ICIndexStorageConstants.OFFSET);
+	}
+	
+	public void addDerivedDecl(int indexedFileNumber, char[][] name, int offset, int offsetLength, int offsetType) {
+		addRef(indexedFileNumber,  name, ICIndexStorageConstants.TYPE_DERIVED, ICSearchConstants.DECLARATIONS, offset,offsetLength, ICIndexStorageConstants.OFFSET);
+	}
+
+	public void addDerivedRef(int indexedFileNumber, char[][] name, int offset, int offsetLength, int offsetType) {
+		addRef(indexedFileNumber,  name, ICIndexStorageConstants.TYPE_DERIVED, ICSearchConstants.REFERENCES, offset,offsetLength, ICIndexStorageConstants.OFFSET);
+	}
+	
+	public void addFriendDecl(int indexedFileNumber, char[][] name, int offset, int offsetLength, int offsetType) {
+		addRef(indexedFileNumber,  name, ICIndexStorageConstants.TYPE_FRIEND, ICSearchConstants.DECLARATIONS, offset,offsetLength, ICIndexStorageConstants.OFFSET);
+	}
+
+	public void addFriendRef(int indexedFileNumber, char[][] name, int offset, int offsetLength, int offsetType) {
+		addRef(indexedFileNumber,  name, ICIndexStorageConstants.TYPE_FRIEND, ICSearchConstants.REFERENCES, offset,offsetLength, ICIndexStorageConstants.OFFSET);
+	}
 	
+	public void addVarDecl(int indexedFileNumber, char[][] name, int offset, int offsetLength, int offsetType) {
+		addRef(indexedFileNumber,  name, ICIndexStorageConstants.TYPE_VAR, ICSearchConstants.DECLARATIONS, offset,offsetLength, ICIndexStorageConstants.OFFSET);
+	}
+
+	public void addVarRef(int indexedFileNumber, char[][] name, int offset, int offsetLength, int offsetType) {
+		addRef(indexedFileNumber,  name, ICIndexStorageConstants.TYPE_VAR, ICSearchConstants.REFERENCES, offset,offsetLength, ICIndexStorageConstants.OFFSET);
+	}
+	
+	public void addFwd_ClassDecl(int indexedFileNumber, char[][] name, int offset, int offsetLength, int offsetType) {
+		addRef(indexedFileNumber,  name, ICIndexStorageConstants.TYPE_FWD_CLASS, ICSearchConstants.DECLARATIONS, offset,offsetLength, ICIndexStorageConstants.OFFSET);
+	}
+
+	public void addFwd_ClassRef(int indexedFileNumber, char[][] name, int offset, int offsetLength, int offsetType) {
+		addRef(indexedFileNumber,  name, ICIndexStorageConstants.TYPE_FWD_CLASS, ICSearchConstants.REFERENCES, offset,offsetLength, ICIndexStorageConstants.OFFSET);
+	}
+	
+	public void addFwd_StructDecl(int indexedFileNumber, char[][] name, int offset, int offsetLength, int offsetType) {
+		addRef(indexedFileNumber,  name, ICIndexStorageConstants.TYPE_FWD_STRUCT, ICSearchConstants.DECLARATIONS, offset,offsetLength, ICIndexStorageConstants.OFFSET);
+	}
+
+	public void addFwd_StructRef(int indexedFileNumber, char[][] name, int offset, int offsetLength, int offsetType) {
+		addRef(indexedFileNumber,  name, ICIndexStorageConstants.TYPE_FWD_STRUCT, ICSearchConstants.REFERENCES, offset,offsetLength, ICIndexStorageConstants.OFFSET);
+	}
+	
+	public void addFwd_UnionDecl(int indexedFileNumber, char[][] name, int offset, int offsetLength, int offsetType) {
+		addRef(indexedFileNumber,  name, ICIndexStorageConstants.TYPE_FWD_UNION, ICSearchConstants.DECLARATIONS, offset,offsetLength, ICIndexStorageConstants.OFFSET);
+	}
+
+	public void addFwd_UnionRef(int indexedFileNumber, char[][] name, int offset, int offsetLength, int offsetType) {
+		addRef(indexedFileNumber,  name, ICIndexStorageConstants.TYPE_FWD_UNION, ICSearchConstants.REFERENCES, offset,offsetLength, ICIndexStorageConstants.OFFSET);
+	}
 }
Index: index/org/eclipse/cdt/internal/core/index/ctagsindexer/CTagsConsoleParser.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/index/ctagsindexer/CTagsConsoleParser.java,v
retrieving revision 1.5
diff -u -r1.5 CTagsConsoleParser.java
--- index/org/eclipse/cdt/internal/core/index/ctagsindexer/CTagsConsoleParser.java	7 Apr 2005 20:33:22 -0000	1.5
+++ index/org/eclipse/cdt/internal/core/index/ctagsindexer/CTagsConsoleParser.java	19 Apr 2005 17:43:12 -0000
@@ -16,9 +16,6 @@
 import org.eclipse.cdt.core.search.ICSearchConstants;
 import org.eclipse.cdt.internal.core.index.cindexstorage.ICIndexStorageConstants;
 import org.eclipse.cdt.internal.core.index.cindexstorage.IndexedFileEntry;
-import org.eclipse.cdt.internal.core.index.domsourceindexer.IndexEncoderUtil;
-import org.eclipse.cdt.internal.core.search.indexing.IIndexEncodingConstants;
-import org.eclipse.cdt.internal.core.search.indexing.IIndexEncodingConstants.EntryType;
 
 /**
  * @author Bogdan Gheorghe
@@ -76,7 +73,6 @@
      * @param tempTag
      */
     private void encodeTag(CTagEntry tempTag) {
-        EntryType entryType = null;
     	String kind = (String)tempTag.tagExtensionField.get(KIND);
     
     	if (kind == null)
@@ -84,40 +80,36 @@
     	
     	char[][] fullName = getQualifiedName(tempTag);
     	ICSearchConstants.LimitTo type = ICSearchConstants.DECLARATIONS;
+    	int lineNumber = Integer.parseInt( (String)tempTag.tagExtensionField.get(LINE) );
     	
     	if (kind.equals(CLASS)){
-    	    entryType = IIndexEncodingConstants.CLASS;
+    		indexer.getOutput().addClassDecl(getFileNumber(), fullName, lineNumber, 1, ICIndexStorageConstants.LINE);
     	} else if (kind.equals(MACRO)){
-    	    entryType = IIndexEncodingConstants.MACRO;
+    		indexer.getOutput().addMacroDecl(getFileNumber(), fullName, lineNumber, 1, ICIndexStorageConstants.LINE);
     	} else if (kind.equals(ENUMERATOR)){
-    	    entryType = IIndexEncodingConstants.ENUMERATOR;
+    		indexer.getOutput().addEnumtorDecl(getFileNumber(), fullName, lineNumber, 1, ICIndexStorageConstants.LINE);
     	} else if (kind.equals(FUNCTION)){
-    	    entryType = IIndexEncodingConstants.FUNCTION;
+    		indexer.getOutput().addFunctionDecl(getFileNumber(), fullName, lineNumber, 1, ICIndexStorageConstants.LINE);
     	} else if (kind.equals(ENUM)){
-    	    entryType = IIndexEncodingConstants.ENUM;
+    		indexer.getOutput().addEnumDecl(getFileNumber(), fullName, lineNumber, 1, ICIndexStorageConstants.LINE);
     	} else if (kind.equals(MEMBER)){
-    	    entryType = IIndexEncodingConstants.FIELD;
+    		indexer.getOutput().addFieldDecl(getFileNumber(), fullName, lineNumber, 1, ICIndexStorageConstants.LINE);
     	} else if (kind.equals(NAMESPACE)){
-    	    entryType = IIndexEncodingConstants.NAMESPACE;
+    		indexer.getOutput().addNamespaceDecl(getFileNumber(), fullName, lineNumber, 1, ICIndexStorageConstants.LINE);
     	} else if (kind.equals(PROTOTYPE)){
-    	    entryType = IIndexEncodingConstants.FUNCTION;
+    		indexer.getOutput().addFunctionDecl(getFileNumber(), fullName, lineNumber, 1, ICIndexStorageConstants.LINE);
     	    //type = ICSearchConstants.DEFINITIONS;
     	} else if (kind.equals(STRUCT)){
-    	    entryType = IIndexEncodingConstants.STRUCT;
+    		indexer.getOutput().addStructDecl(getFileNumber(), fullName, lineNumber, 1, ICIndexStorageConstants.LINE);
     	} else if (kind.equals(TYPEDEF)){
-    	    entryType = IIndexEncodingConstants.TYPEDEF;
+    		indexer.getOutput().addTypedefDecl(getFileNumber(), fullName, lineNumber, 1, ICIndexStorageConstants.LINE);
     	} else if (kind.equals(UNION)){
-    	    entryType = IIndexEncodingConstants.UNION;
+    		indexer.getOutput().addUnionDecl(getFileNumber(), fullName, lineNumber, 1, ICIndexStorageConstants.LINE);
     	} else if (kind.equals(VARIABLE)){
-    	    entryType = IIndexEncodingConstants.VAR;
+    		indexer.getOutput().addVariableDecl(getFileNumber(), fullName, lineNumber, 1, ICIndexStorageConstants.LINE);
     	} else if (kind.equals(EXTERNALVAR)){
     	
     	}
-    
-    	String lineNumber = (String)tempTag.tagExtensionField.get(LINE);
-    	
-    	if (entryType != null)
-    	    indexer.getOutput().addRef(getFileNumber(),IndexEncoderUtil.encodeEntry(fullName,entryType,type), Integer.parseInt(lineNumber), 1, ICIndexStorageConstants.LINE);
     }
 
     /**
Index: index/org/eclipse/cdt/internal/core/index/ctagsindexer/CTagsFileReader.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/index/ctagsindexer/CTagsFileReader.java,v
retrieving revision 1.5
diff -u -r1.5 CTagsFileReader.java
--- index/org/eclipse/cdt/internal/core/index/ctagsindexer/CTagsFileReader.java	9 Apr 2005 18:43:03 -0000	1.5
+++ index/org/eclipse/cdt/internal/core/index/ctagsindexer/CTagsFileReader.java	19 Apr 2005 17:43:12 -0000
@@ -18,16 +18,11 @@
 import java.util.List;
 
 import org.eclipse.cdt.core.CCorePlugin;
-import org.eclipse.cdt.core.search.ICSearchConstants;
 import org.eclipse.cdt.internal.core.index.IIndex;
 import org.eclipse.cdt.internal.core.index.IIndexer;
 import org.eclipse.cdt.internal.core.index.IIndexerOutput;
 import org.eclipse.cdt.internal.core.index.cindexstorage.ICIndexStorageConstants;
 import org.eclipse.cdt.internal.core.index.cindexstorage.IndexedFileEntry;
-import org.eclipse.cdt.internal.core.index.domsourceindexer.IndexEncoderUtil;
-import org.eclipse.cdt.internal.core.search.indexing.IIndexConstants;
-import org.eclipse.cdt.internal.core.search.indexing.IIndexEncodingConstants;
-import org.eclipse.cdt.internal.core.search.indexing.IIndexEncodingConstants.EntryType;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IProject;
 
@@ -97,7 +92,7 @@
 		} catch (IOException e){}
 	}
 	
-	class MiniIndexer implements IIndexer, IIndexConstants {
+	class MiniIndexer implements IIndexer {
 		
 	    IIndexerOutput output;
 	    IFile currentFile;
@@ -116,40 +111,35 @@
 	        if (mainIndexFile != null)
 				fileNum = mainIndexFile.getFileID();
 			
-	        EntryType entryType = null;
 	        
-	    	ICSearchConstants.LimitTo type = ICSearchConstants.DECLARATIONS;
-	        
-	        if (kind.equals(CTagsConsoleParser.CLASS)){
-	    	    entryType = IIndexEncodingConstants.CLASS;
+	    	if (kind.equals(CTagsConsoleParser.CLASS)){
+	    		output.addClassDecl(fileNum, fullName, lineNumber, 1, ICIndexStorageConstants.LINE);
 	    	} else if (kind.equals(CTagsConsoleParser.MACRO)){
-	    	    entryType = IIndexEncodingConstants.MACRO;
+	    		output.addMacroDecl(fileNum, fullName, lineNumber, 1, ICIndexStorageConstants.LINE);
 	    	} else if (kind.equals(CTagsConsoleParser.ENUMERATOR)){
-	    	    entryType = IIndexEncodingConstants.ENUMERATOR;
+	    		output.addEnumtorDecl(fileNum, fullName, lineNumber, 1, ICIndexStorageConstants.LINE);
 	    	} else if (kind.equals(CTagsConsoleParser.FUNCTION)){
-	    	    entryType = IIndexEncodingConstants.FUNCTION;
+	    		output.addFunctionDecl(fileNum, fullName, lineNumber, 1, ICIndexStorageConstants.LINE);
 	    	} else if (kind.equals(CTagsConsoleParser.ENUM)){
-	    	    entryType = IIndexEncodingConstants.ENUM;
+	    		output.addEnumDecl(fileNum, fullName, lineNumber, 1, ICIndexStorageConstants.LINE);
 	    	} else if (kind.equals(CTagsConsoleParser.MEMBER)){
-	    	    entryType = IIndexEncodingConstants.FIELD;
+	    		output.addFieldDecl(fileNum, fullName, lineNumber, 1, ICIndexStorageConstants.LINE);
 	    	} else if (kind.equals(CTagsConsoleParser.NAMESPACE)){
-	    	    entryType = IIndexEncodingConstants.NAMESPACE;
+	    		output.addNamespaceDecl(fileNum, fullName, lineNumber, 1, ICIndexStorageConstants.LINE);
 	    	} else if (kind.equals(CTagsConsoleParser.PROTOTYPE)){
-	    	    entryType = IIndexEncodingConstants.FUNCTION;
+	    		output.addFunctionDecl(fileNum, fullName, lineNumber, 1, ICIndexStorageConstants.LINE);
+	    	    //type = ICSearchConstants.DEFINITIONS;
 	    	} else if (kind.equals(CTagsConsoleParser.STRUCT)){
-	    	    entryType = IIndexEncodingConstants.STRUCT;
+	    		output.addStructDecl(fileNum, fullName, lineNumber, 1, ICIndexStorageConstants.LINE);
 	    	} else if (kind.equals(CTagsConsoleParser.TYPEDEF)){
-	    	    entryType = IIndexEncodingConstants.TYPEDEF;
+	    		output.addTypedefDecl(fileNum, fullName, lineNumber, 1, ICIndexStorageConstants.LINE);
 	    	} else if (kind.equals(CTagsConsoleParser.UNION)){
-	    	    entryType = IIndexEncodingConstants.UNION;
+	    		output.addUnionDecl(fileNum, fullName, lineNumber, 1, ICIndexStorageConstants.LINE);
 	    	} else if (kind.equals(CTagsConsoleParser.VARIABLE)){
-	    	    entryType = IIndexEncodingConstants.VAR;
+	    		output.addVariableDecl(fileNum, fullName, lineNumber, 1, ICIndexStorageConstants.LINE);
 	    	} else if (kind.equals(CTagsConsoleParser.EXTERNALVAR)){
 	    	
 	    	}
-	    	
-	    	if (entryType != null)
-	    	    output.addRef(fileNum, IndexEncoderUtil.encodeEntry(fullName,entryType,type), lineNumber, 1, ICIndexStorageConstants.LINE);
 	    }
         /* (non-Javadoc)
          * @see org.eclipse.cdt.internal.core.index.IIndexer#index(org.eclipse.cdt.internal.core.index.IDocument, org.eclipse.cdt.internal.core.index.IIndexerOutput)
Index: index/org/eclipse/cdt/internal/core/index/domsourceindexer/CGenerateIndexVisitor.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/index/domsourceindexer/CGenerateIndexVisitor.java,v
retrieving revision 1.5
diff -u -r1.5 CGenerateIndexVisitor.java
--- index/org/eclipse/cdt/internal/core/index/domsourceindexer/CGenerateIndexVisitor.java	8 Apr 2005 19:35:43 -0000	1.5
+++ index/org/eclipse/cdt/internal/core/index/domsourceindexer/CGenerateIndexVisitor.java	19 Apr 2005 17:43:12 -0000
@@ -29,10 +29,7 @@
 import org.eclipse.cdt.core.dom.ast.ITypedef;
 import org.eclipse.cdt.core.dom.ast.IVariable;
 import org.eclipse.cdt.core.dom.ast.c.CASTVisitor;
-import org.eclipse.cdt.core.search.ICSearchConstants;
 import org.eclipse.cdt.internal.core.index.cindexstorage.ICIndexStorageConstants;
-import org.eclipse.cdt.internal.core.search.indexing.IIndexEncodingConstants;
-import org.eclipse.cdt.internal.core.search.indexing.IIndexEncodingConstants.EntryType;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.runtime.Path;
 
@@ -96,7 +93,12 @@
      * @throws DOMException
      */
     private void processName(IASTName name) throws DOMException {
-        IBinding binding = name.resolveBinding();
+        // Quick check to see if the name is a reference in an external header file
+		//if (IndexEncoderUtil.nodeInExternalHeader(name) && name.isReference())
+		if (IndexEncoderUtil.nodeInExternalHeader(name))
+			return;
+
+		IBinding binding = name.resolveBinding();
         // check for IProblemBinding
         if (binding instanceof IProblemBinding) {
             IProblemBinding problem = (IProblemBinding) binding;
@@ -107,6 +109,7 @@
             }
             return;
         }
+
         // Get the location
         IASTFileLocation loc = IndexEncoderUtil.getFileLocation(name);
         if (loc != null) {
@@ -140,59 +143,90 @@
      * @param indexFlag
      * @throws DOMException 
      */
+    
     private void processNameBinding(IASTName name, IBinding binding, IASTFileLocation loc, int fileNumber) throws DOMException {
         // determine type
-        EntryType entryType = null;
         if (binding instanceof ICompositeType) {
             int compositeKey = ((ICompositeType) binding).getKey();
             ASTNodeProperty prop = name.getPropertyInParent();
             switch (compositeKey) {
                 case ICompositeType.k_struct:
-                    entryType = IIndexEncodingConstants.STRUCT;
                     if (name.isDeclaration() && prop == IASTElaboratedTypeSpecifier.TYPE_NAME)
-                        entryType = IIndexEncodingConstants.FWD_STRUCT;
+                        if (name.isDeclaration()) {
+                            indexer.getOutput().addFwd_StructDecl(fileNumber, getFullyQualifiedName(name),loc.getNodeOffset(),loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
+                        }                   
+                        else if (name.isReference()) {
+                            indexer.getOutput().addFwd_StructRef(fileNumber, getFullyQualifiedName(name),loc.getNodeOffset(),loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
+                        }
+                    else
+                        if (name.isDeclaration()) {
+                            indexer.getOutput().addStructDecl(fileNumber, getFullyQualifiedName(name),loc.getNodeOffset(),loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
+                        }                   
+                        else if (name.isReference()) {
+                            indexer.getOutput().addStructRef(fileNumber, getFullyQualifiedName(name),loc.getNodeOffset(),loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
+                        }
                     break;
-                case ICompositeType.k_union:
-                    entryType = IIndexEncodingConstants.UNION;
+                case ICompositeType.k_union:     
                     if (name.isDeclaration() && prop == IASTElaboratedTypeSpecifier.TYPE_NAME)
-                        entryType = IIndexEncodingConstants.FWD_UNION;
+                        if (name.isDeclaration()) {
+                            indexer.getOutput().addFwd_UnionDecl(fileNumber, getFullyQualifiedName(name),loc.getNodeOffset(),loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
+                        }                   
+                        else if (name.isReference()) {
+                            indexer.getOutput().addFwd_UnionRef(fileNumber, getFullyQualifiedName(name),loc.getNodeOffset(),loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
+                        }
+                    else
+                        if (name.isDeclaration()) {
+                            indexer.getOutput().addUnionDecl(fileNumber, getFullyQualifiedName(name),loc.getNodeOffset(),loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
+                        }                   
+                        else if (name.isReference()) {
+                            indexer.getOutput().addUnionRef(fileNumber, getFullyQualifiedName(name),loc.getNodeOffset(),loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
+                        }
                     break;
             }
         }
         else if (binding instanceof IEnumeration)
-            entryType = IIndexEncodingConstants.ENUM;
+            if (name.isDeclaration()) {
+                indexer.getOutput().addEnumDecl(fileNumber, getFullyQualifiedName(name),loc.getNodeOffset(),loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
+            }                   
+            else if (name.isReference()) {
+                indexer.getOutput().addEnumRef(fileNumber, getFullyQualifiedName(name),loc.getNodeOffset(),loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
+            }
         else if (binding instanceof ITypedef)
-            entryType = IIndexEncodingConstants.TYPEDEF;
+            if (name.isDeclaration()) {
+                indexer.getOutput().addTypedefDecl(fileNumber, getFullyQualifiedName(name),loc.getNodeOffset(),loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
+            }                   
+            else if (name.isReference()) {
+                indexer.getOutput().addTypedefRef(fileNumber, getFullyQualifiedName(name),loc.getNodeOffset(),loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
+            }
         else if (binding instanceof IEnumerator)
-            entryType = IIndexEncodingConstants.ENUMERATOR;
+            if (name.isDeclaration()) {
+                indexer.getOutput().addEnumtorDecl(fileNumber, getFullyQualifiedName(name),loc.getNodeOffset(),loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
+            }                   
+            else if (name.isReference()) {
+                indexer.getOutput().addEnumtorRef(fileNumber, getFullyQualifiedName(name),loc.getNodeOffset(),loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
+            }
         else if (binding instanceof IField) 
-            entryType = IIndexEncodingConstants.FIELD;
+            if (name.isDeclaration()) {
+                indexer.getOutput().addFieldDecl(fileNumber, getFullyQualifiedName(name),loc.getNodeOffset(),loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
+            }                   
+            else if (name.isReference()) {
+                indexer.getOutput().addFieldRef(fileNumber, getFullyQualifiedName(name),loc.getNodeOffset(),loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
+            }
         else if (binding instanceof IParameter ||
                  binding instanceof IVariable) 
-            entryType = IIndexEncodingConstants.VAR;
+            if (name.isDeclaration()) {
+                indexer.getOutput().addVarDecl(fileNumber, getFullyQualifiedName(name),loc.getNodeOffset(),loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
+            }                   
+            else if (name.isReference()) {
+                indexer.getOutput().addVarRef(fileNumber, getFullyQualifiedName(name),loc.getNodeOffset(),loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
+            }
         else if (binding instanceof IFunction)
-            entryType = IIndexEncodingConstants.FUNCTION;
-        
-        if (entryType != null) {
             if (name.isDeclaration()) {
-                indexer.getOutput().addRef(fileNumber,IndexEncoderUtil.encodeEntry(
-                            getFullyQualifiedName(name),
-                            entryType,
-                            ICSearchConstants.DECLARATIONS),
-                        loc.getNodeOffset(),
-                        loc.getNodeLength(),
-                        ICIndexStorageConstants.OFFSET);
-            }                   
-            else if (name.isReference()) {
-                indexer.getOutput().addRef(fileNumber, IndexEncoderUtil.encodeEntry(
-                            getFullyQualifiedName(name),
-                            entryType,
-                            ICSearchConstants.REFERENCES),
-                        loc.getNodeOffset(),
-                        loc.getNodeLength(),
-                        ICIndexStorageConstants.OFFSET);
+                indexer.getOutput().addFunctionDecl(fileNumber, getFullyQualifiedName(name),loc.getNodeOffset(),loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
+            }                   
+            else if (name.isReference()) {
+                indexer.getOutput().addFunctionRef(fileNumber, getFullyQualifiedName(name),loc.getNodeOffset(),loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
             }
-        }
     }
 
     /**
Index: index/org/eclipse/cdt/internal/core/index/domsourceindexer/CPPGenerateIndexVisitor.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/index/domsourceindexer/CPPGenerateIndexVisitor.java,v
retrieving revision 1.4
diff -u -r1.4 CPPGenerateIndexVisitor.java
--- index/org/eclipse/cdt/internal/core/index/domsourceindexer/CPPGenerateIndexVisitor.java	8 Apr 2005 15:52:28 -0000	1.4
+++ index/org/eclipse/cdt/internal/core/index/domsourceindexer/CPPGenerateIndexVisitor.java	19 Apr 2005 17:43:13 -0000
@@ -37,11 +37,7 @@
 import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespace;
 import org.eclipse.cdt.core.dom.ast.cpp.ICPPUsingDeclaration;
 import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier.ICPPASTBaseSpecifier;
-import org.eclipse.cdt.core.search.ICSearchConstants;
-import org.eclipse.cdt.core.search.ICSearchConstants.LimitTo;
 import org.eclipse.cdt.internal.core.index.cindexstorage.ICIndexStorageConstants;
-import org.eclipse.cdt.internal.core.search.indexing.IIndexEncodingConstants;
-import org.eclipse.cdt.internal.core.search.indexing.IIndexEncodingConstants.EntryType;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.runtime.Path;
 
@@ -127,7 +123,7 @@
             //or if it occurs in another file
             int indexFlag = IndexEncoderUtil.calculateIndexFlags(indexer, loc);
     
-            processNameBinding(name, binding, loc, indexFlag, null); // function will determine limitTo
+            processNameBinding(name, binding, loc, indexFlag); // function will determine Ref or Decl
         }
     }
 
@@ -154,62 +150,109 @@
      * @param limitTo 
      * @throws DOMException
      */
-    private void processNameBinding(IASTName name, IBinding binding, IASTFileLocation loc, int fileNumber, LimitTo limitTo) throws DOMException {
-        // determine LimitTo
-        if (limitTo == null) {
-            if (name.isDeclaration()) {
-                limitTo = ICSearchConstants.DECLARATIONS;
-            }
-            else if (name.isReference()) {
-                limitTo = ICSearchConstants.REFERENCES;
+    
+    private void processNameDeclBinding(IASTName name, IBinding binding, IASTFileLocation loc, int fileNumber) throws DOMException {
+    	if (binding instanceof ICompositeType) {
+            ICompositeType compBinding = (ICompositeType) binding;
+            int compositeKey = compBinding.getKey();
+            ASTNodeProperty prop = name.getPropertyInParent();
+            switch (compositeKey) {
+                case ICPPClassType.k_class:                 
+                    if (name.isDeclaration() && prop == IASTElaboratedTypeSpecifier.TYPE_NAME)
+                        indexer.getOutput().addFwd_ClassDecl(fileNumber, getFullyQualifiedName(binding), loc.getNodeOffset(), loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
+                    else
+                        indexer.getOutput().addClassDecl(fileNumber, getFullyQualifiedName(binding), loc.getNodeOffset(), loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
+                    break;
+                case ICompositeType.k_struct:                   
+                    if (name.isDeclaration() && prop == IASTElaboratedTypeSpecifier.TYPE_NAME)
+                        indexer.getOutput().addFwd_StructDecl(fileNumber, getFullyQualifiedName(binding), loc.getNodeOffset(), loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
+                    else
+                        indexer.getOutput().addStructDecl(fileNumber, getFullyQualifiedName(binding), loc.getNodeOffset(), loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
+                    break;
+                case ICompositeType.k_union:                   
+                    if (name.isDeclaration() && prop == IASTElaboratedTypeSpecifier.TYPE_NAME)
+                        indexer.getOutput().addFwd_UnionDecl(fileNumber, getFullyQualifiedName(binding), loc.getNodeOffset(), loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
+                    else
+                        indexer.getOutput().addUnionDecl(fileNumber, getFullyQualifiedName(binding), loc.getNodeOffset(), loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
+                    break;
             }
-            else {
-                limitTo = ICSearchConstants.UNKNOWN_LIMIT_TO;
+            addDerivedAndFriendDeclaration(name, compBinding, loc, fileNumber);
+        }
+        else if (binding instanceof IEnumeration)
+        	 indexer.getOutput().addEnumDecl(fileNumber, getFullyQualifiedName(binding), loc.getNodeOffset(), loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
+        else if (binding instanceof ITypedef)
+        	 indexer.getOutput().addTypedefDecl(fileNumber, getFullyQualifiedName(binding), loc.getNodeOffset(), loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
+        else if (binding instanceof ICPPNamespace)
+        	 indexer.getOutput().addNamespaceDecl(fileNumber, getFullyQualifiedName(binding), loc.getNodeOffset(), loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
+        else if (binding instanceof IEnumerator)
+        	 indexer.getOutput().addEnumtorDecl(fileNumber, getFullyQualifiedName(binding), loc.getNodeOffset(), loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
+        else if (binding instanceof IField) 
+        	 indexer.getOutput().addFieldDecl(fileNumber, getFullyQualifiedName(binding), loc.getNodeOffset(), loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
+        else if (binding instanceof IParameter ||
+                 binding instanceof IVariable) 
+        	 indexer.getOutput().addVarDecl(fileNumber, getFullyQualifiedName(binding), loc.getNodeOffset(), loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
+        else if (binding instanceof ICPPMethod)
+        	 indexer.getOutput().addMethodDecl(fileNumber, getFullyQualifiedName(binding), loc.getNodeOffset(), loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
+        else if (binding instanceof IFunction) {
+        	 indexer.getOutput().addFunctionDecl(fileNumber, getFullyQualifiedName(binding), loc.getNodeOffset(), loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
+            // TODO In case we want to add friend function declarations to index
+            // addDerivedAndFriendDeclaration(name, binding, loc, fileNumber);
+        }
+        else if (binding instanceof ICPPUsingDeclaration) {
+            ICPPDelegate[] delegates = ((ICPPUsingDeclaration)binding).getDelegates();
+            for (int i = 0; i < delegates.length; i++) {
+                IBinding orig = delegates[i].getBinding();
+                processNameRefBinding(name, orig, loc, fileNumber); // reference to the original binding
+                processNameDeclBinding(name, delegates[i], loc, fileNumber); // declaration of the new name
             }
+            return;
         }
-        
-        // determine type
-        EntryType entryType = null;
-        if (binding instanceof ICompositeType) {
+    }
+    
+    private void processNameRefBinding(IASTName name, IBinding binding, IASTFileLocation loc, int fileNumber) throws DOMException {
+    	if (binding instanceof ICompositeType) {
             ICompositeType compBinding = (ICompositeType) binding;
             int compositeKey = compBinding.getKey();
             ASTNodeProperty prop = name.getPropertyInParent();
             switch (compositeKey) {
-                case ICPPClassType.k_class:
-                    entryType = IIndexEncodingConstants.CLASS;
+                case ICPPClassType.k_class:                 
                     if (name.isDeclaration() && prop == IASTElaboratedTypeSpecifier.TYPE_NAME)
-                        entryType = IIndexEncodingConstants.FWD_CLASS;
+                        indexer.getOutput().addFwd_ClassRef(fileNumber, getFullyQualifiedName(binding), loc.getNodeOffset(), loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
+                    else
+                        indexer.getOutput().addClassRef(fileNumber, getFullyQualifiedName(binding), loc.getNodeOffset(), loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
                     break;
-                case ICompositeType.k_struct:
-                    entryType = IIndexEncodingConstants.STRUCT;
+                case ICompositeType.k_struct:                   
                     if (name.isDeclaration() && prop == IASTElaboratedTypeSpecifier.TYPE_NAME)
-                        entryType = IIndexEncodingConstants.FWD_STRUCT;
+                        indexer.getOutput().addFwd_StructRef(fileNumber, getFullyQualifiedName(binding), loc.getNodeOffset(), loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
+                    else
+                        indexer.getOutput().addStructRef(fileNumber, getFullyQualifiedName(binding), loc.getNodeOffset(), loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
                     break;
-                case ICompositeType.k_union:
-                    entryType = IIndexEncodingConstants.UNION;
+                case ICompositeType.k_union:                   
                     if (name.isDeclaration() && prop == IASTElaboratedTypeSpecifier.TYPE_NAME)
-                        entryType = IIndexEncodingConstants.FWD_UNION;
+                        indexer.getOutput().addFwd_UnionRef(fileNumber, getFullyQualifiedName(binding), loc.getNodeOffset(), loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
+                    else
+                        indexer.getOutput().addUnionRef(fileNumber, getFullyQualifiedName(binding), loc.getNodeOffset(), loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
                     break;
             }
             addDerivedAndFriendDeclaration(name, compBinding, loc, fileNumber);
         }
         else if (binding instanceof IEnumeration)
-            entryType = IIndexEncodingConstants.ENUM;
+        	 indexer.getOutput().addEnumRef(fileNumber, getFullyQualifiedName(binding), loc.getNodeOffset(), loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
         else if (binding instanceof ITypedef)
-            entryType = IIndexEncodingConstants.TYPEDEF;
+        	 indexer.getOutput().addTypedefRef(fileNumber, getFullyQualifiedName(binding), loc.getNodeOffset(), loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
         else if (binding instanceof ICPPNamespace)
-            entryType = IIndexEncodingConstants.NAMESPACE;
+        	 indexer.getOutput().addNamespaceRef(fileNumber, getFullyQualifiedName(binding), loc.getNodeOffset(), loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
         else if (binding instanceof IEnumerator)
-            entryType = IIndexEncodingConstants.ENUMERATOR;
+        	 indexer.getOutput().addEnumtorRef(fileNumber, getFullyQualifiedName(binding), loc.getNodeOffset(), loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
         else if (binding instanceof IField) 
-            entryType = IIndexEncodingConstants.FIELD;
+        	 indexer.getOutput().addFieldRef(fileNumber, getFullyQualifiedName(binding), loc.getNodeOffset(), loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
         else if (binding instanceof IParameter ||
                  binding instanceof IVariable) 
-            entryType = IIndexEncodingConstants.VAR;
+        	 indexer.getOutput().addVarRef(fileNumber, getFullyQualifiedName(binding), loc.getNodeOffset(), loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
         else if (binding instanceof ICPPMethod)
-            entryType = IIndexEncodingConstants.METHOD;
+        	 indexer.getOutput().addMethodRef(fileNumber, getFullyQualifiedName(binding), loc.getNodeOffset(), loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
         else if (binding instanceof IFunction) {
-            entryType = IIndexEncodingConstants.FUNCTION;
+        	 indexer.getOutput().addFunctionRef(fileNumber, getFullyQualifiedName(binding), loc.getNodeOffset(), loc.getNodeLength(),ICIndexStorageConstants.OFFSET);
             // TODO In case we want to add friend function declarations to index
             // addDerivedAndFriendDeclaration(name, binding, loc, fileNumber);
         }
@@ -217,21 +260,21 @@
             ICPPDelegate[] delegates = ((ICPPUsingDeclaration)binding).getDelegates();
             for (int i = 0; i < delegates.length; i++) {
                 IBinding orig = delegates[i].getBinding();
-                processNameBinding(name, orig, loc, fileNumber, ICSearchConstants.REFERENCES); // reference to the original binding
-                processNameBinding(name, delegates[i], loc, fileNumber, ICSearchConstants.DECLARATIONS); // declaration of the new name
+                processNameRefBinding(name, orig, loc, fileNumber); // reference to the original binding
+                processNameDeclBinding(name, delegates[i], loc, fileNumber); // declaration of the new name
             }
             return;
         }
-        
-        if (entryType != null && limitTo != null) {
-            indexer.getOutput().addRef(fileNumber, IndexEncoderUtil.encodeEntry(
-                        getFullyQualifiedName(binding),
-                        entryType,
-                        limitTo),
-                    loc.getNodeOffset(),
-                    loc.getNodeLength(),
-                    ICIndexStorageConstants.OFFSET);
-        }
+    }
+    private void processNameBinding(IASTName name, IBinding binding, IASTFileLocation loc, int fileNumber) throws DOMException {
+            if (name.isDeclaration()) {
+            	processNameDeclBinding(name, binding, loc, fileNumber);
+            }
+            else if (name.isReference()) {
+            	processNameRefBinding(name, binding, loc, fileNumber);
+            }           
+//            else 
+//            	ICSearchConstants.UNKNOWN_LIMIT_TO;
     }
 
     /**
@@ -250,20 +293,16 @@
                     compositeKey == ICompositeType.k_struct) {
                 if (prop == ICPPASTBaseSpecifier.NAME) {
                     // base class
-                    indexer.getOutput().addRef(fileNumber, IndexEncoderUtil.encodeEntry(
-                                getFullyQualifiedName(binding),
-                                IIndexEncodingConstants.DERIVED,
-                                ICSearchConstants.DECLARATIONS),
+                    indexer.getOutput().addDerivedDecl(fileNumber, 
+                            getFullyQualifiedName(binding),
                             loc.getNodeOffset(),
                             loc.getNodeLength(),
                             ICIndexStorageConstants.OFFSET);
                 }
                 else if (prop == IASTElaboratedTypeSpecifier.TYPE_NAME) {
                     // friend 
-                    indexer.getOutput().addRef(fileNumber, IndexEncoderUtil.encodeEntry(
-                                getFullyQualifiedName(binding),
-                                IIndexEncodingConstants.FRIEND,
-                                ICSearchConstants.DECLARATIONS),
+                    indexer.getOutput().addFriendDecl(fileNumber, 
+                            getFullyQualifiedName(binding),
                             loc.getNodeOffset(),
                             loc.getNodeLength(),
                             ICIndexStorageConstants.OFFSET);
@@ -285,7 +324,7 @@
 //                            // friend 
 //                            indexer.getOutput().addRef(fileNumber, IndexEncoderUtil.encodeEntry(
 //                                        getFullyQualifiedName(binding),
-//                                        IIndexEncodingConstants.FRIEND,
+//                                        ICIndexStorageConstants.FRIEND,
 //                                        ICSearchConstants.DECLARATIONS));
 //                        }
 //                    }
Index: index/org/eclipse/cdt/internal/core/index/domsourceindexer/DOMSourceIndexerRunner.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/index/domsourceindexer/DOMSourceIndexerRunner.java,v
retrieving revision 1.11
diff -u -r1.11 DOMSourceIndexerRunner.java
--- index/org/eclipse/cdt/internal/core/index/domsourceindexer/DOMSourceIndexerRunner.java	8 Apr 2005 19:35:43 -0000	1.11
+++ index/org/eclipse/cdt/internal/core/index/domsourceindexer/DOMSourceIndexerRunner.java	19 Apr 2005 17:43:13 -0000
@@ -35,12 +35,10 @@
 import org.eclipse.cdt.core.model.ICModelMarker;
 import org.eclipse.cdt.core.parser.ParseError;
 import org.eclipse.cdt.core.parser.ParserLanguage;
-import org.eclipse.cdt.core.search.ICSearchConstants;
 import org.eclipse.cdt.internal.core.index.cindexstorage.ICIndexStorageConstants;
 import org.eclipse.cdt.internal.core.index.impl.IndexDelta;
 import org.eclipse.cdt.internal.core.index.sourceindexer.AbstractIndexer;
 import org.eclipse.cdt.internal.core.index.sourceindexer.SourceIndexer;
-import org.eclipse.cdt.internal.core.search.indexing.IIndexEncodingConstants;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.resources.IResource;
@@ -204,10 +202,10 @@
             getOutput().addIncludeRef(fileNumber, include);
             getOutput().addRelatives(fileNumber, include, 
                     (parent != null) ? parent.getIncludeDirective().getPath() : null);
-            getOutput().addRef(fileNumber, IndexEncoderUtil.encodeEntry(
-                        new char[][] {include.toCharArray()}, 
-                        IIndexEncodingConstants.INCLUDE,
-                        ICSearchConstants.REFERENCES));
+            getOutput().addIncludeRef(fileNumber, 
+                        new char[][] {include.toCharArray()},
+                        1,1, ICIndexStorageConstants.LINE
+                        );
             
             /* See if this file has been encountered before */
             indexer.haveEncounteredHeader(resourceFile.getProject().getFullPath(), new Path(include));
@@ -226,10 +224,8 @@
             // Get the location
             IASTFileLocation loc = IndexEncoderUtil.getFileLocation(macro);
             int fileNumber = IndexEncoderUtil.calculateIndexFlags(this, loc);
-            getOutput().addRef(fileNumber, IndexEncoderUtil.encodeEntry(
-                        new char[][] {macro.toCharArray()},
-                        IIndexEncodingConstants.MACRO,
-                        ICSearchConstants.DECLARATIONS),
+            getOutput().addMacroDecl(fileNumber,
+                    new char[][] {macro.toCharArray()},
                     loc.getNodeOffset(),
                     loc.getNodeLength(),
                     ICIndexStorageConstants.OFFSET);
Index: index/org/eclipse/cdt/internal/core/index/domsourceindexer/IndexEncoderUtil.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/index/domsourceindexer/IndexEncoderUtil.java,v
retrieving revision 1.7
diff -u -r1.7 IndexEncoderUtil.java
--- index/org/eclipse/cdt/internal/core/index/domsourceindexer/IndexEncoderUtil.java	15 Apr 2005 12:48:52 -0000	1.7
+++ index/org/eclipse/cdt/internal/core/index/domsourceindexer/IndexEncoderUtil.java	19 Apr 2005 17:43:13 -0000
@@ -14,59 +14,11 @@
 import org.eclipse.cdt.core.dom.ast.IASTFileLocation;
 import org.eclipse.cdt.core.dom.ast.IASTNode;
 import org.eclipse.cdt.core.dom.ast.IASTNodeLocation;
-import org.eclipse.cdt.core.search.ICSearchConstants;
-import org.eclipse.cdt.core.search.ICSearchConstants.LimitTo;
 import org.eclipse.cdt.internal.core.index.cindexstorage.IndexedFileEntry;
-import org.eclipse.cdt.internal.core.index.sourceindexer.AbstractIndexer;
-import org.eclipse.cdt.internal.core.search.indexing.IIndexEncodingConstants;
-import org.eclipse.cdt.internal.core.search.indexing.IIndexEncodingConstants.EntryType;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.runtime.Path;
 
 public class IndexEncoderUtil {
-    
-    public static final char[] encodeEntry(char[][] elementName, EntryType entryType, LimitTo encodeType) {
-        // Temporarily
-        if (elementName == null) {
-            return "NPE".toCharArray(); //$NON-NLS-1$
-        }
-        int pos, nameLength = 0;
-        for (int i=0; i < elementName.length; i++){
-            char[] namePart = elementName[i];
-            nameLength += namePart.length;
-        }
-        char[][] encodedTypeNames = null;
-        if (encodeType == ICSearchConstants.DECLARATIONS) {
-            encodedTypeNames = IIndexEncodingConstants.encodedTypeNames_Decl;
-        }
-        else if (encodeType == ICSearchConstants.REFERENCES) {
-            encodedTypeNames = IIndexEncodingConstants.encodedTypeNames_Ref;
-        }
-        char[] encodedTypeName = encodedTypeNames[entryType.toInt()];
-        
-        //char[] has to be of size - [type length + length of the name (including qualifiers) + 
-        //separators (need one less than fully qualified name length)
-        char[] result = new char[encodedTypeName.length + nameLength + elementName.length - 1];
-        System.arraycopy(encodedTypeName, 0, result, 0, pos = encodedTypeName.length);
-        if (elementName.length > 0) {
-        //Extract the name first
-            char [] tempName = elementName[elementName.length-1];
-            System.arraycopy(tempName, 0, result, pos, tempName.length);
-            pos += tempName.length;
-        }
-        //Extract the qualifiers
-        for (int i=elementName.length - 2; i>=0; i--){
-            result[pos++] = IIndexEncodingConstants.SEPARATOR;
-            char [] tempName = elementName[i];
-            System.arraycopy(tempName, 0, result, pos, tempName.length);
-            pos+=tempName.length;               
-        }
-        
-        if (AbstractIndexer.VERBOSE)
-            AbstractIndexer.verbose(new String(result));
-            
-        return result;
-    }
 
     public static int calculateIndexFlags(DOMSourceIndexerRunner indexer, IASTFileLocation loc) {
         int fileNum= 0;
@@ -132,5 +84,12 @@
         }
         return fileLoc;
     }
+	
+	public static boolean nodeInExternalHeader(IASTNode node) {
+		String fileName = node.getContainingFilename();
+		return (CCorePlugin.getWorkspace().getRoot().getFileForLocation(new Path(fileName)) == null)
+				? true : false;
+	}
+
 
 }
Index: index/org/eclipse/cdt/internal/core/index/sourceindexer/AbstractIndexer.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/index/sourceindexer/AbstractIndexer.java,v
retrieving revision 1.11
diff -u -r1.11 AbstractIndexer.java
--- index/org/eclipse/cdt/internal/core/index/sourceindexer/AbstractIndexer.java	8 Apr 2005 19:35:43 -0000	1.11
+++ index/org/eclipse/cdt/internal/core/index/sourceindexer/AbstractIndexer.java	19 Apr 2005 17:43:13 -0000
@@ -23,11 +23,9 @@
 import org.eclipse.cdt.core.filetype.ICFileTypeConstants;
 import org.eclipse.cdt.core.model.ICModelMarker;
 import org.eclipse.cdt.core.search.ICSearchConstants;
-import org.eclipse.cdt.internal.core.CharOperation;
 import org.eclipse.cdt.internal.core.Util;
 import org.eclipse.cdt.internal.core.index.IIndexer;
 import org.eclipse.cdt.internal.core.index.IIndexerOutput;
-import org.eclipse.cdt.internal.core.search.indexing.IIndexConstants;
 import org.eclipse.cdt.internal.core.search.indexing.IndexManager;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IMarker;
@@ -39,7 +37,7 @@
 import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.jobs.Job;
 
-public abstract class AbstractIndexer implements IIndexer,IIndexConstants, ICSearchConstants {
+public abstract class AbstractIndexer implements IIndexer, ICSearchConstants {
 	
 	public static boolean VERBOSE = false;
 	public static boolean TIMING = false;
@@ -98,314 +96,6 @@
 		
 		return false;
 	}
-	/**
-	 * Type entries are encoded as follow: 'typeDecl/' ('C' | 'S' | 'U' ) '/'  TypeName '/' 
-	 * Current encoding is optimized for queries: all classes
-	 */
-	public static final char[] bestTypePrefix( SearchFor searchFor, LimitTo limitTo, char[] typeName, char[][] containingTypes, int matchMode, boolean isCaseSensitive) {
-		char [] prefix = null;
-		if( limitTo == DECLARATIONS ){
-			prefix = TYPE_DECL;
-		} else if( limitTo == REFERENCES ){
-			prefix = TYPE_REF;
-		} else {
-			return TYPE_ALL;
-		}
-					
-		char classType = 0;
-		
-		if( searchFor == ICSearchConstants.CLASS ){
-			classType = CLASS_SUFFIX;
-		} else if ( searchFor == ICSearchConstants.STRUCT ){
-			classType = STRUCT_SUFFIX;
-		} else if ( searchFor == ICSearchConstants.UNION ){
-			classType = UNION_SUFFIX;
-		} else if ( searchFor == ICSearchConstants.ENUM ){
-			classType = ENUM_SUFFIX;
-		} else if ( searchFor == ICSearchConstants.TYPEDEF ){
-			classType = TYPEDEF_SUFFIX;
-		} else if ( searchFor == ICSearchConstants.DERIVED){
-			classType = DERIVED_SUFFIX;
-		} else if ( searchFor == ICSearchConstants.FRIEND){
-			classType = FRIEND_SUFFIX;
-		} else if ( searchFor == ICSearchConstants.FWD_CLASS) {
-			classType = FWD_CLASS_SUFFIX;
-		} else if ( searchFor == ICSearchConstants.FWD_STRUCT) {
-			classType = FWD_STRUCT_SUFFIX;
-		} else if ( searchFor == ICSearchConstants.FWD_UNION) {
-			classType = FWD_UNION_SUFFIX;
-		} else {
-			//could be TYPE or CLASS_STRUCT, best we can do for these is the prefix
-			return prefix;
-		}
-		
-		return bestPrefix( prefix, classType, typeName, containingTypes, matchMode, isCaseSensitive );
-	}
-	
-	public static final char[] bestNamespacePrefix(LimitTo limitTo, char[] namespaceName, char[][] containingTypes, int matchMode, boolean isCaseSensitive) {
-		char [] prefix = null;
-		if( limitTo == REFERENCES ){
-			prefix = NAMESPACE_REF;
-		} else if ( limitTo == DECLARATIONS ) {
-			prefix = NAMESPACE_DECL;
-		} else {
-			return NAMESPACE_ALL;
-		}
-		
-		return bestPrefix( prefix, (char) 0, namespaceName, containingTypes, matchMode, isCaseSensitive );
-	}	
-		
-	public static final char[] bestVariablePrefix( LimitTo limitTo, char[] varName, char[][] containingTypes, int matchMode, boolean isCaseSenstive ){
-		char [] prefix = null;
-		if( limitTo == REFERENCES ){
-			prefix = TYPE_REF;
-		} else if( limitTo == DECLARATIONS ){
-			prefix = TYPE_DECL;
-		} else {
-			return TYPE_ALL;
-		}
-		
-		return bestPrefix( prefix, VAR_SUFFIX, varName, containingTypes, matchMode, isCaseSenstive );	
-	}
-
-	public static final char[] bestFieldPrefix( LimitTo limitTo, char[] fieldName,char[][] containingTypes, int matchMode, boolean isCaseSensitive) {
-		char [] prefix = null;
-		if( limitTo == REFERENCES ){
-			prefix = FIELD_REF;
-		} else if( limitTo == DECLARATIONS ){
-			prefix = FIELD_DECL;
-		} else {
-			return FIELD_ALL;
-		}
-		
-		return bestPrefix( prefix, (char)0, fieldName, containingTypes, matchMode, isCaseSensitive );
-	}  
-	
-	public static final char[] bestEnumeratorPrefix( LimitTo limitTo, char[] enumeratorName,char[][] containingTypes, int matchMode, boolean isCaseSensitive) {
-		char [] prefix = null;
-		if( limitTo == REFERENCES ){
-			prefix = ENUMTOR_REF;
-		} else if( limitTo == DECLARATIONS ){
-			prefix = ENUMTOR_DECL;
-		} else if (limitTo == ALL_OCCURRENCES){
-			return ENUMTOR_ALL;
-		}
-		else {
-			//Definitions
-			return "noEnumtorDefs".toCharArray(); //$NON-NLS-1$
-		}
-		
-		return bestPrefix( prefix, (char)0, enumeratorName, containingTypes, matchMode, isCaseSensitive );
-	}  
-
-	public static final char[] bestMethodPrefix( LimitTo limitTo, char[] methodName,char[][] containingTypes, int matchMode, boolean isCaseSensitive) {
-		char [] prefix = null;
-		if( limitTo == REFERENCES ){
-			prefix = METHOD_REF;
-		} else if( limitTo == DECLARATIONS ){
-			prefix = METHOD_DECL;
-		} else if( limitTo == DEFINITIONS ){
-			//TODO prefix = METHOD_DEF;
-			return METHOD_ALL;	
-		} else {
-			return METHOD_ALL;
-		}
-		
-		return bestPrefix( prefix, (char)0, methodName, containingTypes, matchMode, isCaseSensitive );
-	}  
-	
-	public static final char[] bestFunctionPrefix( LimitTo limitTo, char[] functionName, int matchMode, boolean isCaseSensitive) {
-		char [] prefix = null;
-		if( limitTo == REFERENCES ){
-			prefix = FUNCTION_REF;
-		} else if( limitTo == DECLARATIONS ){
-			prefix = FUNCTION_DECL;
-		} else if ( limitTo == DEFINITIONS ){
-			//TODO prefix = FUNCTION_DEF;
-			return FUNCTION_ALL;
-		} else {
-			return FUNCTION_ALL;
-		}
-		return bestPrefix( prefix, (char)0, functionName, null, matchMode, isCaseSensitive );
-	}  
-		
-	public static final char[] bestPrefix( char [] prefix, char optionalType, char[] name, char[][] containingTypes, int matchMode, boolean isCaseSensitive) {
-		char[] 	result = null;
-		int 	pos    = 0;
-		
-		int wildPos, starPos = -1, questionPos;
-		
-		//length of prefix + separator
-		int length = prefix.length;
-		
-		//add length for optional type + another separator
-		if( optionalType != 0 )
-			length += 2;
-		
-		if (!isCaseSensitive){
-			//index is case sensitive, thus in case attempting case insensitive search, cannot consider
-			//type name.
-			name = null;
-		} else if( matchMode == PATTERN_MATCH && name != null ){
-			int start = 0;
-
-			char [] temp = new char [ name.length ];
-			boolean isEscaped = false;
-			int tmpIdx = 0;
-			for( int i = 0; i < name.length; i++ ){
-				if( name[i] == '\\' ){
-					if( !isEscaped ){
-						isEscaped = true;
-						continue;
-					} 
-					isEscaped = false;		
-				} else if( name[i] == '*' && !isEscaped ){
-					starPos = i;
-					break;
-				} 
-				temp[ tmpIdx++ ] = name[i];
-			}
-			
-			name = new char [ tmpIdx ];
-			System.arraycopy( temp, 0, name, 0, tmpIdx );				
-		
-			//starPos = CharOperation.indexOf( '*', name );
-			questionPos = CharOperation.indexOf( '?', name );
-
-			if( starPos >= 0 ){
-				if( questionPos >= 0 )
-					wildPos = ( starPos < questionPos ) ? starPos : questionPos;
-				else 
-					wildPos = starPos;
-			} else {
-				wildPos = questionPos;
-			}
-			 
-			switch( wildPos ){
-				case -1 : break;
-				case 0  : name = null;	break;
-				default : name = CharOperation.subarray( name, 0, wildPos ); break;
-			}
-		}
-		//add length for name
-		if( name != null ){
-			length += name.length;
-		} else {
-			//name is null, don't even consider qualifications.
-			result = new char [ length ];
-			System.arraycopy( prefix, 0, result, 0, pos = prefix.length );
-			if( optionalType != 0){
-				result[ pos++ ] = optionalType;
-				result[ pos++ ] = SEPARATOR; 
-			}
-			return result;
-		}
-		 		
-		//add the total length of the qualifiers
-		//we don't want to mess with the contents of this array (treat it as constant)
-		//so check for wild cards later.
-		if( containingTypes != null ){
-			for( int i = 0; i < containingTypes.length; i++ ){
-				if( containingTypes[i].length > 0 ){
-					length += containingTypes[ i ].length;
-					length++; //separator
-				}
-			}
-		}
-		
-		//because we haven't checked qualifier wild cards yet, this array might turn out
-		//to be too long. So fill a temp array, then check the length after
-		char [] temp = new char [ length ];
-		
-		System.arraycopy( prefix, 0, temp, 0, pos = prefix.length );
-		
-		if( optionalType != 0 ){
-			temp[ pos++ ] = optionalType;
-			temp[ pos++ ] = SEPARATOR;
-		}
-		
-		System.arraycopy( name, 0, temp, pos, name.length );
-		pos += name.length;
-		
-		if( containingTypes != null ){
-			for( int i = containingTypes.length - 1; i >= 0; i-- ){
-				if( matchMode == PATTERN_MATCH ){
-					starPos     = CharOperation.indexOf( '*', containingTypes[i] );
-					questionPos = CharOperation.indexOf( '?', containingTypes[i] );
-
-					if( starPos >= 0 ){
-						if( questionPos >= 0 )
-							wildPos = ( starPos < questionPos ) ? starPos : questionPos;
-						else 
-							wildPos = starPos;
-					} else {
-						wildPos = questionPos;
-					}
-					
-					if( wildPos >= 0 ){
-						temp[ pos++ ] = SEPARATOR;
-						System.arraycopy( containingTypes[i], 0, temp, pos, wildPos );
-						pos += starPos;
-						break;
-					}
-				}
-				
-				if( containingTypes[i].length > 0 ){
-					temp[ pos++ ] = SEPARATOR;
-					System.arraycopy( containingTypes[i], 0, temp, pos, containingTypes[i].length );
-					pos += containingTypes[i].length;
-				}
-			}
-		}
-	
-		if( pos < length ){
-			result = new char[ pos ];
-			System.arraycopy( temp, 0, result, 0, pos );	
-		} else {
-			result = temp;
-		}
-		
-		return result;
-	}
-
-	/**
-	 * @param _limitTo
-	 * @param simpleName
-	 * @param _matchMode
-	 * @param _caseSensitive
-	 * @return
-	 */
-	public static final char[] bestMacroPrefix( LimitTo limitTo, char[] macroName, int matchMode, boolean isCaseSenstive ){
-		//since we only index macro declarations we already know the prefix
-		char [] prefix = null;
-		if( limitTo == DECLARATIONS ){
-			prefix = MACRO_DECL;
-		} else {
-			return null;
-		}
-		
-		return bestPrefix( prefix,  (char)0, macroName, null, matchMode, isCaseSenstive );	
-	}
-	
-	/**
-	 * @param _limitTo
-	 * @param simpleName
-	 * @param _matchMode
-	 * @param _caseSensitive
-	 * @return
-	 */
-	public static final char[] bestIncludePrefix( LimitTo limitTo, char[] incName, int matchMode, boolean isCaseSenstive ){
-		//since we only index macro declarations we already know the prefix
-		char [] prefix = null;
-		if( limitTo == REFERENCES ){
-			prefix = INCLUDE_REF;
-		} else {
-			return null;
-		}
-		
-		return bestPrefix( prefix,  (char)0, incName, null, matchMode, isCaseSenstive );	
-	}
-	
 
     abstract private class Problem {
         public IFile file;
Index: index/org/eclipse/cdt/internal/core/index/sourceindexer/SourceIndexerRequestor.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/index/sourceindexer/SourceIndexerRequestor.java,v
retrieving revision 1.6
diff -u -r1.6 SourceIndexerRequestor.java
--- index/org/eclipse/cdt/internal/core/index/sourceindexer/SourceIndexerRequestor.java	15 Apr 2005 12:48:52 -0000	1.6
+++ index/org/eclipse/cdt/internal/core/index/sourceindexer/SourceIndexerRequestor.java	19 Apr 2005 17:43:14 -0000
@@ -65,7 +65,6 @@
 import org.eclipse.cdt.core.parser.ast.IASTVariable;
 import org.eclipse.cdt.core.parser.ast.IASTVariableReference;
 import org.eclipse.cdt.internal.core.index.cindexstorage.IndexedFileEntry;
-import org.eclipse.cdt.internal.core.search.indexing.IIndexConstants;
 import org.eclipse.cdt.internal.core.search.indexing.IndexProblemHandler;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IProject;
@@ -80,7 +79,7 @@
  * To change the template for this generated type comment go to
  * Window>Preferences>Java>Code Generation>Code and Comments
  */
-public class SourceIndexerRequestor implements ISourceElementRequestor, IIndexConstants {
+public class SourceIndexerRequestor implements ISourceElementRequestor {
 	
 	SourceIndexerRunner indexer;
 	IFile resourceFile;
Index: index/org/eclipse/cdt/internal/core/index/sourceindexer/SourceIndexerRunner.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/index/sourceindexer/SourceIndexerRunner.java,v
retrieving revision 1.7
diff -u -r1.7 SourceIndexerRunner.java
--- index/org/eclipse/cdt/internal/core/index/sourceindexer/SourceIndexerRunner.java	8 Apr 2005 15:52:28 -0000	1.7
+++ index/org/eclipse/cdt/internal/core/index/sourceindexer/SourceIndexerRunner.java	19 Apr 2005 17:43:14 -0000
@@ -53,7 +53,6 @@
 import org.eclipse.cdt.core.parser.ast.IASTTypeSpecifier;
 import org.eclipse.cdt.core.parser.ast.IASTTypedefDeclaration;
 import org.eclipse.cdt.core.parser.ast.IASTVariable;
-import org.eclipse.cdt.core.search.ICSearchConstants;
 import org.eclipse.cdt.internal.core.index.cindexstorage.ICIndexStorageConstants;
 import org.eclipse.cdt.internal.core.index.cindexstorage.IndexedFileEntry;
 import org.eclipse.cdt.internal.core.index.impl.IndexDelta;
@@ -77,19 +76,6 @@
  * - Unions
  */
 public class SourceIndexerRunner extends AbstractIndexer {
-	 
-    final static int CLASS = 1;
-    final static int STRUCT = 2;
-    final static int UNION = 3;
-    final static int ENUM = 4;
-    final static int VAR = 5;
-    final static int TYPEDEF = 6;
-    final static int DERIVED = 7;
-    final static int FRIEND = 8;
-    final static int FWD_CLASS = 9;
-    final static int FWD_STRUCT = 10;
-    final static int FWD_UNION = 11;
-    
 	IFile resourceFile;
 	private SourceIndexer indexer;
 	
@@ -277,7 +263,7 @@
                         char[][] baseFullyQualifiedName = baseClassSpec.getFullyQualifiedNameCharArrays();
                         int offset = baseClassSpec.getNameOffset();
                         int offsetLength = baseClassSpec.getNameEndOffset() - offset;
-                        output.addRef(fileNumber, encodeTypeEntry(baseFullyQualifiedName,DERIVED,ICSearchConstants.DECLARATIONS), offset,offsetLength, ICIndexStorageConstants.OFFSET);
+                        output.addDerivedDecl(fileNumber, baseFullyQualifiedName, offset,offsetLength, ICIndexStorageConstants.OFFSET);
                     }
                 } catch (ASTNotImplementedException e) {}
             }
@@ -291,14 +277,14 @@
                     char[][] baseFullyQualifiedName = friendClassSpec.getFullyQualifiedNameCharArrays();
                     int offset = friendClassSpec.getNameOffset();
                     int offsetLength = friendClassSpec.getNameEndOffset() - offset;
-                    output.addRef(fileNumber, encodeTypeEntry(baseFullyQualifiedName,FRIEND,ICSearchConstants.DECLARATIONS),offset, offsetLength, ICIndexStorageConstants.OFFSET);
+                    output.addFriendDecl(fileNumber, baseFullyQualifiedName,offset, offsetLength, ICIndexStorageConstants.OFFSET);
                 }
                 else if (decl instanceof IASTElaboratedTypeSpecifier){
                     IASTElaboratedTypeSpecifier friendClassSpec = (IASTElaboratedTypeSpecifier) decl;
                     char[][] baseFullyQualifiedName = friendClassSpec.getFullyQualifiedNameCharArrays();
                     int offset = friendClassSpec.getNameOffset();
                     int offsetLength = friendClassSpec.getNameEndOffset() - offset;
-                    output.addRef(fileNumber, encodeTypeEntry(baseFullyQualifiedName,FRIEND,ICSearchConstants.DECLARATIONS), offset, offsetLength, ICIndexStorageConstants.OFFSET);
+                    output.addFriendDecl(fileNumber, baseFullyQualifiedName, offset, offsetLength, ICIndexStorageConstants.OFFSET);
                 }
                 else if (decl instanceof IASTFunction){
                     
@@ -311,7 +297,7 @@
             
             int offset = classSpecification.getNameOffset();
             int offsetLength = classSpecification.getNameEndOffset() - offset;
-            output.addRef(fileNumber, encodeTypeEntry(classSpecification.getFullyQualifiedNameCharArrays(),CLASS, ICSearchConstants.DECLARATIONS),offset, offsetLength, ICIndexStorageConstants.OFFSET);
+            output.addClassDecl(fileNumber, classSpecification.getFullyQualifiedNameCharArrays(), offset, offsetLength, ICIndexStorageConstants.OFFSET);
         }       
         else if (classSpecification.getClassKind().equals(ASTClassKind.STRUCT))
         {
@@ -326,7 +312,7 @@
                         char[][] baseFullyQualifiedName = baseClassSpec.getFullyQualifiedNameCharArrays();
                         int offset = baseClassSpec.getNameOffset();
                         int offsetLength = baseClassSpec.getNameEndOffset() - offset;
-                        output.addRef(fileNumber, encodeTypeEntry(baseFullyQualifiedName,DERIVED,ICSearchConstants.DECLARATIONS),offset, offsetLength, ICIndexStorageConstants.OFFSET);
+                        output.addDerivedDecl(fileNumber, baseFullyQualifiedName, offset, offsetLength, ICIndexStorageConstants.OFFSET);
                     }
                 } catch (ASTNotImplementedException e) {}
             }
@@ -340,14 +326,14 @@
                     char[][] baseFullyQualifiedName = friendClassSpec.getFullyQualifiedNameCharArrays();
                     int offset = friendClassSpec.getNameOffset();
                     int offsetLength = friendClassSpec.getNameEndOffset() - offset;
-                    output.addRef(fileNumber, encodeTypeEntry(baseFullyQualifiedName,FRIEND,ICSearchConstants.DECLARATIONS),offset,offsetLength, ICIndexStorageConstants.OFFSET);
+                    output.addFriendDecl(fileNumber, baseFullyQualifiedName, offset,offsetLength, ICIndexStorageConstants.OFFSET);
                 }
                 else if (decl instanceof IASTElaboratedTypeSpecifier){
                     IASTElaboratedTypeSpecifier friendClassSpec = (IASTElaboratedTypeSpecifier) decl;
                     char[][] baseFullyQualifiedName = friendClassSpec.getFullyQualifiedNameCharArrays();
                     int offset = friendClassSpec.getNameOffset();
                     int offsetLength = friendClassSpec.getNameEndOffset() - offset;
-                    output.addRef(fileNumber, encodeTypeEntry(baseFullyQualifiedName,FRIEND,ICSearchConstants.DECLARATIONS),offset,offsetLength, ICIndexStorageConstants.OFFSET);
+                    output.addFriendDecl(fileNumber, baseFullyQualifiedName, offset,offsetLength, ICIndexStorageConstants.OFFSET);
                 }
                 else if (decl instanceof IASTFunction){
                     
@@ -359,13 +345,13 @@
             
             int offset = classSpecification.getNameOffset();
             int offsetLength = classSpecification.getNameEndOffset() - offset;
-            output.addRef(fileNumber, encodeTypeEntry(classSpecification.getFullyQualifiedNameCharArrays(),STRUCT, ICSearchConstants.DECLARATIONS),offset,offsetLength, ICIndexStorageConstants.OFFSET);
+            output.addStructDecl(fileNumber, classSpecification.getFullyQualifiedNameCharArrays(), offset,offsetLength, ICIndexStorageConstants.OFFSET);
         }
         else if (classSpecification.getClassKind().equals(ASTClassKind.UNION))
         {   
             int offset = classSpecification.getNameOffset();
             int offsetLength = classSpecification.getNameEndOffset() - offset;
-            output.addRef(fileNumber, encodeTypeEntry(classSpecification.getFullyQualifiedNameCharArrays(),UNION, ICSearchConstants.DECLARATIONS),offset,offsetLength, ICIndexStorageConstants.OFFSET);            
+            output.addUnionDecl(fileNumber, classSpecification.getFullyQualifiedNameCharArrays(), offset,offsetLength, ICIndexStorageConstants.OFFSET);            
         }
     }
     
@@ -373,7 +359,7 @@
         
         int offset = enumeration.getNameOffset();
         int offsetLength = enumeration.getNameEndOffset() - offset;
-        output.addRef(fileNumber, encodeTypeEntry(enumeration.getFullyQualifiedNameCharArrays(), ENUM, ICSearchConstants.DECLARATIONS),offset,offsetLength, ICIndexStorageConstants.OFFSET);
+        output.addEnumDecl(fileNumber, enumeration.getFullyQualifiedNameCharArrays(), offset,offsetLength, ICIndexStorageConstants.OFFSET);
         
         Iterator i = enumeration.getEnumerators();
         while (i.hasNext())
@@ -384,7 +370,7 @@
             
             offset = en.getNameOffset();
             offsetLength = en.getNameEndOffset() - offset;
-            output.addRef(fileNumber, encodeEntry( enumeratorFullName, ENUMTOR_DECL, ENUMTOR_DECL_LENGTH ),offset,offsetLength, ICIndexStorageConstants.OFFSET);
+            output.addEnumtorDecl(fileNumber,  enumeratorFullName, offset, offsetLength, ICIndexStorageConstants.OFFSET);
 
         }
     }
@@ -406,61 +392,61 @@
         
         int offset = enumerator.getNameOffset();
         int offsetLength = enumerator.getNameEndOffset() - offset;
-        output.addRef(fileNumber, encodeEntry(createEnumeratorFullyQualifiedName(enumerator),ENUMTOR_REF,ENUMTOR_REF_LENGTH),offset,offsetLength, ICIndexStorageConstants.OFFSET); 
+        output.addEnumtorRef(fileNumber, createEnumeratorFullyQualifiedName(enumerator),offset,offsetLength, ICIndexStorageConstants.OFFSET); 
     }
         
     public void addMacro(IASTMacro macro, int fileNumber) {
         char[][] macroName = new char[][] { macro.getNameCharArray() };
         int offset = macro.getNameOffset();
         int offsetLength = macro.getNameEndOffset() - offset;
-        output.addRef(fileNumber, encodeEntry(macroName,MACRO_DECL,MACRO_DECL_LENGTH), offset,offsetLength, ICIndexStorageConstants.OFFSET);
+        output.addMacroDecl(fileNumber, macroName, offset,offsetLength, ICIndexStorageConstants.OFFSET);
     }
         
     public void addEnumerationReference(IASTEnumerationSpecifier enumeration, int fileNumber) {
         int offset = enumeration.getNameOffset();
         int offsetLength = enumeration.getNameEndOffset() - offset;
-        output.addRef(fileNumber, encodeTypeEntry(enumeration.getFullyQualifiedNameCharArrays(), ENUM, ICSearchConstants.REFERENCES), offset,offsetLength, ICIndexStorageConstants.OFFSET);
+        output.addEnumRef(fileNumber, enumeration.getFullyQualifiedNameCharArrays(), offset,offsetLength, ICIndexStorageConstants.OFFSET);
     }
     public void addVariable(IASTVariable variable, int fileNumber) {
         int offset = variable.getNameOffset();
         int offsetLength = variable.getNameEndOffset() - offset;
-        output.addRef(fileNumber, encodeTypeEntry(variable.getFullyQualifiedNameCharArrays(), VAR, ICSearchConstants.DECLARATIONS), offset,offsetLength, ICIndexStorageConstants.OFFSET);
+        output.addVarDecl(fileNumber, variable.getFullyQualifiedNameCharArrays(), offset,offsetLength, ICIndexStorageConstants.OFFSET);
     }
     
     public void addVariableReference(IASTVariable variable, int fileNumber) {
         int offset = variable.getNameOffset();
         int offsetLength = variable.getNameEndOffset() - offset;
-        output.addRef(fileNumber, encodeTypeEntry(variable.getFullyQualifiedNameCharArrays(), VAR, ICSearchConstants.REFERENCES),offset, offsetLength, ICIndexStorageConstants.OFFSET);
+        output.addVarRef(fileNumber, variable.getFullyQualifiedNameCharArrays(), offset, offsetLength, ICIndexStorageConstants.OFFSET);
     }   
     
     public void addParameterReference( IASTParameterDeclaration parameter, int fileNumber ){
         int offset = parameter.getNameOffset();
         int offsetLength = parameter.getNameEndOffset() - offset;
-        output.addRef(fileNumber,encodeTypeEntry( new char[][] { parameter.getNameCharArray() }, VAR, ICSearchConstants.REFERENCES), offset, offsetLength, ICIndexStorageConstants.OFFSET);
+        output.addVarRef(fileNumber, new char[][] { parameter.getNameCharArray() }, offset, offsetLength, ICIndexStorageConstants.OFFSET);
     }
     
     public void addTypedefDeclaration(IASTTypedefDeclaration typedef, int fileNumber) {
         int offset = typedef.getNameOffset();
         int offsetLength = typedef.getNameEndOffset() - offset;
-        output.addRef(fileNumber,encodeEntry(typedef.getFullyQualifiedNameCharArrays(), TYPEDEF_DECL, TYPEDEF_DECL_LENGTH),offset,offsetLength, ICIndexStorageConstants.OFFSET);
+        output.addTypedefDecl(fileNumber,typedef.getFullyQualifiedNameCharArrays(),offset,offsetLength, ICIndexStorageConstants.OFFSET);
     }
     
     public void addFieldDeclaration(IASTField field, int fileNumber) {
         int offset = field.getNameOffset();
         int offsetLength = field.getNameEndOffset() - offset;
-        output.addRef(fileNumber, encodeEntry(field.getFullyQualifiedNameCharArrays(),FIELD_DECL,FIELD_DECL_LENGTH),offset,offsetLength, ICIndexStorageConstants.OFFSET);
+        output.addFieldDecl(fileNumber, field.getFullyQualifiedNameCharArrays(),offset,offsetLength, ICIndexStorageConstants.OFFSET);
     }
     
     public void addFieldReference(IASTField field, int fileNumber) {
         int offset = field.getNameOffset();
         int offsetLength = field.getNameEndOffset() - offset;
-        output.addRef(fileNumber, encodeEntry(field.getFullyQualifiedNameCharArrays(),FIELD_REF,FIELD_REF_LENGTH),offset,offsetLength, ICIndexStorageConstants.OFFSET);
+        output.addFieldRef(fileNumber, field.getFullyQualifiedNameCharArrays(),offset,offsetLength, ICIndexStorageConstants.OFFSET);
     }
     
     public void addMethodDeclaration(IASTMethod method, int fileNumber) {
         int offset = method.getNameOffset();
         int offsetLength = method.getNameEndOffset() - offset;
-        output.addRef(fileNumber, encodeEntry(method.getFullyQualifiedNameCharArrays(),METHOD_DECL,METHOD_DECL_LENGTH),offset,offsetLength, ICIndexStorageConstants.OFFSET);
+        output.addMethodDecl(fileNumber, method.getFullyQualifiedNameCharArrays(),offset,offsetLength, ICIndexStorageConstants.OFFSET);
     
         Iterator i=method.getParameters();
         while (i.hasNext()){
@@ -469,7 +455,7 @@
                 IASTParameterDeclaration parmDecl = (IASTParameterDeclaration) parm;
                 offset = parmDecl.getNameOffset();
                 offsetLength = parmDecl.getNameEndOffset() - offset;
-                output.addRef(fileNumber, encodeTypeEntry(new char[][]{parmDecl.getNameCharArray()}, VAR, ICSearchConstants.DECLARATIONS),offset,offsetLength, ICIndexStorageConstants.OFFSET);
+                output.addVarDecl(fileNumber, new char[][]{parmDecl.getNameCharArray()},offset,offsetLength, ICIndexStorageConstants.OFFSET);
             }
         }
     }
@@ -477,7 +463,7 @@
     public void addMethodReference(IASTMethod method, int fileNumber) {
         int offset = method.getNameOffset();
         int offsetLength = method.getNameEndOffset() - offset;
-        output.addRef(fileNumber, encodeEntry(method.getFullyQualifiedNameCharArrays(),METHOD_REF,METHOD_REF_LENGTH),offset,offsetLength, ICIndexStorageConstants.OFFSET);
+        output.addMethodRef(fileNumber, method.getFullyQualifiedNameCharArrays(),offset,offsetLength, ICIndexStorageConstants.OFFSET);
     }
 
     public void addElaboratedForwardDeclaration(IASTElaboratedTypeSpecifier elaboratedType, int fileNumber) {
@@ -486,15 +472,15 @@
         
         if (elaboratedType.getClassKind().equals(ASTClassKind.CLASS))
         {
-            output.addRef(fileNumber,encodeTypeEntry(elaboratedType.getFullyQualifiedNameCharArrays(),FWD_CLASS, ICSearchConstants.DECLARATIONS),offset,offsetLength, ICIndexStorageConstants.OFFSET);
+            output.addFwd_ClassDecl(fileNumber,elaboratedType.getFullyQualifiedNameCharArrays(),offset,offsetLength, ICIndexStorageConstants.OFFSET);
         }       
         else if (elaboratedType.getClassKind().equals(ASTClassKind.STRUCT))
         {
-            output.addRef(fileNumber,encodeTypeEntry(elaboratedType.getFullyQualifiedNameCharArrays(),FWD_STRUCT, ICSearchConstants.DECLARATIONS),offset,offsetLength, ICIndexStorageConstants.OFFSET);
+            output.addFwd_StructDecl(fileNumber,elaboratedType.getFullyQualifiedNameCharArrays(),offset,offsetLength, ICIndexStorageConstants.OFFSET);
         }
         else if (elaboratedType.getClassKind().equals(ASTClassKind.UNION))
         {
-            output.addRef(fileNumber,encodeTypeEntry(elaboratedType.getFullyQualifiedNameCharArrays(),FWD_UNION, ICSearchConstants.DECLARATIONS),offset,offsetLength, ICIndexStorageConstants.OFFSET);         
+            output.addFwd_UnionDecl(fileNumber,elaboratedType.getFullyQualifiedNameCharArrays(),offset,offsetLength, ICIndexStorageConstants.OFFSET);         
         }
     }
     
@@ -516,7 +502,7 @@
         int offset = function.getNameOffset();
         int offsetLength = function.getNameEndOffset() - offset;
         
-        output.addRef(fileNumber, encodeEntry(function.getFullyQualifiedNameCharArrays(),FUNCTION_DECL,FUNCTION_DECL_LENGTH),offset,offsetLength, ICIndexStorageConstants.OFFSET);
+        output.addFunctionDecl(fileNumber, function.getFullyQualifiedNameCharArrays(),offset,offsetLength, ICIndexStorageConstants.OFFSET);
         
         Iterator i=function.getParameters();
         while (i.hasNext()){
@@ -525,7 +511,7 @@
                 IASTParameterDeclaration parmDecl = (IASTParameterDeclaration) parm;
                 offset = parmDecl.getNameOffset();
                 offsetLength = parmDecl.getNameEndOffset() - offset;
-                output.addRef(fileNumber, encodeTypeEntry(new char[][]{parmDecl.getNameCharArray()}, VAR, ICSearchConstants.DECLARATIONS),offset,offsetLength, ICIndexStorageConstants.OFFSET);
+                output.addVarDecl(fileNumber, new char[][]{parmDecl.getNameCharArray()},offset,offsetLength, ICIndexStorageConstants.OFFSET);
             }
         }
     }
@@ -533,7 +519,7 @@
     public void addFunctionReference(IASTFunction function, int fileNumber){
         int offset = function.getNameOffset();
         int offsetLength = function.getNameEndOffset() - offset;
-        output.addRef(fileNumber, encodeEntry(function.getFullyQualifiedNameCharArrays(),FUNCTION_REF,FUNCTION_REF_LENGTH),offset,offsetLength, ICIndexStorageConstants.OFFSET);
+        output.addFunctionRef(fileNumber, function.getFullyQualifiedNameCharArrays(),offset,offsetLength, ICIndexStorageConstants.OFFSET);
     }
     
     public void addNameReference(){
@@ -543,19 +529,19 @@
     public void addNamespaceDefinition(IASTNamespaceDefinition namespace, int fileNumber){
         int offset = namespace.getNameOffset();
         int offsetLength = namespace.getNameEndOffset() - offset;
-        output.addRef(fileNumber, encodeEntry(namespace.getFullyQualifiedNameCharArrays(),NAMESPACE_DECL,NAMESPACE_DECL_LENGTH),offset,offsetLength, ICIndexStorageConstants.OFFSET);
+        output.addNamespaceDecl(fileNumber, namespace.getFullyQualifiedNameCharArrays(),offset,offsetLength, ICIndexStorageConstants.OFFSET);
     }
     
     public void addNamespaceReference(IASTNamespaceDefinition namespace, int fileNumber) {
         int offset = namespace.getNameOffset();
         int offsetLength = namespace.getNameEndOffset() - offset;
-        output.addRef(fileNumber, encodeEntry(namespace.getFullyQualifiedNameCharArrays(),NAMESPACE_REF,NAMESPACE_REF_LENGTH),offset,offsetLength, ICIndexStorageConstants.OFFSET);
+        output.addNamespaceRef(fileNumber, namespace.getFullyQualifiedNameCharArrays(),offset,offsetLength, ICIndexStorageConstants.OFFSET);
     }
     
     public void addTypedefReference( IASTTypedefDeclaration typedef, int fileNumber ){
         int offset = typedef.getNameOffset();
         int offsetLength = typedef.getNameEndOffset() - offset;
-        output.addRef(fileNumber,encodeTypeEntry( typedef.getFullyQualifiedNameCharArrays(), TYPEDEF, ICSearchConstants.REFERENCES),offset, offsetLength, ICIndexStorageConstants.OFFSET);
+        output.addTypedefRef(fileNumber, typedef.getFullyQualifiedNameCharArrays(), offset, offsetLength, ICIndexStorageConstants.OFFSET);
     }
 
     private void addSuperTypeReference(int modifiers, char[] packageName, char[] typeName, char[][] enclosingTypeNames, char classOrInterface, char[] superTypeName, char superClassOrInterface){
@@ -588,15 +574,15 @@
     
         if (classKind.equals(ASTClassKind.CLASS))
         {  
-            output.addRef(fileNumber, encodeTypeEntry(fullyQualifiedName,CLASS, ICSearchConstants.REFERENCES),offset,offsetLength, ICIndexStorageConstants.OFFSET);
+            output.addClassRef(fileNumber, fullyQualifiedName,offset,offsetLength, ICIndexStorageConstants.OFFSET);
         }       
         else if (classKind.equals(ASTClassKind.STRUCT))
         {
-            output.addRef(fileNumber, encodeTypeEntry(fullyQualifiedName,STRUCT,ICSearchConstants.REFERENCES),offset,offsetLength, ICIndexStorageConstants.OFFSET);
+            output.addStructRef(fileNumber, fullyQualifiedName,offset,offsetLength, ICIndexStorageConstants.OFFSET);
         }
         else if (classKind.equals(ASTClassKind.UNION))
         {
-            output.addRef(fileNumber, encodeTypeEntry(fullyQualifiedName,UNION,ICSearchConstants.REFERENCES),offset,offsetLength, ICIndexStorageConstants.OFFSET);         
+            output.addUnionRef(fileNumber, fullyQualifiedName,offset,offsetLength, ICIndexStorageConstants.OFFSET);         
         }
     }
     
@@ -618,15 +604,15 @@
         
         if (classKind.equals(ASTClassKind.CLASS))
         {  
-            output.addRef(fileNumber, encodeTypeEntry(fullyQualifiedName,FWD_CLASS, ICSearchConstants.REFERENCES),offset,offsetLength, ICIndexStorageConstants.OFFSET);
+            output.addFwd_ClassRef(fileNumber, fullyQualifiedName, offset,offsetLength, ICIndexStorageConstants.OFFSET);
         }       
         else if (classKind.equals(ASTClassKind.STRUCT))
         {
-            output.addRef(fileNumber, encodeTypeEntry(fullyQualifiedName,FWD_STRUCT,ICSearchConstants.REFERENCES),offset,offsetLength, ICIndexStorageConstants.OFFSET);
+            output.addFwd_StructRef(fileNumber, fullyQualifiedName, offset,offsetLength, ICIndexStorageConstants.OFFSET);
         }
         else if (classKind.equals(ASTClassKind.UNION))
         {
-            output.addRef(fileNumber, encodeTypeEntry(fullyQualifiedName,FWD_UNION,ICSearchConstants.REFERENCES),offset,offsetLength, ICIndexStorageConstants.OFFSET);         
+            output.addFwd_UnionRef(fileNumber, fullyQualifiedName, offset,offsetLength, ICIndexStorageConstants.OFFSET);         
         }
     }
 
@@ -639,130 +625,6 @@
         incName[0] = inclusion.getFullFileName().toCharArray();
         //TODO: Kludge! Get rid of BOGUS entry - need to restructure Dep Tree to use reference indexes
         int BOGUS_ENTRY = 1;
-        this.output.addRef(fileNumber, encodeEntry(incName, INCLUDE_REF, INCLUDE_REF_LENGTH),1,1, ICIndexStorageConstants.LINE);
-    }
-    
-    /**
-     * Type entries are encoded as follow: 'typeDecl/' ('C' | 'S' | 'U' | 'E' ) '/'  TypeName ['/' Qualifier]* 
-     */
-     protected static final char[] encodeTypeEntry( char[][] fullTypeName, int typeType, LimitTo encodeType){ 
-
-        int pos = 0, nameLength = 0;
-        for (int i=0; i<fullTypeName.length; i++){
-            char[] namePart = fullTypeName[i];
-            nameLength+= namePart.length;
-        }
-        
-        char [] result = null;
-        if( encodeType == REFERENCES ){
-            //char[] has to be of size - [type decl length + length of the name + separators + letter]
-            result = new char[TYPE_REF_LENGTH + nameLength + fullTypeName.length + 1 ];
-            System.arraycopy(TYPE_REF, 0, result, 0, pos = TYPE_REF_LENGTH);
-        
-        } else if( encodeType == DECLARATIONS ){
-            //char[] has to be of size - [type decl length + length of the name + separators + letter]
-            result = new char[TYPE_DECL_LENGTH + nameLength + fullTypeName.length + 1 ];
-            System.arraycopy(TYPE_DECL, 0, result, 0, pos = TYPE_DECL_LENGTH);
-        }
-        switch (typeType)
-        {
-            case(CLASS):
-            result[pos++] = CLASS_SUFFIX;
-            break;
-            
-            case(STRUCT):
-            result[pos++] = STRUCT_SUFFIX;
-            break;
-            
-            case(UNION):
-            result[pos++] = UNION_SUFFIX;
-            break;
-            
-            case(ENUM):
-            result[pos++] = ENUM_SUFFIX;
-            break;
-            
-            case (VAR):
-            result[pos++] = VAR_SUFFIX;
-            break;
-            
-            case (TYPEDEF):
-            result[pos++] = TYPEDEF_SUFFIX;
-            break;
-            
-            case(DERIVED):
-            result[pos++]= DERIVED_SUFFIX;
-            break;
-            
-            case(FRIEND):
-            result[pos++]=FRIEND_SUFFIX;
-            break;
-            
-            case(FWD_CLASS):
-            result[pos++]=FWD_CLASS_SUFFIX;
-            break;
-            
-            case (FWD_STRUCT):
-            result[pos++]=FWD_STRUCT_SUFFIX;
-            break;
-            
-            case (FWD_UNION):
-            result[pos++]=FWD_UNION_SUFFIX;
-            break;
-        }
-        result[pos++] = SEPARATOR;
-        //Encode in the following manner
-        //  [typeDecl info]/[typeName]/[qualifiers]
-        if (fullTypeName.length > 0){
-        //Extract the name first
-            char [] tempName = fullTypeName[fullTypeName.length-1];
-            System.arraycopy(tempName, 0, result, pos, tempName.length);
-            pos += tempName.length;
-        }
-        //Extract the qualifiers
-        for (int i=fullTypeName.length - 2; i >= 0; i--){
-            result[pos++] = SEPARATOR;
-            char [] tempName = fullTypeName[i];
-            System.arraycopy(tempName, 0, result, pos, tempName.length);
-            pos+=tempName.length;               
-        }
-        
-        if (AbstractIndexer.VERBOSE)
-            AbstractIndexer.verbose(new String(result));
-            
-        return result;
+        this.output.addIncludeRef(fileNumber, incName,1,1, ICIndexStorageConstants.OFFSET);
     }
-    /**
-     * Namespace entries are encoded as follow: '[prefix]/' TypeName ['/' Qualifier]*
-     */
-    protected static final char[] encodeEntry(char[][] elementName, char[] prefix, int prefixSize){ 
-        int pos, nameLength = 0;
-        for (int i=0; i<elementName.length; i++){
-            char[] namePart = elementName[i];
-            nameLength+= namePart.length;
-        }
-        //char[] has to be of size - [type length + length of the name (including qualifiers) + 
-        //separators (need one less than fully qualified name length)
-        char[] result = new char[prefixSize + nameLength + elementName.length - 1 ];
-        System.arraycopy(prefix, 0, result, 0, pos = prefix.length);
-        if (elementName.length > 0){
-        //Extract the name first
-            char [] tempName = elementName[elementName.length-1];
-            System.arraycopy(tempName, 0, result, pos, tempName.length);
-            pos += tempName.length;
-        }
-        //Extract the qualifiers
-        for (int i=elementName.length - 2; i>=0; i--){
-            result[pos++] = SEPARATOR;
-            char [] tempName = elementName[i];
-            System.arraycopy(tempName, 0, result, pos, tempName.length);
-            pos+=tempName.length;               
-        }
-        
-        if (AbstractIndexer.VERBOSE)
-            AbstractIndexer.verbose(new String(result));
-            
-        return result;
-    }
-    
 }
Index: index/org/eclipse/cdt/internal/core/search/indexing/IIndexConstants.java
===================================================================
RCS file: index/org/eclipse/cdt/internal/core/search/indexing/IIndexConstants.java
diff -N index/org/eclipse/cdt/internal/core/search/indexing/IIndexConstants.java
--- index/org/eclipse/cdt/internal/core/search/indexing/IIndexConstants.java	11 Aug 2004 19:50:26 -0000	1.13
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.internal.core.search.indexing;
-/**
- * @author bgheorgh
- */
-public interface IIndexConstants {
-
-	/* index encoding */
-	char[] REF= "ref/".toCharArray(); //$NON-NLS-1$
-	
-	char[] TYPE_REF= "typeRef/".toCharArray(); //$NON-NLS-1$
-	int TYPE_REF_LENGTH = 8;
-	
-	char[] TYPE_DECL = "typeDecl/".toCharArray(); //$NON-NLS-1$
-	char[] TYPE_ALL = "type".toCharArray(); //$NON-NLS-1$
-	int TYPE_DECL_LENGTH = 9;
-	
-	char[] FUNCTION_REF= "functionRef/".toCharArray(); //$NON-NLS-1$
-	int FUNCTION_REF_LENGTH=12;
-	
-	char[] FUNCTION_DECL= "functionDecl/".toCharArray(); //$NON-NLS-1$
-	char[] FUNCTION_ALL= "function".toCharArray(); //$NON-NLS-1$
-	int FUNCTION_DECL_LENGTH = 13;
-		
-	char[] CONSTRUCTOR_REF= "constructorRef/".toCharArray(); //$NON-NLS-1$
-	char[] CONSTRUCTOR_DECL= "constructorDecl/".toCharArray(); //$NON-NLS-1$
-	
-	char[] NAMESPACE_REF= "namespaceRef/".toCharArray(); //$NON-NLS-1$
-	int NAMESPACE_REF_LENGTH=13;
-	
-	char[] NAMESPACE_DECL= "namespaceDecl/".toCharArray(); //$NON-NLS-1$
-	char[] NAMESPACE_ALL = "namespace".toCharArray(); //$NON-NLS-1$
-	int NAMESPACE_DECL_LENGTH = 14;
-	
-		
-	char[] FIELD_REF= "fieldRef/".toCharArray(); //$NON-NLS-1$
-	int FIELD_REF_LENGTH=9;
-	
-	char[] FIELD_DECL= "fieldDecl/".toCharArray(); //$NON-NLS-1$
-	char[] FIELD_ALL= "field".toCharArray(); //$NON-NLS-1$
-	int FIELD_DECL_LENGTH = 10;
-	
-	char[] ENUMTOR_REF= "enumtorRef/".toCharArray(); //$NON-NLS-1$
-	int ENUMTOR_REF_LENGTH=11;
-	
-	char[] ENUMTOR_DECL = "enumtorDecl/".toCharArray(); //$NON-NLS-1$
-	char[] ENUMTOR_ALL = "enumtor".toCharArray(); //$NON-NLS-1$
-	int ENUMTOR_DECL_LENGTH = 12;
-	
-	char[] METHOD_REF= "methodRef/".toCharArray(); //$NON-NLS-1$
-	int METHOD_REF_LENGTH = 10;
-	
-	char[] METHOD_DECL= "methodDecl/".toCharArray(); //$NON-NLS-1$
-	char[] METHOD_ALL= "method".toCharArray(); //$NON-NLS-1$
-	int METHOD_DECL_LENGTH = 11;
-		
-	char[] TYPEDEF_DECL = "typeDecl/T/".toCharArray(); //$NON-NLS-1$
-	int TYPEDEF_DECL_LENGTH = 11;
-	
-	char[] MACRO_DECL = "macroDecl/".toCharArray(); //$NON-NLS-1$
-	int MACRO_DECL_LENGTH = 10;
-	
-	char[] INCLUDE_REF = "includeRef/".toCharArray(); //$NON-NLS-1$
-	int INCLUDE_REF_LENGTH = 11;
-	//a Var REF will be treated as  a typeREF
-	//char[] VAR_REF= "varRef/".toCharArray(); //$NON-NLS-1$
-	
-	//a Struct REF will be treated as  a typeREF
-	//char[] STRUCT_REF= "structRef/".toCharArray(); //$NON-NLS-1$
-	
-	//a Enum REF will be treated as a typeREF
-	//char[] ENUM_REF= "enumRef/".toCharArray(); //$NON-NLS-1$
-
-    //a UNION REF will be treated as a typeREF
-	//char[] UNION_REF= "unionRef/".toCharArray(); //$NON-NLS-1$
-	
-	
-	char[] SUPER_REF = "superRef/".toCharArray(); //$NON-NLS-1$
-
-	char[] CLASS_DECL= "typeDecl/C/".toCharArray(); //$NON-NLS-1$
-	char[] VAR_DECL= "typeDecl/V/".toCharArray(); //$NON-NLS-1$
-	char[] STRUCT_DECL= "typeDecl/S/".toCharArray(); //$NON-NLS-1$
-	char[] ENUM_DECL= "typeDecl/E/".toCharArray(); //$NON-NLS-1$
-	char[] UNION_DECL= "typeDecl/U/".toCharArray(); //$NON-NLS-1$
-	
-	char[] OBJECT = "Object".toCharArray(); //$NON-NLS-1$
-	char[][] COUNTS= 
-		new char[][] { new char[] {'0'}, new char[] {'1'}, new char[] {'2'}, new char[] {'3'}, new char[] {'4'}, new char[] {'5'}, new char[] {'6'}, new char[] {'7'}, new char[] {'8'}, new char[] {'9'}
-	};
-	char CLASS_SUFFIX = 'C';
-	char VAR_SUFFIX = 'V';
-	char STRUCT_SUFFIX = 'S';
-	char ENUM_SUFFIX = 'E';
-	char UNION_SUFFIX = 'U';
-	char TYPEDEF_SUFFIX = 'T';
-	char DERIVED_SUFFIX = 'D';
-	char FRIEND_SUFFIX = 'F';
-	char FWD_CLASS_SUFFIX = 'G';
-	char FWD_STRUCT_SUFFIX = 'H';
-	char FWD_UNION_SUFFIX = 'I';
-	
-	char TYPE_SUFFIX = 0;
-	char SEPARATOR= '/';
-
-	char[] ONE_STAR = new char[] {'*'};
-	char[][] ONE_STAR_CHAR = new char[][] {ONE_STAR};
-
-	// used as special marker for enclosing type name of local and anonymous classes
-	char[] ONE_ZERO = new char[] {'0'}; 
-	char[][] ONE_ZERO_CHAR = new char[][] {ONE_ZERO};
-}
Index: index/org/eclipse/cdt/internal/core/search/indexing/IIndexEncodingConstants.java
===================================================================
RCS file: index/org/eclipse/cdt/internal/core/search/indexing/IIndexEncodingConstants.java
diff -N index/org/eclipse/cdt/internal/core/search/indexing/IIndexEncodingConstants.java
--- index/org/eclipse/cdt/internal/core/search/indexing/IIndexEncodingConstants.java	29 Mar 2005 20:48:53 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,91 +0,0 @@
-/***********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: 
- * IBM - Initial API and implementation
- ***********************************************************************/
-package org.eclipse.cdt.internal.core.search.indexing;
-
-
-public interface IIndexEncodingConstants {
-    public class EntryType {
-        public int toInt() {
-            return type;
-        }
-        private EntryType(int type) {
-            this.type = type;
-        }
-        private int type;
-        
-    }
-    // entry types
-    final static EntryType CLASS = new EntryType(1);
-    final static EntryType STRUCT = new EntryType(2);
-    final static EntryType UNION = new EntryType(3);
-    final static EntryType ENUM = new EntryType(4);
-    final static EntryType VAR = new EntryType(5);
-    final static EntryType TYPEDEF = new EntryType(6);
-    final static EntryType DERIVED = new EntryType(7);
-    final static EntryType FRIEND = new EntryType(8);
-    final static EntryType FWD_CLASS = new EntryType(9);
-    final static EntryType FWD_STRUCT = new EntryType(10);
-    final static EntryType FWD_UNION = new EntryType(11);
-    final static EntryType NAMESPACE = new EntryType(12);
-    final static EntryType ENUMERATOR = new EntryType(13);
-    final static EntryType FIELD = new EntryType(14);
-    final static EntryType METHOD = new EntryType(15);
-    final static EntryType FUNCTION = new EntryType(16);
-    final static EntryType MACRO = new EntryType(17);
-    final static EntryType INCLUDE = new EntryType(18);
-
-    final static char[][] encodedTypeNames_Decl = {
-        new char[] {' '},   // not used
-        "typeDecl/C/".toCharArray(),    // CLASS            //$NON-NLS-1$
-        "typeDecl/S/".toCharArray(),    // STRUCT           //$NON-NLS-1$
-        "typeDecl/U/".toCharArray(),    // UNION            //$NON-NLS-1$
-        "typeDecl/E/".toCharArray(),    // ENUM             //$NON-NLS-1$
-        "typeDecl/V/".toCharArray(),    // VAR              //$NON-NLS-1$
-        "typeDecl/T/".toCharArray(),    // TYPEDEF          //$NON-NLS-1$
-        "typeDecl/D/".toCharArray(),    // DERIVED          //$NON-NLS-1$
-        "typeDecl/F/".toCharArray(),    // FIREND           //$NON-NLS-1$
-        "typeDecl/G/".toCharArray(),    // FWD_CLASS        //$NON-NLS-1$
-        "typeDecl/H/".toCharArray(),    // FWD_STRUCT       //$NON-NLS-1$
-        "typeDecl/I/".toCharArray(),    // FWD_UNION        //$NON-NLS-1$
-        "namespaceDecl/".toCharArray(), // NAMESPACE        //$NON-NLS-1$
-        "enumtorDecl/".toCharArray(),   // ENUMERATOR       //$NON-NLS-1$
-        "fieldDecl/".toCharArray(),     // FIELD            //$NON-NLS-1$
-        "methodDecl/".toCharArray(),    // METHOD           //$NON-NLS-1$
-        "functionDecl/".toCharArray(),  // FUNCTION         //$NON-NLS-1$
-        "macroDecl/".toCharArray(),     // MACRO            //$NON-NLS-1$
-        "includeDecl/".toCharArray()    // INCLUDE-unused   //$NON-NLS-1$
-    };
-    
-    final static char[][] encodedTypeNames_Ref = {
-        new char[] {' '},   // not used
-        "typeRef/C/".toCharArray(),    // CLASS             //$NON-NLS-1$
-        "typeRef/S/".toCharArray(),    // STRUCT            //$NON-NLS-1$
-        "typeRef/U/".toCharArray(),    // UNION             //$NON-NLS-1$
-        "typeRef/E/".toCharArray(),    // ENUM              //$NON-NLS-1$
-        "typeRef/V/".toCharArray(),    // VAR               //$NON-NLS-1$
-        "typeRef/T/".toCharArray(),    // TYPEDEF           //$NON-NLS-1$
-        "typeRef/D/".toCharArray(),    // DERIVED           //$NON-NLS-1$
-        "typeRef/F/".toCharArray(),    // FIREND            //$NON-NLS-1$
-        "typeRef/G/".toCharArray(),    // FWD_CLASS-unused  //$NON-NLS-1$
-        "typeRef/H/".toCharArray(),    // FWD_STRUCT-unused //$NON-NLS-1$
-        "typeRef/I/".toCharArray(),    // FWD_UNION-unused  //$NON-NLS-1$
-        "namespaceRef/".toCharArray(), // NAMESPACE         //$NON-NLS-1$
-        "enumtorRef/".toCharArray(),   // ENUMERATOR        //$NON-NLS-1$
-        "fieldRef/".toCharArray(),     // FIELD             //$NON-NLS-1$
-        "methodRef/".toCharArray(),    // METHOD            //$NON-NLS-1$
-        "functionRef/".toCharArray(),  // FUNCTION          //$NON-NLS-1$
-        "macroRef/".toCharArray(),     // MACRO-unused      //$NON-NLS-1$
-        "includeRef/".toCharArray()    // INCLUDE           //$NON-NLS-1$
-    };
-        
-    final static char SEPARATOR= '/';
-    
-}
Index: model/org/eclipse/cdt/core/model/CoreModel.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CoreModel.java,v
retrieving revision 1.56
diff -u -r1.56 CoreModel.java
--- model/org/eclipse/cdt/core/model/CoreModel.java	11 Apr 2005 05:16:11 -0000	1.56
+++ model/org/eclipse/cdt/core/model/CoreModel.java	19 Apr 2005 17:43:15 -0000
@@ -42,7 +42,6 @@
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Plugin;
 import org.eclipse.core.runtime.jobs.ISchedulingRule;
 
 public class CoreModel {
Index: search/org/eclipse/cdt/internal/core/search/matching/CSearchPattern.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/CSearchPattern.java,v
retrieving revision 1.52
diff -u -r1.52 CSearchPattern.java
--- search/org/eclipse/cdt/internal/core/search/matching/CSearchPattern.java	7 Apr 2005 20:19:53 -0000	1.52
+++ search/org/eclipse/cdt/internal/core/search/matching/CSearchPattern.java	19 Apr 2005 17:43:17 -0000
@@ -48,14 +48,13 @@
 import org.eclipse.cdt.internal.core.index.cindexstorage.io.BlocksIndexInput;
 import org.eclipse.cdt.internal.core.index.cindexstorage.io.IndexInput;
 import org.eclipse.cdt.internal.core.search.IIndexSearchRequestor;
-import org.eclipse.cdt.internal.core.search.indexing.IIndexConstants;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.OperationCanceledException;
 
 /**
  * @author aniefer
  */
-public abstract class CSearchPattern implements ICSearchConstants, ICSearchPattern, IIndexConstants {
+public abstract class CSearchPattern implements ICSearchConstants, ICSearchPattern {
 	
 	public static final int IMPOSSIBLE_MATCH = 0;
 	public static final int POSSIBLE_MATCH   = 1;
Index: search/org/eclipse/cdt/internal/core/search/matching/ClassDeclarationPattern.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/ClassDeclarationPattern.java,v
retrieving revision 1.24
diff -u -r1.24 ClassDeclarationPattern.java
--- search/org/eclipse/cdt/internal/core/search/matching/ClassDeclarationPattern.java	7 Apr 2005 20:19:53 -0000	1.24
+++ search/org/eclipse/cdt/internal/core/search/matching/ClassDeclarationPattern.java	19 Apr 2005 17:43:17 -0000
@@ -27,8 +27,8 @@
 import org.eclipse.cdt.internal.core.CharOperation;
 import org.eclipse.cdt.internal.core.index.IEntryResult;
 import org.eclipse.cdt.internal.core.index.cindexstorage.IndexedFileEntry;
+import org.eclipse.cdt.internal.core.index.cindexstorage.IndexerOutput;
 import org.eclipse.cdt.internal.core.index.cindexstorage.io.IndexInput;
-import org.eclipse.cdt.internal.core.index.sourceindexer.AbstractIndexer;
 import org.eclipse.cdt.internal.core.search.IIndexSearchRequestor;
 
 
@@ -155,7 +155,7 @@
 
 	
 	public void feedIndexRequestor(IIndexSearchRequestor requestor, int detailLevel, int[] references,IndexInput input, ICSearchScope scope) throws IOException {
-		boolean isClass = decodedType == CLASS_SUFFIX;
+		boolean isClass = decodedType == IndexerOutput.CLASS_SUFFIX;
 		for (int i = 0, max = references.length; i < max; i++) {
 			IndexedFileEntry file = input.getIndexedFile(references[i]);
 			String path;
@@ -180,12 +180,12 @@
 		char[] word = entryResult.getWord();
 		int size = word.length;
 		
-		int firstSlash = CharOperation.indexOf( SEPARATOR, word, 0 );
+		int firstSlash = CharOperation.indexOf( IndexerOutput.SEPARATOR, word, 0 );
 		
 		this.decodedType = word[ firstSlash + 1 ];
 		firstSlash += 2;
 		
-		int slash = CharOperation.indexOf( SEPARATOR, word, firstSlash + 1 );
+		int slash = CharOperation.indexOf( IndexerOutput.SEPARATOR, word, firstSlash + 1 );
 		
 		this.decodedSimpleName = CharOperation.subarray( word, firstSlash + 1, slash );
 	
@@ -199,7 +199,7 @@
 	}
 
 	public char[] indexEntryPrefix() {
-		return AbstractIndexer.bestTypePrefix(
+		return IndexerOutput.bestTypePrefix(
 				searchFor,
 				getLimitTo(),
 				simpleName,
@@ -212,30 +212,30 @@
 	protected boolean matchIndexEntry() {
 		//check type matches
 		if( classKind == null ){
-			if( searchFor == TYPEDEF && decodedType != TYPEDEF_SUFFIX ){
+			if( searchFor == TYPEDEF && decodedType != IndexerOutput.TYPEDEF_SUFFIX ){
 				return false;
 			}
 			//don't match variable entries
-			if( decodedType == VAR_SUFFIX ){
+			if( decodedType == IndexerOutput.VAR_SUFFIX ){
 				return false;
 			}
 		} else if( classKind == ASTClassKind.CLASS ) {
-			if( decodedType != CLASS_SUFFIX &&
-				decodedType != FWD_CLASS_SUFFIX){
+			if( decodedType != IndexerOutput.CLASS_SUFFIX &&
+				decodedType != IndexerOutput.FWD_CLASS_SUFFIX){
 				return false;
 			} 
 		} else if ( classKind == ASTClassKind.STRUCT ) {
-			if( decodedType != STRUCT_SUFFIX &&
-				decodedType != FWD_STRUCT_SUFFIX){
+			if( decodedType != IndexerOutput.STRUCT_SUFFIX &&
+				decodedType != IndexerOutput.FWD_STRUCT_SUFFIX){
 				return false;
 			}
 		} else if ( classKind == ASTClassKind.UNION ) {
-			if( decodedType != UNION_SUFFIX &&
-				decodedType != FWD_UNION_SUFFIX){
+			if( decodedType != IndexerOutput.UNION_SUFFIX &&
+				decodedType != IndexerOutput.FWD_UNION_SUFFIX){
 				return false;
 			}
 		} else if ( classKind == ASTClassKind.ENUM ) {
-			if( decodedType != ENUM_SUFFIX ) {
+			if( decodedType != IndexerOutput.ENUM_SUFFIX ) {
 				return false;
 			}
 		}
Index: search/org/eclipse/cdt/internal/core/search/matching/DerivedTypesPattern.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/DerivedTypesPattern.java,v
retrieving revision 1.6
diff -u -r1.6 DerivedTypesPattern.java
--- search/org/eclipse/cdt/internal/core/search/matching/DerivedTypesPattern.java	14 Mar 2005 05:32:06 -0000	1.6
+++ search/org/eclipse/cdt/internal/core/search/matching/DerivedTypesPattern.java	19 Apr 2005 17:43:17 -0000
@@ -23,7 +23,7 @@
 import org.eclipse.cdt.core.parser.ast.IASTBaseSpecifier;
 import org.eclipse.cdt.core.parser.ast.IASTClassSpecifier;
 import org.eclipse.cdt.core.parser.ast.IASTTypeSpecifier;
-import org.eclipse.cdt.internal.core.index.sourceindexer.AbstractIndexer;
+import org.eclipse.cdt.internal.core.index.cindexstorage.IndexerOutput;
 
 /**
  * @author bgheorgh
@@ -46,7 +46,7 @@
 	}
 	
 	public char[] indexEntryPrefix() {
-		return AbstractIndexer.bestTypePrefix(
+		return IndexerOutput.bestTypePrefix(
 				searchFor,
 				getLimitTo(),
 				simpleName,
@@ -57,7 +57,7 @@
 	}
 	
 	protected boolean matchIndexEntry() {
-	    if( decodedType != DERIVED_SUFFIX ){
+	    if( decodedType != IndexerOutput.DERIVED_SUFFIX ){
 			return false;
 		}
 	    
Index: search/org/eclipse/cdt/internal/core/search/matching/FieldDeclarationPattern.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/FieldDeclarationPattern.java,v
retrieving revision 1.19
diff -u -r1.19 FieldDeclarationPattern.java
--- search/org/eclipse/cdt/internal/core/search/matching/FieldDeclarationPattern.java	7 Apr 2005 20:19:53 -0000	1.19
+++ search/org/eclipse/cdt/internal/core/search/matching/FieldDeclarationPattern.java	19 Apr 2005 17:43:17 -0000
@@ -28,8 +28,8 @@
 import org.eclipse.cdt.internal.core.CharOperation;
 import org.eclipse.cdt.internal.core.index.IEntryResult;
 import org.eclipse.cdt.internal.core.index.cindexstorage.IndexedFileEntry;
+import org.eclipse.cdt.internal.core.index.cindexstorage.IndexerOutput;
 import org.eclipse.cdt.internal.core.index.cindexstorage.io.IndexInput;
-import org.eclipse.cdt.internal.core.index.sourceindexer.AbstractIndexer;
 import org.eclipse.cdt.internal.core.search.IIndexSearchRequestor;
 
 
@@ -108,15 +108,15 @@
 	
 	public char[] indexEntryPrefix() {
 		if( searchFor == FIELD ){
-			return AbstractIndexer.bestFieldPrefix( _limitTo, simpleName, qualifications, _matchMode, _caseSensitive );
+			return IndexerOutput.bestFieldPrefix( _limitTo, simpleName, qualifications, _matchMode, _caseSensitive );
 		} else if( searchFor == VAR ) {
-			return AbstractIndexer.bestVariablePrefix(
+			return IndexerOutput.bestVariablePrefix(
 							_limitTo,
 							simpleName, qualifications,
 							_matchMode, _caseSensitive
 			);
 		} else if (searchFor == ENUMTOR) {
-			return AbstractIndexer.bestEnumeratorPrefix(_limitTo, simpleName, qualifications, _matchMode, _caseSensitive );
+			return IndexerOutput.bestEnumeratorPrefix(_limitTo, simpleName, qualifications, _matchMode, _caseSensitive );
 		}
 		return null;		
 	}
@@ -133,15 +133,15 @@
 		int slash = 0;
 		
 		if( searchFor == FIELD ){
-			firstSlash = CharOperation.indexOf( SEPARATOR, word, 0 );
-			slash = CharOperation.indexOf(SEPARATOR, word, firstSlash + 1);
+			firstSlash = CharOperation.indexOf( IndexerOutput.SEPARATOR, word, 0 );
+			slash = CharOperation.indexOf(IndexerOutput.SEPARATOR, word, firstSlash + 1);
 		} else if( searchFor == VAR ) {
-			int realStart = CharOperation.indexOf( SEPARATOR, word, 0 );
-			firstSlash = CharOperation.indexOf( SEPARATOR, word, realStart + 1);
-			slash = CharOperation.indexOf(SEPARATOR, word, firstSlash + 1);
+			int realStart = CharOperation.indexOf( IndexerOutput.SEPARATOR, word, 0 );
+			firstSlash = CharOperation.indexOf( IndexerOutput.SEPARATOR, word, realStart + 1);
+			slash = CharOperation.indexOf(IndexerOutput.SEPARATOR, word, firstSlash + 1);
 		} else if ( searchFor == ENUMTOR ){
-			firstSlash = CharOperation.indexOf( SEPARATOR, word, 0 );
-			slash = CharOperation.indexOf(SEPARATOR, word, firstSlash + 1);
+			firstSlash = CharOperation.indexOf( IndexerOutput.SEPARATOR, word, 0 );
+			slash = CharOperation.indexOf(IndexerOutput.SEPARATOR, word, firstSlash + 1);
 		}
 				
 		this.decodedSimpleName = CharOperation.subarray(word, firstSlash + 1, slash);
Index: search/org/eclipse/cdt/internal/core/search/matching/FriendPattern.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/FriendPattern.java,v
retrieving revision 1.7
diff -u -r1.7 FriendPattern.java
--- search/org/eclipse/cdt/internal/core/search/matching/FriendPattern.java	14 Mar 2005 05:32:06 -0000	1.7
+++ search/org/eclipse/cdt/internal/core/search/matching/FriendPattern.java	19 Apr 2005 17:43:17 -0000
@@ -22,7 +22,7 @@
 import org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate;
 import org.eclipse.cdt.core.parser.ast.IASTClassSpecifier;
 import org.eclipse.cdt.core.parser.ast.IASTElaboratedTypeSpecifier;
-import org.eclipse.cdt.internal.core.index.sourceindexer.AbstractIndexer;
+import org.eclipse.cdt.internal.core.index.cindexstorage.IndexerOutput;
 
 /**
  * @author bgheorgh
@@ -45,7 +45,7 @@
 	}
 	
 	public char[] indexEntryPrefix() {
-		return AbstractIndexer.bestTypePrefix(
+		return IndexerOutput.bestTypePrefix(
 				searchFor,
 				getLimitTo(),
 				simpleName,
@@ -56,7 +56,7 @@
 	}
 	
 	protected boolean matchIndexEntry() {
-	    if( decodedType != FRIEND_SUFFIX ){
+	    if( decodedType != IndexerOutput.FRIEND_SUFFIX ){
 			return false;
 		}
 	    
Index: search/org/eclipse/cdt/internal/core/search/matching/IncludePattern.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/IncludePattern.java,v
retrieving revision 1.7
diff -u -r1.7 IncludePattern.java
--- search/org/eclipse/cdt/internal/core/search/matching/IncludePattern.java	7 Apr 2005 20:19:53 -0000	1.7
+++ search/org/eclipse/cdt/internal/core/search/matching/IncludePattern.java	19 Apr 2005 17:43:17 -0000
@@ -19,8 +19,8 @@
 import org.eclipse.cdt.internal.core.CharOperation;
 import org.eclipse.cdt.internal.core.index.IEntryResult;
 import org.eclipse.cdt.internal.core.index.cindexstorage.IndexedFileEntry;
+import org.eclipse.cdt.internal.core.index.cindexstorage.IndexerOutput;
 import org.eclipse.cdt.internal.core.index.cindexstorage.io.IndexInput;
-import org.eclipse.cdt.internal.core.index.sourceindexer.AbstractIndexer;
 import org.eclipse.cdt.internal.core.search.IIndexSearchRequestor;
 
 /**
@@ -43,7 +43,7 @@
 	protected void decodeIndexEntry(IEntryResult entryResult) {
 		char[] word = entryResult.getWord();
 	
-		int firstSlash = CharOperation.indexOf( SEPARATOR, word, 0 );
+		int firstSlash = CharOperation.indexOf( IndexerOutput.SEPARATOR, word, 0 );
 
 		this.decodedSimpleName = CharOperation.subarray(word, firstSlash + 1, -1);
 	}
@@ -73,7 +73,7 @@
 	 * @see org.eclipse.cdt.internal.core.search.matching.CSearchPattern#indexEntryPrefix()
 	 */
 	public char[] indexEntryPrefix() {
-		return AbstractIndexer.bestIncludePrefix(
+		return IndexerOutput.bestIncludePrefix(
 							_limitTo,
 							simpleName,
 							_matchMode, _caseSensitive
Index: search/org/eclipse/cdt/internal/core/search/matching/MacroDeclarationPattern.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/MacroDeclarationPattern.java,v
retrieving revision 1.9
diff -u -r1.9 MacroDeclarationPattern.java
--- search/org/eclipse/cdt/internal/core/search/matching/MacroDeclarationPattern.java	7 Apr 2005 20:19:53 -0000	1.9
+++ search/org/eclipse/cdt/internal/core/search/matching/MacroDeclarationPattern.java	19 Apr 2005 17:43:17 -0000
@@ -22,8 +22,8 @@
 import org.eclipse.cdt.internal.core.CharOperation;
 import org.eclipse.cdt.internal.core.index.IEntryResult;
 import org.eclipse.cdt.internal.core.index.cindexstorage.IndexedFileEntry;
+import org.eclipse.cdt.internal.core.index.cindexstorage.IndexerOutput;
 import org.eclipse.cdt.internal.core.index.cindexstorage.io.IndexInput;
-import org.eclipse.cdt.internal.core.index.sourceindexer.AbstractIndexer;
 import org.eclipse.cdt.internal.core.search.IIndexSearchRequestor;
 
 /**
@@ -87,7 +87,7 @@
 	protected void decodeIndexEntry(IEntryResult entryResult) {
 		char[] word = entryResult.getWord();
 		
-		int firstSlash = CharOperation.indexOf( SEPARATOR, word, 0 );
+		int firstSlash = CharOperation.indexOf( IndexerOutput.SEPARATOR, word, 0 );
 	
 		this.decodedSimpleName = CharOperation.subarray(word, firstSlash + 1, -1);
 	}
@@ -96,7 +96,7 @@
 	 * @see org.eclipse.cdt.internal.core.search.matching.CSearchPattern#indexEntryPrefix()
 	 */
 	public char[] indexEntryPrefix() {
-		return AbstractIndexer.bestMacroPrefix(
+		return IndexerOutput.bestMacroPrefix(
 						_limitTo,
 						simpleName,
 						_matchMode, _caseSensitive
Index: search/org/eclipse/cdt/internal/core/search/matching/MethodDeclarationPattern.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/MethodDeclarationPattern.java,v
retrieving revision 1.21
diff -u -r1.21 MethodDeclarationPattern.java
--- search/org/eclipse/cdt/internal/core/search/matching/MethodDeclarationPattern.java	7 Apr 2005 20:19:53 -0000	1.21
+++ search/org/eclipse/cdt/internal/core/search/matching/MethodDeclarationPattern.java	19 Apr 2005 17:43:17 -0000
@@ -24,8 +24,8 @@
 import org.eclipse.cdt.internal.core.CharOperation;
 import org.eclipse.cdt.internal.core.index.IEntryResult;
 import org.eclipse.cdt.internal.core.index.cindexstorage.IndexedFileEntry;
+import org.eclipse.cdt.internal.core.index.cindexstorage.IndexerOutput;
 import org.eclipse.cdt.internal.core.index.cindexstorage.io.IndexInput;
-import org.eclipse.cdt.internal.core.index.sourceindexer.AbstractIndexer;
 import org.eclipse.cdt.internal.core.search.IIndexSearchRequestor;
 
 /**
@@ -123,9 +123,9 @@
 	
 	public char[] indexEntryPrefix() {
 		if( searchFor == FUNCTION )
-			return AbstractIndexer.bestFunctionPrefix( _limitTo, simpleName, _matchMode, _caseSensitive );
+			return IndexerOutput.bestFunctionPrefix( _limitTo, simpleName, _matchMode, _caseSensitive );
 		else if( searchFor == METHOD )
-			return AbstractIndexer.bestMethodPrefix( _limitTo, simpleName, qualifications, _matchMode, _caseSensitive );
+			return IndexerOutput.bestMethodPrefix( _limitTo, simpleName, qualifications, _matchMode, _caseSensitive );
 		else return null;
 	}
 	
@@ -138,9 +138,9 @@
 		char[] word = entryResult.getWord();
 		int size = word.length;
 		
-		int firstSlash = CharOperation.indexOf( SEPARATOR, word, 0 );
+		int firstSlash = CharOperation.indexOf( IndexerOutput.SEPARATOR, word, 0 );
 		
-		int slash = CharOperation.indexOf( SEPARATOR, word, firstSlash + 1 );
+		int slash = CharOperation.indexOf( IndexerOutput.SEPARATOR, word, firstSlash + 1 );
 		
 		this.decodedSimpleName = CharOperation.subarray(word, firstSlash + 1, slash);
 		
Index: search/org/eclipse/cdt/internal/core/search/matching/NamespaceDeclarationPattern.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/NamespaceDeclarationPattern.java,v
retrieving revision 1.12
diff -u -r1.12 NamespaceDeclarationPattern.java
--- search/org/eclipse/cdt/internal/core/search/matching/NamespaceDeclarationPattern.java	7 Apr 2005 20:19:53 -0000	1.12
+++ search/org/eclipse/cdt/internal/core/search/matching/NamespaceDeclarationPattern.java	19 Apr 2005 17:43:17 -0000
@@ -21,8 +21,8 @@
 import org.eclipse.cdt.internal.core.CharOperation;
 import org.eclipse.cdt.internal.core.index.IEntryResult;
 import org.eclipse.cdt.internal.core.index.cindexstorage.IndexedFileEntry;
+import org.eclipse.cdt.internal.core.index.cindexstorage.IndexerOutput;
 import org.eclipse.cdt.internal.core.index.cindexstorage.io.IndexInput;
-import org.eclipse.cdt.internal.core.index.sourceindexer.AbstractIndexer;
 import org.eclipse.cdt.internal.core.search.IIndexSearchRequestor;
 
 /**
@@ -101,9 +101,9 @@
 		char[] word = entryResult.getWord();
 		int size = word.length;
 
-		int firstSlash = CharOperation.indexOf( SEPARATOR, word, 0 );
+		int firstSlash = CharOperation.indexOf( IndexerOutput.SEPARATOR, word, 0 );
 		
-		int slash = CharOperation.indexOf(SEPARATOR, word, firstSlash + 1);
+		int slash = CharOperation.indexOf(IndexerOutput.SEPARATOR, word, firstSlash + 1);
 		
 		this.decodedSimpleName = CharOperation.subarray(word, firstSlash+1, slash);
 	
@@ -121,7 +121,7 @@
 	 * @see org.eclipse.cdt.internal.core.search.matching.CSearchPattern#indexEntryPrefix()
 	 */
 	public char[] indexEntryPrefix() {
-		return AbstractIndexer.bestNamespacePrefix(
+		return IndexerOutput.bestNamespacePrefix(
 				_limitTo,
 				simpleName,
 				qualifications,
Index: indexer/org/eclipse/cdt/core/indexer/tests/SourceIndexerTests.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.core.tests/indexer/org/eclipse/cdt/core/indexer/tests/SourceIndexerTests.java,v
retrieving revision 1.7
diff -u -r1.7 SourceIndexerTests.java
--- indexer/org/eclipse/cdt/core/indexer/tests/SourceIndexerTests.java	9 Apr 2005 18:43:05 -0000	1.7
+++ indexer/org/eclipse/cdt/core/indexer/tests/SourceIndexerTests.java	19 Apr 2005 17:43:34 -0000
@@ -32,8 +32,8 @@
 import org.eclipse.cdt.internal.core.index.IEntryResult;
 import org.eclipse.cdt.internal.core.index.IIndex;
 import org.eclipse.cdt.internal.core.index.IQueryResult;
+import org.eclipse.cdt.internal.core.index.cindexstorage.IndexerOutput;
 import org.eclipse.cdt.internal.core.index.sourceindexer.SourceIndexer;
-import org.eclipse.cdt.internal.core.search.indexing.IIndexConstants;
 import org.eclipse.cdt.internal.core.search.indexing.IndexManager;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IProject;
@@ -261,7 +261,7 @@
 		char[] prefix = "typeDecl/C/CDocumentManager".toCharArray(); //$NON-NLS-1$
 		String [] entryResultModel ={"EntryResult: word=typeDecl/C/CDocumentManager, refs={ 2 }, offsets={ [ 2127] }"}; //$NON-NLS-1$
 		IEntryResult[] eresults =ind.queryEntries(prefix);
-		IEntryResult[] bogRe = ind.queryEntries(IIndexConstants.TYPE_DECL);
+		IEntryResult[] bogRe = ind.queryEntries(IndexerOutput.TYPE_DECL);
 		assertTrue("Entry Result exists", eresults != null); //$NON-NLS-1$
 		
 		if (eresults.length != entryResultModel.length)
@@ -383,7 +383,7 @@
 		IIndex ind = sourceIndexer.getIndex(testProjectPath,true,true);
 		assertTrue("Index exists for project",ind != null);  //$NON-NLS-1$ //$NON-NLS-2$ 
 	
-		IEntryResult[] typerefreesults = ind.queryEntries(IIndexConstants.TYPE_REF);
+		IEntryResult[] typerefreesults = ind.queryEntries(IndexerOutput.TYPE_REF);
 		assertTrue("Type Ref Results exist", typerefreesults != null);  //$NON-NLS-1$
 		
 		String [] typeDeclEntryResultModel ={"EntryResult: word=typeDecl/C/Mail/Y/X/Z, refs={ 1 }, offsets={ [ 2335] }","EntryResult: word=typeDecl/C/Unknown/Y/X/Z, refs={ 1 }, offsets={ [ 21063] }",  //$NON-NLS-1$ //$NON-NLS-2$ 
@@ -396,7 +396,7 @@
 				"EntryResult: word=typeDecl/V/temp, refs={ 1 }, offsets={ [ 22463] }", "EntryResult: word=typeDecl/V/x, refs={ 1 }, offsets={ [ 21589, 21965] }",  //$NON-NLS-1$ //$NON-NLS-2$ 
 				"EntryResult: word=typeDecl/V/x/Z, refs={ 1 }, offsets={ [ 2259] }"}; //$NON-NLS-1$ 
 		
-		IEntryResult[] typedeclresults =ind.queryEntries(IIndexConstants.TYPE_DECL);
+		IEntryResult[] typedeclresults =ind.queryEntries(IndexerOutput.TYPE_DECL);
 		assertTrue("Type Decl Results exist", typedeclresults != null);  //$NON-NLS-1$ 
 		
 		if (typedeclresults.length != typeDeclEntryResultModel.length)
@@ -408,7 +408,7 @@
 		}
 	
 		String [] typeDefEntryResultModel ={"EntryResult: word=typeDecl/T/int32, refs={ 1 }, offsets={ [ 2200] }"};  //$NON-NLS-1$
-		IEntryResult[] typedefresults =ind.queryEntries(IIndexConstants.TYPEDEF_DECL);
+		IEntryResult[] typedefresults =ind.queryEntries(IndexerOutput.TYPEDEF_DECL);
 		assertTrue("Type Def Results exist", typedefresults != null);  //$NON-NLS-1$  
 		
 		if (typedefresults.length != typeDefEntryResultModel.length)
@@ -422,7 +422,7 @@
 		String [] namespaceResultModel = {"EntryResult: word=namespaceDecl/X/Z, refs={ 1 }, offsets={ [ 2274] }", "EntryResult: word=namespaceDecl/Y/X/Z, refs={ 1 }, offsets={ [ 2290] }",  //$NON-NLS-1$ //$NON-NLS-2$ 
 				"EntryResult: word=namespaceDecl/Z, refs={ 1 }, offsets={ [ 2250] }"};  //$NON-NLS-1$ 
 		
-		IEntryResult[] namespaceresults =ind.queryEntries(IIndexConstants.NAMESPACE_DECL);
+		IEntryResult[] namespaceresults =ind.queryEntries(IndexerOutput.NAMESPACE_DECL);
 		assertTrue("Namespace Results exist", namespaceresults != null);  //$NON-NLS-1$  
 		
 		if (namespaceresults.length != namespaceResultModel.length)
@@ -436,7 +436,7 @@
 		String [] fieldResultModel = {"EntryResult: word=fieldDecl/array/container/Y/X/Z, refs={ 1 }, offsets={ [ 21485] }", "EntryResult: word=fieldDecl/index/container/Y/X/Z, refs={ 1 }, offsets={ [ 21500] }", 
 				"EntryResult: word=fieldDecl/postage/Mail/Y/X/Z, refs={ 1 }, offsets={ [ 2469] }", "EntryResult: word=fieldDecl/sz/container/Y/X/Z, refs={ 1 }, offsets={ [ 21515] }", 
 				"EntryResult: word=fieldDecl/type/Mail/Y/X/Z, refs={ 1 }, offsets={ [ 2488] }"};  //$NON-NLS-1$ //$NON-NLS-2$ 
-		IEntryResult[] fieldresults =ind.queryEntries(IIndexConstants.FIELD_DECL);
+		IEntryResult[] fieldresults =ind.queryEntries(IndexerOutput.FIELD_DECL);
 		assertTrue("Field Results exist", fieldresults != null);  //$NON-NLS-1$
 		
 		if (fieldresults.length != fieldResultModel.length)
@@ -450,7 +450,7 @@
 		String [] enumeratorResultModel = {"EntryResult: word=enumtorDecl/bye/Y/X/Z, refs={ 1 }, offsets={ [ 2315] }", "EntryResult: word=enumtorDecl/cool/Y/X/Z, refs={ 1 }, offsets={ [ 2307] }", 
 				"EntryResult: word=enumtorDecl/hi/Y/X/Z, refs={ 1 }, offsets={ [ 2312] }", "EntryResult: word=enumtorDecl/why/Y/X/Z, refs={ 1 }, offsets={ [ 2319] }"}; 
 		
-		IEntryResult[] enumeratorresults =ind.queryEntries(IIndexConstants.ENUMTOR_DECL);
+		IEntryResult[] enumeratorresults =ind.queryEntries(IndexerOutput.ENUMTOR_DECL);
 		assertTrue("Enumerator Results exist", enumeratorresults != null);  //$NON-NLS-1$ 
 		
 		if (enumeratorresults.length != enumeratorResultModel.length)
@@ -462,7 +462,7 @@
 		}
 	
 		String [] functionResultModel = {"EntryResult: word=functionDecl/doSomething, refs={ 1 }, offsets={ [ 2222] }", "EntryResult: word=functionDecl/main/Y/X/Z, refs={ 1 }, offsets={ [ 21765] }"};  //$NON-NLS-1$ //$NON-NLS-2$ 
-		IEntryResult[] functionresults =ind.queryEntries(IIndexConstants.FUNCTION_DECL);
+		IEntryResult[] functionresults =ind.queryEntries(IndexerOutput.FUNCTION_DECL);
 		
 		if (functionresults.length != functionResultModel.length)
 					fail("Entry Result length different from model for functionDecl");  //$NON-NLS-1$ 
@@ -489,7 +489,7 @@
 									    
 									   
 	
-		IEntryResult[] methodresults =ind.queryEntries(IIndexConstants.METHOD_DECL);
+		IEntryResult[] methodresults =ind.queryEntries(IndexerOutput.METHOD_DECL);
 		assertTrue("Entry exists", methodresults != null);  //$NON-NLS-1$ 
 		
 		if (methodresults.length != methodResultModel.length)
@@ -515,7 +515,7 @@
 				  "EntryResult: word=typeRef/G/ForwardA/A, refs={ 1 }, offsets={ [ 225] }", 
 				  "EntryResult: word=typeRef/V/x/B/A, refs={ 1 }, offsets={ [ 2128] }"}; 
 		  
-		  IEntryResult[] typerefresults = ind.queryEntries(IIndexConstants.TYPE_REF);
+		  IEntryResult[] typerefresults = ind.queryEntries(IndexerOutput.TYPE_REF);
 		  assertTrue("Entry exists",typerefresults != null); //$NON-NLS-1$ 
 		  
 		  if (typerefresults.length != typeRefEntryResultModel.length)
@@ -527,7 +527,7 @@
 		  }
 	
 		  String [] funRefEntryResultModel ={"EntryResult: word=functionRef/something/A, refs={ 1 }, offsets={ [ 259] }"};//$NON-NLS-1$ 
-		  IEntryResult[] funRefresults = ind.queryEntries(IIndexConstants.FUNCTION_REF);
+		  IEntryResult[] funRefresults = ind.queryEntries(IndexerOutput.FUNCTION_REF);
 		  assertTrue("Entry exists",funRefresults != null); //$NON-NLS-1$ 
 		  
 		  if (funRefresults.length != funRefEntryResultModel.length)
@@ -539,7 +539,7 @@
 		  }
 				
 		  String [] namespaceRefResultModel = {"EntryResult: word=namespaceRef/A, refs={ 1 }, offsets={ [ 210] }", "EntryResult: word=namespaceRef/B/A, refs={ 1 }, offsets={ [ 288] }"}; //$NON-NLS-1$ //$NON-NLS-2$ 
-		  IEntryResult[] namespacerefresults = ind.queryEntries(IIndexConstants.NAMESPACE_REF);
+		  IEntryResult[] namespacerefresults = ind.queryEntries(IndexerOutput.NAMESPACE_REF);
 		  assertTrue("Entry exists",namespacerefresults!=null); //$NON-NLS-1$ 
 		  
 		  if (namespacerefresults.length != namespaceRefResultModel.length)
@@ -551,7 +551,7 @@
 		  }
 				
 		  String [] fieldRefResultModel = {"EntryResult: word=fieldRef/y/C/B/A, refs={ 1 }, offsets={ [ 2161] }"}; //$NON-NLS-1$
-		  IEntryResult[] fieldrefresults = ind.queryEntries(IIndexConstants.FIELD_REF);
+		  IEntryResult[] fieldrefresults = ind.queryEntries(IndexerOutput.FIELD_REF);
 		  assertTrue("Entry exists",fieldrefresults!=null); //$NON-NLS-1$ 
 		  
 		  if (fieldrefresults.length != fieldRefResultModel.length)
@@ -563,7 +563,7 @@
 		  }
 	
 		  String [] methodRefResultModel = {"EntryResult: word=methodRef/bar/C/B/A, refs={ 1 }, offsets={ [ 2184] }"}; //$NON-NLS-1$	 
-		  IEntryResult[] methodrefresults = ind.queryEntries(IIndexConstants.METHOD_REF);
+		  IEntryResult[] methodrefresults = ind.queryEntries(IndexerOutput.METHOD_REF);
 		  assertTrue("Entry exists", methodrefresults != null); //$NON-NLS-1$  
 		   
 		  if (methodrefresults.length != methodRefResultModel.length)
@@ -587,8 +587,8 @@
 	  importFile("DepTest3.h","resources/dependency/DepTest3.h");//$NON-NLS-1$ //$NON-NLS-2$ 
 	  importFile("DepTest3.cpp","resources/dependency/DepTest3.cpp");//$NON-NLS-1$ //$NON-NLS-2$ 
 	  
-	  IEntryResult[] eResult = ind.queryEntries(IIndexConstants.CLASS_DECL);
-	  IQueryResult[] qResult = ind.queryPrefix(IIndexConstants.CLASS_DECL);
+	  IEntryResult[] eResult = ind.queryEntries(IndexerOutput.CLASS_DECL);
+	  IQueryResult[] qResult = ind.queryPrefix(IndexerOutput.CLASS_DECL);
 	  
 	  assertTrue("Expected 2 files indexed", qResult.length == 2); //$NON-NLS-1$ 
 	  assertTrue("Checking DepTest3.h location", qResult[0].getPath().equals("/IndexerTestProject/DepTest3.h")); //$NON-NLS-1$ //$NON-NLS-2$ 
@@ -655,7 +655,7 @@
 	  IIndex ind = sourceIndexer.getIndex(testProjectPath,true,true);
 	  assertTrue("Index exists for project",ind != null); //$NON-NLS-1$ 
 	
-	  IEntryResult[] macroresults = ind.queryEntries(IIndexConstants.MACRO_DECL);
+	  IEntryResult[] macroresults = ind.queryEntries(IndexerOutput.MACRO_DECL);
 	  assertTrue("Entry exists", macroresults != null); //$NON-NLS-1$ 
 	  
 	  String [] macroResultModel = {"EntryResult: word=macroDecl/CASE, refs={ 1 }, offsets={ [ 2131] }",
Index: model/org/eclipse/cdt/core/model/tests/CPathEntryTest.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/CPathEntryTest.java,v
retrieving revision 1.11
diff -u -r1.11 CPathEntryTest.java
--- model/org/eclipse/cdt/core/model/tests/CPathEntryTest.java	27 Jan 2005 18:47:57 -0000	1.11
+++ model/org/eclipse/cdt/core/model/tests/CPathEntryTest.java	19 Apr 2005 17:43:34 -0000
@@ -211,8 +211,8 @@
 			}
 			
 		};
-		CoreModel.getDefault().setRawPathEntries(testProject, new IPathEntry[]{containerEntry}, new NullProgressMonitor());
-		CoreModel.getDefault().setPathEntryContainer(new ICProject[]{testProject}, container, new NullProgressMonitor());
+		CoreModel.setRawPathEntries(testProject, new IPathEntry[]{containerEntry}, new NullProgressMonitor());
+		CoreModel.setPathEntryContainer(new ICProject[]{testProject}, container, new NullProgressMonitor());
 		IPathEntry[] entries = testProject.getResolvedPathEntries();
 		// We always have at least two entries:
 		//  1) the default sourceEntry becomes the project
Index: model/org/eclipse/cdt/core/model/tests/IIncludeTests.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/IIncludeTests.java,v
retrieving revision 1.6
diff -u -r1.6 IIncludeTests.java
--- model/org/eclipse/cdt/core/model/tests/IIncludeTests.java	17 Sep 2004 14:10:16 -0000	1.6
+++ model/org/eclipse/cdt/core/model/tests/IIncludeTests.java	19 Apr 2005 17:43:34 -0000
@@ -10,7 +10,6 @@
 import org.eclipse.cdt.core.model.CModelException;
 import org.eclipse.cdt.core.model.IInclude;
 import org.eclipse.cdt.core.model.ITranslationUnit;
-import org.eclipse.cdt.internal.core.model.CElement;
 
 /**
  * @author bnicolle
Index: parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTExpressionTest.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTExpressionTest.java,v
retrieving revision 1.17
diff -u -r1.17 CompleteParseASTExpressionTest.java
--- parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTExpressionTest.java	5 Aug 2004 15:21:55 -0000	1.17
+++ parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTExpressionTest.java	19 Apr 2005 17:43:35 -0000
@@ -12,7 +12,6 @@
 
 import java.util.Iterator;
 
-import org.eclipse.cdt.core.parser.ParserFactory;
 import org.eclipse.cdt.core.parser.ast.IASTAbstractTypeSpecifierDeclaration;
 import org.eclipse.cdt.core.parser.ast.IASTClassSpecifier;
 import org.eclipse.cdt.core.parser.ast.IASTExpression;
Index: parser/org/eclipse/cdt/core/parser/tests/CompleteParsePluginTest.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/CompleteParsePluginTest.java,v
retrieving revision 1.10
diff -u -r1.10 CompleteParsePluginTest.java
--- parser/org/eclipse/cdt/core/parser/tests/CompleteParsePluginTest.java	2 Dec 2004 02:58:42 -0000	1.10
+++ parser/org/eclipse/cdt/core/parser/tests/CompleteParsePluginTest.java	19 Apr 2005 17:43:35 -0000
@@ -23,7 +23,6 @@
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
-import org.eclipse.cdt.core.parser.ParserLanguage;
 import org.eclipse.cdt.core.parser.ast.IASTFunction;
 import org.eclipse.cdt.core.parser.ast.IASTNode;
 import org.eclipse.cdt.core.parser.ast.IASTVariable;
Index: parser/org/eclipse/cdt/core/parser/tests/ParserSymbolTableTest.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ParserSymbolTableTest.java,v
retrieving revision 1.52
diff -u -r1.52 ParserSymbolTableTest.java
--- parser/org/eclipse/cdt/core/parser/tests/ParserSymbolTableTest.java	30 Sep 2004 19:45:17 -0000	1.52
+++ parser/org/eclipse/cdt/core/parser/tests/ParserSymbolTableTest.java	19 Apr 2005 17:43:37 -0000
@@ -385,7 +385,7 @@
 		compUnit.addSymbol( c );
 		compUnit.addSymbol( d );
 		
-		IContainerSymbol enum = table.newContainerSymbol( "enum".toCharArray(), ITypeInfo.t_enumeration ); //$NON-NLS-1$
+		IContainerSymbol enum1 = table.newContainerSymbol( "enum".toCharArray(), ITypeInfo.t_enumeration ); //$NON-NLS-1$
 		
 		ISymbol enumerator = table.newSymbol( "enumerator".toCharArray(), ITypeInfo.t_enumerator ); //$NON-NLS-1$
 		
@@ -394,11 +394,11 @@
 		
 		ISymbol x = table.newSymbol( "x".toCharArray(), ITypeInfo.t_int ); //$NON-NLS-1$
 		
-		d.addSymbol( enum );
+		d.addSymbol( enum1 );
 		d.addSymbol( stat );
 		d.addSymbol( x );
 		
-		enum.addSymbol( enumerator );
+		enum1.addSymbol( enumerator );
 		
 		a.addParent( b );
 		a.addParent( c );
Index: parser/org/eclipse/cdt/core/parser/tests/XMLDumper.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/XMLDumper.java,v
retrieving revision 1.3
diff -u -r1.3 XMLDumper.java
--- parser/org/eclipse/cdt/core/parser/tests/XMLDumper.java	28 May 2004 14:54:46 -0000	1.3
+++ parser/org/eclipse/cdt/core/parser/tests/XMLDumper.java	19 Apr 2005 17:43:37 -0000
@@ -1,6 +1,5 @@
 package org.eclipse.cdt.core.parser.tests;
 
-import java.io.IOException;
 import java.io.StringWriter;
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
@@ -8,7 +7,6 @@
 import java.util.HashMap;
 
 import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.FactoryConfigurationError;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerException;
Index: search/org/eclipse/cdt/core/search/tests/BaseSearchTest.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.core.tests/search/org/eclipse/cdt/core/search/tests/BaseSearchTest.java,v
retrieving revision 1.23
diff -u -r1.23 BaseSearchTest.java
--- search/org/eclipse/cdt/core/search/tests/BaseSearchTest.java	21 Mar 2005 15:44:33 -0000	1.23
+++ search/org/eclipse/cdt/core/search/tests/BaseSearchTest.java	19 Apr 2005 17:43:37 -0000
@@ -18,8 +18,6 @@
 import junit.framework.TestCase;
 
 import org.eclipse.cdt.core.CCorePlugin;
-import org.eclipse.cdt.core.ICDescriptor;
-import org.eclipse.cdt.core.ICExtensionReference;
 import org.eclipse.cdt.core.model.ICProject;
 import org.eclipse.cdt.core.search.BasicSearchResultCollector;
 import org.eclipse.cdt.core.search.ICSearchConstants;
@@ -31,7 +29,6 @@
 import org.eclipse.cdt.core.testplugin.CTestPlugin;
 import org.eclipse.cdt.core.testplugin.FileManager;
 import org.eclipse.cdt.internal.core.index.sourceindexer.SourceIndexer;
-import org.eclipse.cdt.internal.core.search.indexing.IndexManager;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IWorkspace;
Index: suite/org/eclipse/cdt/core/suite/AutomatedIntegrationSuite.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/suite/AutomatedIntegrationSuite.java,v
retrieving revision 1.40
diff -u -r1.40 AutomatedIntegrationSuite.java
--- suite/org/eclipse/cdt/core/suite/AutomatedIntegrationSuite.java	21 Mar 2005 15:44:33 -0000	1.40
+++ suite/org/eclipse/cdt/core/suite/AutomatedIntegrationSuite.java	19 Apr 2005 17:43:37 -0000
@@ -9,7 +9,6 @@
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
-import org.eclipse.cdt.core.CCorePlugin;
 import org.eclipse.cdt.core.cdescriptor.tests.CDescriptorTests;
 import org.eclipse.cdt.core.filetype.tests.ResolverTests;
 import org.eclipse.cdt.core.indexer.tests.DependencyTests;

Back to the top