Bug 3619 - inconsistent search for method declarations (1GCZZS1)
Summary: inconsistent search for method declarations (1GCZZS1)
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: All Windows NT
: P3 normal (vote)
Target Milestone: 2.0 M1   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-10 22:58 EDT by Adam Kiezun CLA
Modified: 2002-01-11 09:22 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Kiezun CLA 2001-10-10 22:58:05 EDT
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()".
Comment 1 Adam Kiezun CLA 2001-10-18 06:21:19 EDT
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.
Comment 2 Jerome Lanneluc CLA 2001-10-23 06:52:29 EDT
Are you still searching for declarations of B::m ?
In this case, if I use the search from IJavaElement, I find 1 match.
Comment 3 DJ Houghton CLA 2001-10-24 07:14:28 EDT
PRODUCT VERSION:
	java ui 0.101

Comment 4 Jerome Lanneluc CLA 2001-11-14 11:00:56 EST
Can I close?
Comment 5 Adam Kiezun CLA 2001-11-14 11:23:51 EST
what happens if i search for declarations of A::m - i expect 1 as well
Comment 6 Jerome Lanneluc CLA 2001-11-21 07:33:47 EST
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.