### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: search/org/eclipse/jdt/internal/core/index/DiskIndex.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/index/DiskIndex.java,v retrieving revision 1.44 diff -u -r1.44 DiskIndex.java --- search/org/eclipse/jdt/internal/core/index/DiskIndex.java 15 Feb 2006 12:48:13 -0000 1.44 +++ search/org/eclipse/jdt/internal/core/index/DiskIndex.java 15 Feb 2006 14:47:49 -0000 @@ -35,7 +35,7 @@ private HashtableOfObject categoryTables; // category name -> HashtableOfObject(words -> int[] of document #'s) or offset if not read yet private char[] cachedCategoryName; -public static final String SIGNATURE= "INDEX VERSION 1.109"; //$NON-NLS-1$ +public static final String SIGNATURE= "INDEX VERSION 1.112"; //$NON-NLS-1$ public static boolean DEBUG = false; private static final int RE_INDEXED = -1; Index: search/org/eclipse/jdt/internal/core/search/indexing/BinaryIndexer.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/BinaryIndexer.java,v retrieving revision 1.52 diff -u -r1.52 BinaryIndexer.java --- search/org/eclipse/jdt/internal/core/search/indexing/BinaryIndexer.java 15 Feb 2006 12:48:09 -0000 1.52 +++ search/org/eclipse/jdt/internal/core/search/indexing/BinaryIndexer.java 15 Feb 2006 14:47:50 -0000 @@ -43,59 +43,91 @@ super(document); } private void addBinaryStandardAnnotations(long annotationTagBits) { - char[][] compoundName = null; if ((annotationTagBits & TagBits.AnnotationTargetMASK) != 0) { - compoundName = TypeConstants.JAVA_LANG_ANNOTATION_TARGET; + char[][] compoundName = TypeConstants.JAVA_LANG_ANNOTATION_TARGET; + addTypeReference(compoundName[compoundName.length-1]); addBinaryTargetAnnotation(annotationTagBits); } if ((annotationTagBits & TagBits.AnnotationRetentionMASK) != 0) { - compoundName = TypeConstants.JAVA_LANG_ANNOTATION_RETENTION; + char[][] compoundName = TypeConstants.JAVA_LANG_ANNOTATION_RETENTION; + addTypeReference(compoundName[compoundName.length-1]); addBinaryRetentionAnnotation(annotationTagBits); } if ((annotationTagBits & TagBits.AnnotationDeprecated) != 0) { - compoundName = TypeConstants.JAVA_LANG_DEPRECATED; + char[][] compoundName = TypeConstants.JAVA_LANG_DEPRECATED; + addTypeReference(compoundName[compoundName.length-1]); } if ((annotationTagBits & TagBits.AnnotationDocumented) != 0) { - compoundName = TypeConstants.JAVA_LANG_ANNOTATION_DOCUMENTED; + char[][] compoundName = TypeConstants.JAVA_LANG_ANNOTATION_DOCUMENTED; + addTypeReference(compoundName[compoundName.length-1]); } if ((annotationTagBits & TagBits.AnnotationInherited) != 0) { - compoundName = TypeConstants.JAVA_LANG_ANNOTATION_INHERITED; + char[][] compoundName = TypeConstants.JAVA_LANG_ANNOTATION_INHERITED; + addTypeReference(compoundName[compoundName.length-1]); } if ((annotationTagBits & TagBits.AnnotationOverride) != 0) { - compoundName = TypeConstants.JAVA_LANG_OVERRIDE; + char[][] compoundName = TypeConstants.JAVA_LANG_OVERRIDE; + addTypeReference(compoundName[compoundName.length-1]); } if ((annotationTagBits & TagBits.AnnotationSuppressWarnings) != 0) { - compoundName = TypeConstants.JAVA_LANG_SUPPRESSWARNINGS; + char[][] compoundName = TypeConstants.JAVA_LANG_SUPPRESSWARNINGS; + addTypeReference(compoundName[compoundName.length-1]); } - if (compoundName == null) return; - addTypeReference(compoundName[compoundName.length-1]); } private void addBinaryTargetAnnotation(long bits) { - if ((bits & TagBits.AnnotationTarget) != 0) return; - char[][] compoundName = TypeConstants.JAVA_LANG_ANNOTATION_ELEMENTTYPE; - addTypeReference(compoundName[compoundName.length-1]); + char[][] compoundName = null; if ((bits & TagBits.AnnotationForAnnotationType) != 0) { + compoundName = TypeConstants.JAVA_LANG_ANNOTATION_ELEMENTTYPE; + addTypeReference(compoundName[compoundName.length-1]); addFieldReference(TypeConstants.UPPER_ANNOTATION_TYPE); } if ((bits & TagBits.AnnotationForConstructor) != 0) { + if (compoundName == null) { + compoundName = TypeConstants.JAVA_LANG_ANNOTATION_ELEMENTTYPE; + addTypeReference(compoundName[compoundName.length-1]); + } addFieldReference(TypeConstants.UPPER_CONSTRUCTOR); } if ((bits & TagBits.AnnotationForField) != 0) { + if (compoundName == null) { + compoundName = TypeConstants.JAVA_LANG_ANNOTATION_ELEMENTTYPE; + addTypeReference(compoundName[compoundName.length-1]); + } addFieldReference(TypeConstants.UPPER_FIELD); } if ((bits & TagBits.AnnotationForLocalVariable) != 0) { + if (compoundName == null) { + compoundName = TypeConstants.JAVA_LANG_ANNOTATION_ELEMENTTYPE; + addTypeReference(compoundName[compoundName.length-1]); + } addFieldReference(TypeConstants.UPPER_LOCAL_VARIABLE); } if ((bits & TagBits.AnnotationForMethod) != 0) { + if (compoundName == null) { + compoundName = TypeConstants.JAVA_LANG_ANNOTATION_ELEMENTTYPE; + addTypeReference(compoundName[compoundName.length-1]); + } addFieldReference(TypeConstants.UPPER_METHOD); } if ((bits & TagBits.AnnotationForPackage) != 0) { + if (compoundName == null) { + compoundName = TypeConstants.JAVA_LANG_ANNOTATION_ELEMENTTYPE; + addTypeReference(compoundName[compoundName.length-1]); + } addFieldReference(TypeConstants.UPPER_PACKAGE); } if ((bits & TagBits.AnnotationForParameter) != 0) { + if (compoundName == null) { + compoundName = TypeConstants.JAVA_LANG_ANNOTATION_ELEMENTTYPE; + addTypeReference(compoundName[compoundName.length-1]); + } addFieldReference(TypeConstants.UPPER_PARAMETER); } if ((bits & TagBits.AnnotationForType) != 0) { + if (compoundName == null) { + compoundName = TypeConstants.JAVA_LANG_ANNOTATION_ELEMENTTYPE; + addTypeReference(compoundName[compoundName.length-1]); + } addFieldReference(TypeConstants.TYPE); } }