Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 34763 Details for
Bug 124469
[1.5][search] does not find references to enum type in binary annotation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Additional patch to index standard annotations contents
v02.txt (text/plain), 5.66 KB, created by
Frederic Fusier
on 2006-02-15 07:32:54 EST
(
hide
)
Description:
Additional patch to index standard annotations contents
Filename:
MIME Type:
Creator:
Frederic Fusier
Created:
2006-02-15 07:32:54 EST
Size:
5.66 KB
patch
obsolete
>### 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.43 >diff -u -r1.43 DiskIndex.java >--- search/org/eclipse/jdt/internal/core/index/DiskIndex.java 3 Feb 2006 15:28:57 -0000 1.43 >+++ search/org/eclipse/jdt/internal/core/index/DiskIndex.java 15 Feb 2006 12:20:44 -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.108"; //$NON-NLS-1$ >+public static final String SIGNATURE= "INDEX VERSION 1.109"; //$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.51 >diff -u -r1.51 BinaryIndexer.java >--- search/org/eclipse/jdt/internal/core/search/indexing/BinaryIndexer.java 3 Feb 2006 15:28:57 -0000 1.51 >+++ search/org/eclipse/jdt/internal/core/search/indexing/BinaryIndexer.java 15 Feb 2006 12:20:44 -0000 >@@ -23,6 +23,8 @@ > import org.eclipse.jdt.internal.compiler.env.EnumConstantSignature; > import org.eclipse.jdt.internal.compiler.env.IBinaryAnnotation; > import org.eclipse.jdt.internal.compiler.env.IBinaryElementValuePair; >+import org.eclipse.jdt.internal.compiler.lookup.TagBits; >+import org.eclipse.jdt.internal.compiler.lookup.TypeConstants; > import org.eclipse.jdt.internal.compiler.util.SuffixConstants; > > public class BinaryIndexer extends AbstractIndexer implements SuffixConstants { >@@ -40,6 +42,76 @@ > public BinaryIndexer(SearchDocument document) { > super(document); > } >+ private void addBinaryStandardAnnotations(long annotationTagBits) { >+ char[][] compoundName = null; >+ if ((annotationTagBits & TagBits.AnnotationTargetMASK) != 0) { >+ compoundName = TypeConstants.JAVA_LANG_ANNOTATION_TARGET; >+ addBinaryTargetAnnotation(annotationTagBits); >+ } >+ if ((annotationTagBits & TagBits.AnnotationRetentionMASK) != 0) { >+ compoundName = TypeConstants.JAVA_LANG_ANNOTATION_TARGET; >+ addBinaryRetentionAnnotation(annotationTagBits); >+ } >+ if ((annotationTagBits & TagBits.AnnotationDeprecated) != 0) { >+ compoundName = TypeConstants.JAVA_LANG_ANNOTATION_TARGET; >+ } >+ if ((annotationTagBits & TagBits.AnnotationDocumented) != 0) { >+ compoundName = TypeConstants.JAVA_LANG_ANNOTATION_TARGET; >+ } >+ if ((annotationTagBits & TagBits.AnnotationInherited) != 0) { >+ compoundName = TypeConstants.JAVA_LANG_ANNOTATION_TARGET; >+ } >+ if ((annotationTagBits & TagBits.AnnotationOverride) != 0) { >+ compoundName = TypeConstants.JAVA_LANG_ANNOTATION_TARGET; >+ } >+ if ((annotationTagBits & TagBits.AnnotationSuppressWarnings) != 0) { >+ compoundName = TypeConstants.JAVA_LANG_ANNOTATION_TARGET; >+ } >+ 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]); >+ if ((bits & TagBits.AnnotationForAnnotationType) != 0) { >+ addFieldReference(TypeConstants.UPPER_ANNOTATION_TYPE); >+ } >+ if ((bits & TagBits.AnnotationForConstructor) != 0) { >+ addFieldReference(TypeConstants.UPPER_CONSTRUCTOR); >+ } >+ if ((bits & TagBits.AnnotationForField) != 0) { >+ addFieldReference(TypeConstants.UPPER_FIELD); >+ } >+ if ((bits & TagBits.AnnotationForLocalVariable) != 0) { >+ addFieldReference(TypeConstants.UPPER_LOCAL_VARIABLE); >+ } >+ if ((bits & TagBits.AnnotationForMethod) != 0) { >+ addFieldReference(TypeConstants.UPPER_METHOD); >+ } >+ if ((bits & TagBits.AnnotationForPackage) != 0) { >+ addFieldReference(TypeConstants.UPPER_PACKAGE); >+ } >+ if ((bits & TagBits.AnnotationForParameter) != 0) { >+ addFieldReference(TypeConstants.UPPER_PARAMETER); >+ } >+ if ((bits & TagBits.AnnotationForType) != 0) { >+ addFieldReference(TypeConstants.TYPE); >+ } >+ } >+ private void addBinaryRetentionAnnotation(long bits) { >+ char[][] compoundName = TypeConstants.JAVA_LANG_ANNOTATION_RETENTIONPOLICY; >+ addTypeReference(compoundName[compoundName.length-1]); >+ if ((bits & TagBits.AnnotationRuntimeRetention) != 0) { >+ addFieldReference(TypeConstants.UPPER_RUNTIME); >+ } >+ else if ((bits & TagBits.AnnotationClassRetention) != 0) { >+ addFieldReference(TypeConstants.UPPER_CLASS); >+ } >+ else if ((bits & TagBits.AnnotationSourceRetention) != 0) { >+ addFieldReference(TypeConstants.UPPER_SOURCE); >+ } >+ } > private void addBinaryAnnotation(IBinaryAnnotation annotation) { > addTypeReference(replace('/', '.', Signature.toCharArray(annotation.getTypeName()))); > IBinaryElementValuePair[] valuePairs = annotation.getElementValuePairs(); >@@ -550,6 +622,10 @@ > addBinaryAnnotation(annotation); > } > } >+ long tagBits = reader.getTagBits() & TagBits.AnnotationTargetMASK|TagBits.AnnotationDeprecated|TagBits.AnnotationRetentionMASK; >+ if (tagBits != 0) { >+ addBinaryStandardAnnotations(tagBits); >+ } > > // first reference all methods declarations and field declarations > MethodInfo[] methods = (MethodInfo[]) reader.getMethods();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 124469
:
33754
|
34062
|
34063
| 34763