Summary: | TypeConverters don't set enclosingType | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Stephan Herrmann <stephan.herrmann> | ||||
Component: | Core | Assignee: | Jay Arthanareeswaran <jarthana> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | minor | ||||||
Priority: | P3 | CC: | amj87.iitr, daniel_megert, satyam.kandula, srikanth_sankaran | ||||
Version: | 3.7 | ||||||
Target Milestone: | 3.7 M1 | ||||||
Hardware: | PC | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Stephan Herrmann
2010-07-25 07:49:32 EDT
Created attachment 175173 [details]
proposed patch
This patch adds a quite obvious line to both SourceTypeConverter and
BinaryTypeConverter:
typeDeclaration.memberTypes[i].enclosingType = typeDeclaration;
If this was omitted on purpose, I'd love to learn why.
The other inconsistency I was seeing was actually false alarm:
For a while I was thinking that also SourceElementNotifier should be changed
to pass the current type as declaringType into notifySourceElementRequestor(TypeDeclaration,boolean,TypeDeclaration,ImportReference)
(Call in line 678).
However, on debugging this I see the difference between the declaringType
of a local type and the enclosingType of a member type. Here I simply suggest
to rename the parameter to avoid confusion. No big deal.
Jay, please take it forward. TIA. Patch looks good. I will release later today. About the declaringType parameter, I don't seem to run into a case where a non-null is passed for declaringType. I mean, if the declaringType is a declaring type of a local type, won't it be covered as field's declaring type? Besides for consistency case (we use enclosing type for outer/inner types) we might want to leave it as is but with a clarifying documentation, of course. Jay, I saw you already committed the patch - not good, because - every source file that gets changes from someone that is not covered by the company mentioned in the copyright notice must be added like this: name <e-mail> - bugzilla summary - bugzilla URL e.g. Dani Megert <dani@eclipse.org> - My bug summary - https://bugs.eclipse.org... - the iplog+ flag must be set on the patch in the this bug (In reply to comment #4) > Jay, I saw you already committed the patch - not good, because > > - every source file that gets changes from someone that is not covered by > the company mentioned in the copyright notice must be added like this: > name <e-mail> - bugzilla summary - bugzilla URL > e.g. > Dani Megert <dani@eclipse.org> - My bug summary - https://bugs.eclipse.org... > > - the iplog+ flag must be set on the patch in the this bug Sorry, I thought the 'Others' in the copyright should cover this. Is it too late to add to the copyright and set the iplog+ now? >Sorry, I thought the 'Others' in the copyright should cover this. http://www.eclipse.org/legal/copyrightandlicensenotice.php >Is it too >late to add to the copyright and set the iplog+ now? No, just add the line and update the flag. Released in HEAD for 3.7 M1. Verification to be done by code inspection. Verified for 3.7M1 using build I20100802-1800 looking at the source code |