Community
Participate
Working Groups
AK (4/30/01 3:31:21 PM) 1. package a; public class D { private void m(){} } class B extends D { private void m(){} } search for declarations of B::m - you find 2 (1GCUF7U) 2. However, package a; public class D { public void m(){} } class B extends D { public void m(){} } search for declarations of B::m - you find 1 NOTES: JBL (5/2/2001 6:30:26 PM) I cannot reproduce: in both cases I find 1 match only. AK (5/2/01 7:52:01 PM) very weird - i still see 2 matches note that i have junit loaded (if that should make any difference) JBL (5/3/2001 10:42:28 AM) I too have JUnit loaded. But how do you perform the search? Using the Java Search dialog or using the context menu in the Outliner? AK (5/3/01 2:49:09 PM) i select 'declarations in workspace' from the outliner JBL (5/3/2001 4:03:39 PM) In this case, I find 2 matches in both cases because the query is done on method "m()", not on "B.m()".
package p; class A { private void m(){} } class B extends A{ void m(){} } now, if i search programatically - i get 2 results, which is incorrect. if a text pattern is used then i understand i can get more matches than i expect. but i use a IJavaElement pattern.
Are you still searching for declarations of B::m ? In this case, if I use the search from IJavaElement, I find 1 match.
PRODUCT VERSION: java ui 0.101
Can I close?
what happens if i search for declarations of A::m - i expect 1 as well
Search ignores method visibity. Please open a new bug if you find this an important issue. Closing this one as the original problem is fixed.