Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 330641 - [templates] variable 'iterable' should also include member scope fields
Summary: [templates] variable 'iterable' should also include member scope fields
Status: CLOSED DUPLICATE of bug 117215
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows Vista
: P5 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-19 04:05 EST by thomas menzel CLA
Modified: 2013-11-04 08:51 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description thomas menzel CLA 2010-11-19 04:05:49 EST
i happily use the foreach template but what bothers me is that it doenst include fields on the class in the list of suggestions. that would be really great!
Comment 1 Dani Megert CLA 2010-11-19 07:47:47 EST
NOTE: You could implement your own variable resolver and use that one in the template.
Comment 2 Thomas Girard CLA 2013-08-20 08:27:04 EDT
The doc states that ${iterable} "Evaluates to a proposal for an iterable or array visible in the current scope.".

Here: http://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Fconcepts%2Fconcept-template-variables.htm

So either the code or the doc needs fixing.

It seems that most 'simple' variables (iterable, array, collection, etc.) behave this way (suggest only locals). 

The 'complex' variable ${id:var(type)} works on all scopes.
Comment 3 Manuel Bork CLA 2013-11-04 08:51:37 EST

*** This bug has been marked as a duplicate of bug 117215 ***