Bug 3229

Summary: OpenOnSelection - strange behaviour of code resolve (1GAVL08)
Product: [Eclipse Project] JDT Reporter: Martin Aeschlimann <martinae>
Component: CoreAssignee: David Audel <david_audel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: 2.0 M2   
Hardware: All   
OS: Windows NT   
Whiteboard:

Description Martin Aeschlimann CLA 2001-10-10 22:51:39 EDT
MA (28.03.01 16:11:22)
 	1.	create a class A

	import java.util.List;
	class A {
		private List fList;

	}

	2. Hover over 'List' from the instance variable: This shows you 'java.util.List': correctly resolved
	3. Set the cursor at the beginning of the empty line, type 'List' and look at the hover help:
		This shows you 'java.util.List' and 'java.awt.List'
	4. add a space and a letter after 'List': now code resolve is showing only 'java.util.List'

NOTES:

PM (4/12/2001 3:19:27 PM)
	This is a bug in our SelectionParser which doesn't produce a fake field of type List for:

	class A {
		private List fList;
		List<--------------------------- Open on selection
	}

	Thus it activates the plan B: perform a simple name search in the context of the unit (thus finds 2 candidates).

PM (4/23/2001 4:23:16 PM)
	This behavior comes from the fact we wrote the selection engine for mostly correct code (browsing almost correct code), as opposed to	
	the completion engine which handles partial code better.

	We should synchronize the two implementations.

PM (6/18/2001 5:07:55 PM)
	Assessed.
Comment 1 Philipe Mulet CLA 2001-10-11 12:20:00 EDT
Might be solved by triggering a code assist in this case (before searching for 
declarations)
Comment 2 DJ Houghton CLA 2001-10-23 23:52:10 EDT
PRODUCT VERSION:
	0.1.033 032601H19

Comment 3 David Audel CLA 2002-01-17 04:51:11 EST
Now selection parser produce a fake field for this case.

Fixed