Bug 356325

Summary: [select] Open declaration on a constructor of a local class with type parameters doesn't work
Product: [Eclipse Project] JDT Reporter: Missing name <noth>
Component: CoreAssignee: Satyam Kandula <satyam.kandula>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: markus.kell.r, satyam.kandula, srikanth_sankaran
Version: 3.7   
Target Milestone: 3.8 M2   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
example class
none
Patch none

Description Missing name CLA 2011-08-31 09:28:26 EDT
Build Identifier: I20110613-1736

We have a local class with a type parameter and a constructor, and we have a constructor invocation of this constructor. When we select the constructor invocation in the editor and choose "Open declaration" we would expect to jump to the constructor declaration in the source code. But we only get an error message in the status line: "Current text selection cannot be opened in an editor". Additionally the bindings for the constructor and for the invocation are not the same.

Reproducible: Always

Steps to Reproduce:
1. Create local class with type parameters and a constructor, create constructor invocation (see attached example)
2. Select the invocation
3. Choose "Open Declaration"
4. See error in status line
Comment 1 Missing name CLA 2011-08-31 09:29:19 EDT
Created attachment 202517 [details]
example class
Comment 2 Satyam Kandula CLA 2011-09-05 02:55:44 EDT
I will look into this.
Comment 3 Satyam Kandula CLA 2011-09-05 06:29:35 EDT
Updated the bug summary.
Comment 4 Satyam Kandula CLA 2011-09-05 06:50:09 EDT
Created attachment 202746 [details]
Patch
Comment 5 Satyam Kandula CLA 2011-09-05 06:51:32 EDT
method declaration's original is not being used to get the source class. Fixed that in the patch attached in comment 4. 
Released that patch in HEAD.
Comment 6 Markus Keller CLA 2011-09-06 07:05:19 EDT
*** Bug 352085 has been marked as a duplicate of this bug. ***
Comment 7 Srikanth Sankaran CLA 2011-09-13 04:25:39 EDT
Verified for 3.8M2 using build id: I20110912-0800.