Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 338096 - Feature Request (Templates): Proposals on an assignment
Summary: Feature Request (Templates): Proposals on an assignment
Status: CLOSED WONTFIX
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Recommenders (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P5 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Marcel Bruch CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2011-02-24 09:55 EST by Johannes Lerch CLA
Modified: 2019-07-24 14:36 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Lerch CLA 2011-02-24 09:55:31 EST
I expect to get template proposals triggering code completion in this situation:
final Button b = <^Space>

Test case provided in class CompletionOnAssignment in fixture project: org.eclipse.recommenders.tests.fixtures.rcp.codecompletion.templates
Comment 1 Stefan Henss CLA 2011-02-25 01:37:48 EST
I see that "final Button b" is given in completionNodeParent() and getExpectedType() is correctly set. But the receriverName is empty and receiverType is null. The second one is not problem but will the receiverName be available from the context?
Comment 2 Marcel Bruch CLA 2011-02-25 02:34:14 EST
code completion is not triggered on any "name". If I would assume that "b" is the receiver name I would exclude any other statements like method returns as in chain completion would return. I guess you have to take this information from the LocalDeclaration or its superclass AbstractVariableDeclaration.
Comment 3 Marcel Bruch CLA 2012-02-02 01:55:24 EST
FWIW, getCompletionNodeParent() now contains the information about the assignment, i.e.,

"final Button b = <CompleteOnName:>;"

We should keep this in mind when updating the template completion during M6.

Setting the status to new again as there has been no progress for a year. Stefan, if you would like to migrate the template completion for M6 and fix this issue please reassign it to you.  Thanks, Marcel
Comment 4 Marcel Bruch CLA 2013-12-01 09:48:19 EST
Closing as wont fix as there is no one working on this one and we have no plans to support it in 2.x yet.