Bug 20309

Summary: cannot code resolve on binary method with member type arguments
Product: [Eclipse Project] JDT Reporter: John Wiegand <John_Wiegand>
Component: CoreAssignee: David Audel <david_audel>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P2    
Version: 2.0   
Target Milestone: 2.0 F4   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description John Wiegand CLA 2002-06-13 21:25:48 EDT
F3

1. Build a workspace with all of the plugins as binary.
2. Select Type  org.eclipse.jdt.internal.debug.core.model.JDIDebugTarget (in 
the org.eclipse.jdt.debug plugin) and method setThreadStartHandler().
3. If you press F3, you will get a beep.  If you select Search->References-
>Workspace, you will be told "The operation is unavailable on the current 
selection.  Please select a valid Java element name".

I believe the defect is in SelectionRequestor.acceptBinaryMethod().  My 
proposed fix is to convert the typeName argument to a $ name:

			String typeName = new String(parameterTypeNames[i]);
			if (typeName.indexOf('.') > 0) 
				typeName = typeName.replace('.', '$');
			parameterTypes[i]= Signature.createTypeSignature(
				pkg + typeName, true);

If you find this fix safe, I believe it is a worthy candidate for F4 since it 
improves search quality with no performance penalty.
Comment 1 Philipe Mulet CLA 2002-06-14 07:57:23 EDT
David - pls double check the fix
Comment 2 David Audel CLA 2002-06-14 11:17:02 EDT
The fix is good.

Fixed.
Comment 3 Philipe Mulet CLA 2002-06-14 11:50:12 EDT
Fix is quite trivial.

If we don't fix it, then 'open on selection' (F3) fails to locate a method with 
member type arguments inside binaries. Open on selection is fairly centric and 
critical since it is used to locate the context of search actions in the editor.

Comment 4 Philipe Mulet CLA 2002-06-14 11:50:46 EDT
Removing 'FIXED' status, until it gets approved for F4
Comment 5 Olivier Thomann CLA 2002-06-14 13:04:10 EDT
Verified. Works fine.
Comment 6 Jerome Lanneluc CLA 2002-06-17 08:08:21 EDT
No veto. Marking as fixed.
Comment 7 Jerome Lanneluc CLA 2002-06-17 08:20:39 EDT
Verified.