Bug 230864 - [assist] Code assist do not work in parameterized method with 'this' as receive
Summary: [assist] Code assist do not work in parameterized method with 'this' as receive
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 RC1   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-07 06:45 EDT by David Audel CLA
Modified: 2008-05-14 05:18 EDT (History)
2 users (show)

See Also:
eric_jodet: review+


Attachments
Proposed fix (5.18 KB, patch)
2008-05-07 09:38 EDT, David Audel CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Audel CLA 2008-05-07 06:45:08 EDT
build I20080502-0100

1) create X.java
package test;
public class X {
        <T>void foo() {
                this.<X>fo|o(); // do ctrl+space at |
        }
}

2) do ctrl+space at | location
There is no proposal
Comment 1 David Audel CLA 2008-05-07 09:38:58 EDT
Created attachment 99068 [details]
Proposed fix
Comment 2 David Audel CLA 2008-05-07 09:59:05 EDT
In the following patch the nature of the receiver is checked in the CompletionEngine instead of inside CompletionOnMessageSendName.
In this case the 'qualifiedBinding' is always the receiver type and the receiver node is checked to know if only static members can be proposed.
Comment 3 David Audel CLA 2008-05-07 10:36:23 EDT
Eric - Could you review my fix ?
Comment 4 Eric Jodet CLA 2008-05-12 04:11:56 EDT
+1 for 3.4RC1
Comment 5 David Audel CLA 2008-05-12 04:19:25 EDT
Released for 3.4RC1.

Tests updated
  CompletionTests_1_5#test0278() -> test0284()
Comment 6 Jerome Lanneluc CLA 2008-05-14 05:18:02 EDT
Verified for 3.4RC1 using I20080513-2000