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 34062 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]
New patch to fix this issue
v01.txt (text/plain), 23.40 KB, created by
Frederic Fusier
on 2006-02-03 05:11:41 EST
(
hide
)
Description:
New patch to fix this issue
Filename:
MIME Type:
Creator:
Frederic Fusier
Created:
2006-02-03 05:11:41 EST
Size:
23.40 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java,v >retrieving revision 1.60 >diff -u -r1.60 JavaSearchBugsTests.java >--- src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java 26 Jan 2006 22:00:12 -0000 1.60 >+++ src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java 3 Feb 2006 10:06:32 -0000 >@@ -47,7 +47,7 @@ > // org.eclipse.jdt.internal.codeassist.SelectionEngine.DEBUG = true; > // TESTS_PREFIX = "testBug110336"; > // TESTS_NAMES = new String[] { "testBug120816a" }; >-// TESTS_NUMBERS = new int[] { 122442 }; >+// TESTS_NUMBERS = new int[] { 124469 }; > // TESTS_RANGE = new int[] { 83304, -1 }; > } > >@@ -1776,12 +1776,11 @@ > "}\n" > ); > IType type = selectType(workingCopies[0], "Class", 3); >- search(type, REFERENCES, ERASURE_RULE); >+ search(type, REFERENCES, ERASURE_RULE, getJavaSearchWorkingCopiesScope()); > assertSearchResults( > "src/b83304/Test.java void b83304.Test.foo() [Class] ERASURE_MATCH\n" + > "src/b83304/Test.java void b83304.Test.foo() [Class] ERASURE_MATCH\n" + >- "src/b83304/Test.java void b83304.Test.foo() [Class] EXACT_MATCH\n" + >- getExternalJCLPathString("1.5") + " java.lang.Class java.lang.Object.getClass() EQUIVALENT_RAW_MATCH" >+ "src/b83304/Test.java void b83304.Test.foo() [Class] EXACT_MATCH" > ); > } > public void testBug83304_TypeParameterizedElementPattern() throws CoreException { >@@ -2836,60 +2835,17 @@ > null, > SearchPattern.R_PATTERN_MATCH, // case insensitive > TYPE, >- getJavaSearchScopeBugs(), >+ getJavaSearchScopeBugs("b92944", true), > requestor, > IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, > null > ); > assertSearchResults( > "Unexpected all type names", >- "Test\n" + >- "Test$Inner\n" + >- "TestPrefix\n" + >- "b108088.A108088\n" + >- "b108088.B108088\n" + >- "b108088.Test108088\n" + >- "b81556.a.A81556\n" + >- "b81556.a.B81556\n" + >- "b81556.a.X81556\n" + >- "b81556.b.XX81556\n" + >- "b86380.Annot\n" + >- "b87627.Collection\n" + >- "b87627.List\n" + >- "b89848.Test\n" + >- "b89848.X\n" + > "b92944.B92944\n" + > "b92944.B92944_A\n" + > "b92944.B92944_E\n" + >- "b92944.B92944_I\n" + >- "b95794.Test\n" + >- "b95794.Test$Color\n" + >- "g1.t.s.def.Generic\n" + >- "g1.t.s.def.Generic$Member\n" + >- "g1.t.s.def.Generic$MemberGeneric\n" + >- "g1.t.s.def.NonGeneric\n" + >- "g1.t.s.def.NonGeneric$GenericMember\n" + >- "g5.c.def.Multiple\n" + >- "g5.c.def.Single\n" + >- "g5.m.def.Multiple\n" + >- "g5.m.def.Single\n" + >- "java.io.Serializable\n" + >- "java.lang.CharSequence\n" + >- "java.lang.Class\n" + >- "java.lang.CloneNotSupportedException\n" + >- "java.lang.Comparable\n" + >- "java.lang.Enum\n" + >- "java.lang.Error\n" + >- "java.lang.Exception\n" + >- "java.lang.IllegalMonitorStateException\n" + >- "java.lang.InterruptedException\n" + >- "java.lang.Object\n" + >- "java.lang.RuntimeException\n" + >- "java.lang.String\n" + >- "java.lang.Throwable\n" + >- "java.lang.annotation.Annotation\n" + >- "pack.age.Test\n" + >- "pack.age.Test$Member", >+ "b92944.B92944_I", > requestor); > } > public void testBug92944_CLASS() throws CoreException { >@@ -2903,7 +2859,7 @@ > IIndexConstants.ONE_STAR, > SearchPattern.R_PATTERN_MATCH, // case insensitive > CLASS, >- getJavaSearchScopeBugs(), >+ getJavaSearchWorkingCopiesScope(), > requestor, > IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, > null >@@ -2911,48 +2867,7 @@ > // Remove interface, enum and annotation > assertSearchResults( > "Unexpected all type names", >- "Test\n" + >- "Test$Inner\n" + >- "TestPrefix\n" + >- "b108088.A108088\n" + >- "b108088.B108088\n" + >- "b108088.Test108088\n" + >- "b81556.a.A81556\n" + >- "b81556.a.B81556\n" + >- "b81556.a.X81556\n" + >- "b81556.b.XX81556\n" + >- "b89848.Test\n" + >- "b89848.X\n" + >- "b92944.B92944\n" + >- //"b92944.B92944_A\n" + >- //"b92944.B92944_E\n" + >- //"b92944.B92944_I\n" + >- "b95794.Test\n" + >- "g1.t.s.def.Generic\n" + >- "g1.t.s.def.Generic$Member\n" + >- "g1.t.s.def.Generic$MemberGeneric\n" + >- "g1.t.s.def.NonGeneric\n" + >- "g1.t.s.def.NonGeneric$GenericMember\n" + >- "g5.c.def.Multiple\n" + >- "g5.c.def.Single\n" + >- "g5.m.def.Multiple\n" + >- "g5.m.def.Single\n" + >- //"java.io.Serializable\n" + >- "java.lang.Class\n" + >- "java.lang.CloneNotSupportedException\n" + >- //"java.lang.Comparable\n" + >- "java.lang.Enum\n" + // Enum is not an enum in java.lang >- "java.lang.Error\n" + >- "java.lang.Exception\n" + >- "java.lang.IllegalMonitorStateException\n" + >- "java.lang.InterruptedException\n" + >- "java.lang.Object\n" + >- "java.lang.RuntimeException\n" + >- "java.lang.String\n" + >- "java.lang.Throwable\n" + >- //"java.lang.annotation.Annotation\n" + >- "pack.age.Test\n" + >- "pack.age.Test$Member", >+ "b92944.B92944", > requestor); > } > public void testBug92944_CLASS_AND_INTERFACE() throws CoreException { >@@ -2966,7 +2881,7 @@ > null, > SearchPattern.R_PATTERN_MATCH, // case insensitive > CLASS_AND_INTERFACE, >- getJavaSearchScopeBugs(), >+ getJavaSearchWorkingCopiesScope(), > requestor, > IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, > null >@@ -2974,51 +2889,8 @@ > // Remove enum and annotation > assertSearchResults( > "Unexpected all type names", >- "Test\n" + >- "Test$Inner\n" + >- "TestPrefix\n" + >- "b108088.A108088\n" + >- "b108088.B108088\n" + >- "b108088.Test108088\n" + >- "b81556.a.A81556\n" + >- "b81556.a.B81556\n" + >- "b81556.a.X81556\n" + >- "b81556.b.XX81556\n" + >- "b87627.Collection\n" + >- "b87627.List\n" + >- "b89848.Test\n" + >- "b89848.X\n" + > "b92944.B92944\n" + >- //"b92944.B92944_A\n" + >- //"b92944.B92944_E\n" + >- "b92944.B92944_I\n" + >- "b95794.Test\n" + >- "g1.t.s.def.Generic\n" + >- "g1.t.s.def.Generic$Member\n" + >- "g1.t.s.def.Generic$MemberGeneric\n" + >- "g1.t.s.def.NonGeneric\n" + >- "g1.t.s.def.NonGeneric$GenericMember\n" + >- "g5.c.def.Multiple\n" + >- "g5.c.def.Single\n" + >- "g5.m.def.Multiple\n" + >- "g5.m.def.Single\n" + >- "java.io.Serializable\n" + >- "java.lang.CharSequence\n" + >- "java.lang.Class\n" + >- "java.lang.CloneNotSupportedException\n" + >- "java.lang.Comparable\n" + >- "java.lang.Enum\n" + // Enum is not an enum in java.lang >- "java.lang.Error\n" + >- "java.lang.Exception\n" + >- "java.lang.IllegalMonitorStateException\n" + >- "java.lang.InterruptedException\n" + >- "java.lang.Object\n" + >- "java.lang.RuntimeException\n" + >- "java.lang.String\n" + >- "java.lang.Throwable\n" + >- "java.lang.annotation.Annotation\n" + // Annotation is an interface in java.lang >- "pack.age.Test\n" + >- "pack.age.Test$Member", >+ "b92944.B92944_I", // Annotation is an interface in java.lang > requestor); > } > public void testBug92944_CLASS_AND_ENUM() throws CoreException { >@@ -3032,7 +2904,7 @@ > null, > SearchPattern.R_PATTERN_MATCH, // case insensitive > CLASS_AND_ENUM, >- getJavaSearchScopeBugs(), >+ getJavaSearchWorkingCopiesScope(), > requestor, > IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, > null >@@ -3040,49 +2912,8 @@ > // Remove interface and annotation > assertSearchResults( > "Unexpected all type names", >- "Test\n" + >- "Test$Inner\n" + >- "TestPrefix\n" + >- "b108088.A108088\n" + >- "b108088.B108088\n" + >- "b108088.Test108088\n" + >- "b81556.a.A81556\n" + >- "b81556.a.B81556\n" + >- "b81556.a.X81556\n" + >- "b81556.b.XX81556\n" + >- "b89848.Test\n" + >- "b89848.X\n" + > "b92944.B92944\n" + >- //"b92944.B92944_A\n" + >- "b92944.B92944_E\n" + >- //"b92944.B92944_I\n" + >- "b95794.Test\n" + >- "b95794.Test$Color\n" + >- "g1.t.s.def.Generic\n" + >- "g1.t.s.def.Generic$Member\n" + >- "g1.t.s.def.Generic$MemberGeneric\n" + >- "g1.t.s.def.NonGeneric\n" + >- "g1.t.s.def.NonGeneric$GenericMember\n" + >- "g5.c.def.Multiple\n" + >- "g5.c.def.Single\n" + >- "g5.m.def.Multiple\n" + >- "g5.m.def.Single\n" + >- //"java.io.Serializable\n" + >- "java.lang.Class\n" + >- "java.lang.CloneNotSupportedException\n" + >- //"java.lang.Comparable\n" + >- "java.lang.Enum\n" + >- "java.lang.Error\n" + >- "java.lang.Exception\n" + >- "java.lang.IllegalMonitorStateException\n" + >- "java.lang.InterruptedException\n" + >- "java.lang.Object\n" + >- "java.lang.RuntimeException\n" + >- "java.lang.String\n" + >- "java.lang.Throwable\n" + >- //"java.lang.annotation.Annotation\n" + >- "pack.age.Test\n" + >- "pack.age.Test$Member", >+ "b92944.B92944_E", > requestor); > } > public void testBug92944_INTERFACE() throws CoreException { >@@ -3096,20 +2927,14 @@ > null, > SearchPattern.R_PATTERN_MATCH, // case insensitive > INTERFACE, >- getJavaSearchScopeBugs(), >+ getJavaSearchWorkingCopiesScope(), > requestor, > IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, > null > ); > assertSearchResults( > "Unexpected all type names", >- "b87627.Collection\n" + >- "b87627.List\n" + >- "b92944.B92944_I\n" + >- "java.io.Serializable\n" + >- "java.lang.CharSequence\n" + >- "java.lang.Comparable\n" + >- "java.lang.annotation.Annotation", // Annotation is an interface in java.lang >+ "b92944.B92944_I", > requestor); > } > public void testBug92944_ENUM() throws CoreException { >@@ -3123,15 +2948,14 @@ > null, > SearchPattern.R_PATTERN_MATCH, // case insensitive > ENUM, >- getJavaSearchScopeBugs(), >+ getJavaSearchWorkingCopiesScope(), > requestor, > IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, > null > ); > assertSearchResults( > "Unexpected all type names", >- "b92944.B92944_E\n" + >- "b95794.Test$Color", >+ "b92944.B92944_E", > requestor); > } > public void testBug92944_ANNOTATION_TYPE() throws CoreException { >@@ -3145,14 +2969,13 @@ > null, > SearchPattern.R_PATTERN_MATCH, // case insensitive > ANNOTATION_TYPE, >- getJavaSearchScopeBugs(), >+ getJavaSearchWorkingCopiesScope(), > requestor, > IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, > null > ); > assertSearchResults( > "Unexpected all type names", >- "b86380.Annot\n" + > "b92944.B92944_A", > requestor); > } >@@ -5776,6 +5599,160 @@ > } > > /** >+ * Bug 124469: [search] AIOOBE in PatternLocator when searching for dependency extent from manifest >+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=124469" >+ */ >+public void testBug124469a() throws CoreException { >+ IType type = getClassFile("JavaSearchBugs", "lib/b124469.jar", "pack", "E.class").getType(); >+ search(type, REFERENCES); >+ assertSearchResults( >+ "lib/b124469.jar pack.E pack.A1.value() EXACT_MATCH\n" + >+ "lib/b124469.jar pack.E pack.A2.value() EXACT_MATCH\n" + >+ "lib/b124469.jar pack.E pack.A3.value() EXACT_MATCH\n" + >+ "lib/b124469.jar test.C EXACT_MATCH\n" + >+ "lib/b124469.jar test.C EXACT_MATCH\n" + >+ "lib/b124469.jar test.C EXACT_MATCH\n" + >+ "lib/b124469.jar test.C EXACT_MATCH\n" + >+ "lib/b124469.jar test.C EXACT_MATCH\n" + >+ "lib/b124469.jar test.C EXACT_MATCH\n" + >+ "lib/b124469.jar test.C EXACT_MATCH\n" + >+ "lib/b124469.jar test.F.field EXACT_MATCH\n" + >+ "lib/b124469.jar test.F.field EXACT_MATCH\n" + >+ "lib/b124469.jar test.F.field EXACT_MATCH\n" + >+ "lib/b124469.jar test.F.field EXACT_MATCH\n" + >+ "lib/b124469.jar test.F.field EXACT_MATCH\n" + >+ "lib/b124469.jar test.F.field EXACT_MATCH\n" + >+ "lib/b124469.jar void test.M.foo() EXACT_MATCH\n" + >+ "lib/b124469.jar void test.M.foo() EXACT_MATCH\n" + >+ "lib/b124469.jar void test.M.foo() EXACT_MATCH\n" + >+ "lib/b124469.jar void test.M.foo() EXACT_MATCH\n" + >+ "lib/b124469.jar void test.M.foo() EXACT_MATCH\n" + >+ "lib/b124469.jar void test.M.foo() EXACT_MATCH" >+ ); >+} >+public void testBug124469b() throws CoreException { >+ IType type = getClassFile("JavaSearchBugs", "lib/b124469.jar", "pack", "A1.class").getType(); >+ search(type, REFERENCES); >+ assertSearchResults( >+ "lib/b124469.jar pack.A1 pack.A2.annot() EXACT_MATCH\n" + >+ "lib/b124469.jar test.C EXACT_MATCH\n" + >+ "lib/b124469.jar test.C EXACT_MATCH\n" + >+ "lib/b124469.jar test.F.field EXACT_MATCH\n" + >+ "lib/b124469.jar void test.M.foo() EXACT_MATCH" >+ ); >+} >+public void testBug124469c() throws CoreException { >+ IType type = getClassFile("JavaSearchBugs", "lib/b124469.jar", "pack", "A2.class").getType(); >+ search(type, REFERENCES); >+ assertSearchResults( >+ "lib/b124469.jar pack.A2 pack.A3.annot() EXACT_MATCH\n" + >+ "lib/b124469.jar test.C EXACT_MATCH\n" + >+ "lib/b124469.jar test.C EXACT_MATCH\n" + >+ "lib/b124469.jar test.F.field EXACT_MATCH\n" + >+ "lib/b124469.jar void test.M.foo() EXACT_MATCH" >+ ); >+} >+public void testBug124469d() throws CoreException { >+ IType type = getClassFile("JavaSearchBugs", "lib/b124469.jar", "pack", "A3.class").getType(); >+ search(type, REFERENCES); >+ assertSearchResults( >+ "lib/b124469.jar test.C EXACT_MATCH\n" + >+ "lib/b124469.jar test.C EXACT_MATCH\n" + >+ "lib/b124469.jar test.F.field EXACT_MATCH\n" + >+ "lib/b124469.jar void test.M.foo() EXACT_MATCH" >+ ); >+} >+public void testBug124469e() throws CoreException { >+ IType type = getClassFile("JavaSearchBugs", "lib/b124469.jar", "pack", "E.class").getType(); >+ IField field = type.getField("CC"); >+ search(field, REFERENCES); >+ assertSearchResults( >+ "lib/b124469.jar test.C EXACT_MATCH\n" + >+ "lib/b124469.jar test.C EXACT_MATCH\n" + >+ "lib/b124469.jar test.C EXACT_MATCH" >+ ); >+} >+public void testBug124469f() throws CoreException { >+ IType type = getClassFile("JavaSearchBugs", "lib/b124469.jar", "pack", "E.class").getType(); >+ IField field = type.getField("CF"); >+ search(field, REFERENCES); >+ assertSearchResults( >+ "lib/b124469.jar test.F.field EXACT_MATCH\n" + >+ "lib/b124469.jar test.F.field EXACT_MATCH\n" + >+ "lib/b124469.jar test.F.field EXACT_MATCH" >+ ); >+} >+public void testBug124469g() throws CoreException { >+ IType type = getClassFile("JavaSearchBugs", "lib/b124469.jar", "pack", "E.class").getType(); >+ IField field = type.getField("CM"); >+ search(field, REFERENCES); >+ assertSearchResults( >+ "lib/b124469.jar void test.M.foo() EXACT_MATCH\n" + >+ "lib/b124469.jar void test.M.foo() EXACT_MATCH\n" + >+ "lib/b124469.jar void test.M.foo() EXACT_MATCH" >+ ); >+} >+public void testBug124469h() throws CoreException { >+ IType type = getClassFile("JavaSearchBugs", "lib/b124469.jar", "pack", "E.class").getType(); >+ IField field = type.getField("CP"); >+ search(field, REFERENCES); >+ assertSearchResults( >+ "" // expected no result as parameters annotations are not stored in class file >+ ); >+} >+public void testBug124469i() throws CoreException { >+ IType type = getClassFile("JavaSearchBugs", "lib/b124469.jar", "pack", "E.class").getType(); >+ IField field = type.getField("CV"); >+ search(field, REFERENCES); >+ assertSearchResults( >+ "" // expected no result as parameters annotations are not stored in class file >+ ); >+} >+// TODO (frederic) enable when bug 130xxx will be fixed >+public void _testBug124469j() throws CoreException { >+ IType type = getClassFile("JavaSearchBugs", "lib/b124469.jar", "pack", "E.class").getType(); >+ IField field = type.getField("CAC"); >+ search(field, REFERENCES); >+ assertSearchResults( >+ "???" >+ ); >+} >+// TODO (frederic) enable when bug 130xxx will be fixed >+public void _testBug124469k() throws CoreException { >+ IType type = getClassFile("JavaSearchBugs", "lib/b124469.jar", "pack", "E.class").getType(); >+ IField field = type.getField("CAF"); >+ search(field, REFERENCES); >+ assertSearchResults( >+ "???" >+ ); >+} >+// TODO (frederic) enable when bug 130xxx will be fixed >+public void _testBug124469l() throws CoreException { >+ IType type = getClassFile("JavaSearchBugs", "lib/b124469.jar", "pack", "E.class").getType(); >+ IField field = type.getField("CAM"); >+ search(field, REFERENCES); >+ assertSearchResults( >+ "???" >+ ); >+} >+public void testBug124469m() throws CoreException { >+ IType type = getClassFile("JavaSearchBugs", "lib/b124469.jar", "pack", "E.class").getType(); >+ IField field = type.getField("CAP"); >+ search(field, REFERENCES); >+ assertSearchResults( >+ "" // expected no result as parameters annotations are not stored in class file >+ ); >+} >+public void testBug124469n() throws CoreException { >+ IType type = getClassFile("JavaSearchBugs", "lib/b124469.jar", "pack", "E.class").getType(); >+ IField field = type.getField("CAV"); >+ search(field, REFERENCES); >+ assertSearchResults( >+ "" // expected no result as parameters annotations are not stored in class file >+ ); >+} >+ >+/** > * Bug 125178: [search] AIOOBE in PatternLocator when searching for dependency extent from manifest > * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=125178" > */ >Index: workspace/JavaSearchBugs/.classpath >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/workspace/JavaSearchBugs/.classpath,v >retrieving revision 1.8 >diff -u -r1.8 .classpath >--- workspace/JavaSearchBugs/.classpath 26 Jan 2006 22:00:12 -0000 1.8 >+++ workspace/JavaSearchBugs/.classpath 3 Feb 2006 10:06:32 -0000 >@@ -6,6 +6,7 @@ > <classpathentry kind="lib" path="lib/test75816.jar" sourcepath="/JavaSearchBugs/lib/test75816.jar" rootpath=""/> > <classpathentry kind="lib" path="lib/b87627.jar" sourcepath="/JavaSearchBugs/lib/b87627.jar" rootpath=""/> > <classpathentry kind="lib" path="lib/b110422.jar" sourcepath="" rootpath=""/> >+ <classpathentry kind="lib" path="lib/b124469.jar" sourcepath="/JavaSearchBugs/lib/b124469.jar" rootpath=""/> > <classpathentry kind="lib" path="lib/b125178.jar" sourcepath="" rootpath=""/> > <classpathentry kind="lib" path="lib/JavaSearch15.jar" sourcepath="/JavaSearchBugs/lib/JavaSearch15.jar" rootpath=""/> > <classpathentry sourcepath="lib" kind="lib" path="lib"/> >#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.42 >diff -u -r1.42 DiskIndex.java >--- search/org/eclipse/jdt/internal/core/index/DiskIndex.java 26 Jan 2006 15:31:04 -0000 1.42 >+++ search/org/eclipse/jdt/internal/core/index/DiskIndex.java 3 Feb 2006 10:06:35 -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.107"; //$NON-NLS-1$ >+public static final String SIGNATURE= "INDEX VERSION 1.108"; //$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.50 >diff -u -r1.50 BinaryIndexer.java >--- search/org/eclipse/jdt/internal/core/search/indexing/BinaryIndexer.java 25 Nov 2005 16:44:45 -0000 1.50 >+++ search/org/eclipse/jdt/internal/core/search/indexing/BinaryIndexer.java 3 Feb 2006 10:06:35 -0000 >@@ -19,6 +19,10 @@ > import org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException; > import org.eclipse.jdt.internal.compiler.classfmt.FieldInfo; > import org.eclipse.jdt.internal.compiler.classfmt.MethodInfo; >+import org.eclipse.jdt.internal.compiler.env.ClassSignature; >+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.util.SuffixConstants; > > public class BinaryIndexer extends AbstractIndexer implements SuffixConstants { >@@ -36,6 +40,38 @@ > public BinaryIndexer(SearchDocument document) { > super(document); > } >+ private void addBinaryAnnotation(IBinaryAnnotation annotation) { >+ addTypeReference(replace('/', '.', Signature.toCharArray(annotation.getTypeName()))); >+ IBinaryElementValuePair[] valuePairs = annotation.getElementValuePairs(); >+ if (valuePairs != null) { >+ for (int j=0, vpLength=valuePairs.length; j<vpLength; j++) { >+ IBinaryElementValuePair valuePair = valuePairs[j]; >+ addMethodReference(valuePair.getName(), 0); >+ Object pairValue = valuePair.getValue(); >+ addPairValue(pairValue); >+ } >+ } >+ } >+ private void addPairValue(Object pairValue) { >+ if (pairValue instanceof EnumConstantSignature) { >+ EnumConstantSignature enumConstant = (EnumConstantSignature) pairValue; >+ addTypeReference(replace('/', '.', Signature.toCharArray(enumConstant.getTypeName()))); >+ addNameReference(enumConstant.getEnumConstantName()); >+ } else if (pairValue instanceof ClassSignature) { >+ ClassSignature classConstant = (ClassSignature) pairValue; >+ addTypeReference(replace('/', '.', Signature.toCharArray(classConstant.getTypeName()))); >+ } else if (pairValue instanceof ClassSignature) { >+ ClassSignature classConstant = (ClassSignature) pairValue; >+ addTypeReference(replace('/', '.', Signature.toCharArray(classConstant.getTypeName()))); >+ } else if (pairValue instanceof IBinaryAnnotation) { >+ addBinaryAnnotation((IBinaryAnnotation) pairValue); >+ } else if (pairValue instanceof Object[]) { >+ Object[] objects = (Object[]) pairValue; >+ for (int i=0,l=objects.length; i<l; i++) { >+ addPairValue(objects[i]); >+ } >+ } >+ } > public void addTypeReference(char[] typeName) { > int length = typeName.length; > if (length > 2 && typeName[length - 2] == '$') { >@@ -508,7 +544,16 @@ > addAnnotationTypeDeclaration(modifiers, packageName, name, enclosingTypeNames, false); > break; > } >- >+ >+ // Look for references in class annotations >+ IBinaryAnnotation[] annotations = reader.getAnnotations(); >+ if (annotations != null) { >+ for (int a=0, length=annotations.length; a<length; a++) { >+ IBinaryAnnotation annotation = annotations[a]; >+ addBinaryAnnotation(annotation); >+ } >+ } >+ > // first reference all methods declarations and field declarations > MethodInfo[] methods = (MethodInfo[]) reader.getMethods(); > if (methods != null) { >@@ -525,6 +570,14 @@ > addMethodDeclaration(method.getSelector(), parameterTypes, returnType, exceptionTypes); > } > } >+ // look for references in method annotations >+ annotations = method.getAnnotations(); >+ if (annotations != null) { >+ for (int a=0, length=annotations.length; a<length; a++) { >+ IBinaryAnnotation annotation = annotations[a]; >+ addBinaryAnnotation(annotation); >+ } >+ } > } > } > FieldInfo[] fields = (FieldInfo[]) reader.getFields(); >@@ -534,6 +587,14 @@ > char[] fieldName = field.getName(); > char[] fieldType = decodeFieldType(replace('/', '.', field.getTypeName())); > addFieldDeclaration(fieldType, fieldName); >+ // look for references in field annotations >+ annotations = field.getAnnotations(); >+ if (annotations != null) { >+ for (int a=0, length=annotations.length; a<length; a++) { >+ IBinaryAnnotation annotation = annotations[a]; >+ addBinaryAnnotation(annotation); >+ } >+ } > } > } >
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