### Eclipse Workspace Patch 1.0
#P org.eclipse.jdt.core
Index: search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java
===================================================================
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java,v
retrieving revision 1.274
diff -u -r1.274 MatchLocator.java
--- search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java 6 Apr 2006 16:01:13 -0000 1.274
+++ search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java 9 Apr 2006 15:01:12 -0000
@@ -2314,10 +2314,11 @@
enclosingElement = ((IType) parent).getType(new String(type.name));
} else if (enclosingElement instanceof IMember) {
IMember member = (IMember) parent;
- if (member.isBinary())
- enclosingElement = parent;
- else
+ if (member.isBinary()) {
+ enclosingElement = this.currentPossibleMatch.openable.getClassFile().getType();
+ } else {
enclosingElement = member.getType(new String(type.name), occurrenceCount);
+ }
}
if (enclosingElement == null) return;
boolean enclosesElement = encloses(enclosingElement);
Index: buildnotes_jdt-core.html
===================================================================
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/buildnotes_jdt-core.html,v
retrieving revision 1.5162
diff -u -r1.5162 buildnotes_jdt-core.html
--- buildnotes_jdt-core.html 8 Apr 2006 08:08:42 -0000 1.5162
+++ buildnotes_jdt-core.html 9 Apr 2006 15:01:07 -0000
@@ -52,7 +52,9 @@
What's new in this drop
Problem Reports Fixed
-135292
+86293
+[search] Search for method declaration with pattern "run()" reports match in binary field instead of anonymous class
+
135292
[compiler] NPE in ProblemReporter.invalidField plus .log swamping
135217
Compiler class constructor change in 3.2
#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.68
diff -u -r1.68 JavaSearchBugsTests.java
--- src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java 6 Apr 2006 16:01:34 -0000 1.68
+++ src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java 9 Apr 2006 15:01:32 -0000
@@ -2444,6 +2444,19 @@
"src/b86642/B.java void b86642.B.f(A) [A] EXACT_MATCH"
);
}
+/**
+ * Bug 86293: [search] Search for method declaration with pattern "run()" reports match in binary field instead of anonymous class
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=86293"
+ */
+public void testBug86293() throws CoreException {
+ IType type = getClassFile("JavaSearchBugs", "lib/b86293.jar", "", "I86293.class").getType();
+ IMethod method = type.getMethod("m86293", new String[0]);
+ search(method, DECLARATIONS);
+ assertSearchResults(
+ "lib/b86293.jar void .m86293() EXACT_MATCH\n" +
+ "lib/b86293.jar void I86293.m86293() EXACT_MATCH"
+ );
+}
/**
* Bug 86380: [1.5][search][annot] Add support to find references inside annotations on a package declaration
Index: src/org/eclipse/jdt/core/tests/model/JavaSearchTests.java
===================================================================
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchTests.java,v
retrieving revision 1.149
diff -u -r1.149 JavaSearchTests.java
--- src/org/eclipse/jdt/core/tests/model/JavaSearchTests.java 6 Apr 2006 16:01:34 -0000 1.149
+++ src/org/eclipse/jdt/core/tests/model/JavaSearchTests.java 9 Apr 2006 15:01:38 -0000
@@ -1097,7 +1097,7 @@
getJavaSearchScope(),
this.resultCollector);
assertSearchResults(
- "test48725.jar void p.X.foo()",
+ "test48725.jar int p..bar()",
this.resultCollector);
}
/**
@@ -2152,7 +2152,7 @@
scope,
this.resultCollector);
assertSearchResults(
- "test20631.jar void X.foo()",
+ "test20631.jar Y",
this.resultCollector);
}
/**
Index: workspace/JavaSearchBugs/.classpath
===================================================================
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/workspace/JavaSearchBugs/.classpath,v
retrieving revision 1.11
diff -u -r1.11 .classpath
--- workspace/JavaSearchBugs/.classpath 27 Feb 2006 12:47:16 -0000 1.11
+++ workspace/JavaSearchBugs/.classpath 9 Apr 2006 15:01:38 -0000
@@ -4,6 +4,7 @@
+
Index: workspace/JavaSearchBugs/lib/b86293.jar
===================================================================
RCS file: workspace/JavaSearchBugs/lib/b86293.jar
diff -N workspace/JavaSearchBugs/lib/b86293.jar
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ workspace/JavaSearchBugs/lib/b86293.jar 1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,9 @@
+PK ós‰4 META-INF/MANIFEST.MFþÊ óMÌËLK-.Ñ
+K-*ÎÌϳR0Ô3àåâå PK²î PK .s‰4 I86293.class;õo×>CNv&F6O3#KcvF?¬Ä²DýœÄ¼t}ÿ¤¬Ôä t.Xš‘?YC3Œ‘?+8¿´(9Õ-3'•‘?¢U¤‹?‘¨†?&±2°?Xì@’‰? PKbÓŒ˜d t PK ûr‰4 I86293.java+(MÊÉLVÈÌ+I-JKLNUð´03²4V¨æåâ,€È•åg¦(ä‚…54y¹jy¹ PK°
+m…0 6 PK .s‰4 C86293$1.classM?MOÂ@†ß¥•B©RñûãÈ??D@ƒÑx!š?T=h¸/eKÊ6i‹ÿ˃1ñàðGg—=ÌfæÙ÷?™ÝïŸÏ/ =œ:(0”ýËó«‹zÏ?ÍàÏù+ïD\M;Oã¹3E†âÐh(Éf2wɬl×Än¤’Ù-C¥±†Íƒ=ˆ'¢†MJ.,T=”á3X
+-¨R‰Çåb,’>ŽC-ˆC?x"u?C[?dpƒõžzä"ßÇ}Ž—I(î¥VVVŠ3ýo¨”HOSAþê?
+£8•jú ²Y