Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 466729

Summary: Make completion node parent available in foreach node
Product: [Eclipse Project] JDT Reporter: Marcel Bruch <marcel.bruch>
Component: CoreAssignee: Jay Arthanareeswaran <jarthana>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: jarthana, manoj.palat, stephan.herrmann
Version: 4.5   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug

Description Marcel Bruch CLA 2015-05-07 09:15:14 EDT
When triggering completion on the snippet below, the expected types accessible via  org.eclipse.jdt.internal.codeassist.InternalCompletionContext.getExpectedTypesSignatures() is null:

for(String s : | )




It could, however, be Iterable<String> || String[] or something along these lines.

Would be it possible to make this information available - or even better: make the ForeachStatement stored in Parser.astStack accessible as assistNodeParent?
Comment 1 Stephan Herrmann CLA 2015-05-07 10:18:45 EDT
you're not requesting this for 4.5, are you?

Setting a target milestone 4.6 so we won't forget this request.
Comment 2 Jay Arthanareeswaran CLA 2016-05-03 04:46:47 EDT
Sorry, couldn't fulfill this in 4.6. Will take a look during 4.7.
Comment 3 Manoj N Palat CLA 2018-05-21 06:07:07 EDT
Bulk move out of 4.8
Comment 4 Eclipse Genie CLA 2020-08-12 03:38:19 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 5 Eclipse Genie CLA 2022-10-04 14:18:48 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 6 Stephan Herrmann CLA 2022-10-04 15:02:58 EDT
With code recommenders out off the picture, I don't think this is relevant anymore. 

There's even a slight chance that assistNodeParent handling has already been improved by another change.