Bug 71562 - [5.0][templates] Foreach Iteration Template and variable needed.
Summary: [5.0][templates] Foreach Iteration Template and variable needed.
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.0   Edit
Hardware: Other Linux
: P3 enhancement (vote)
Target Milestone: 3.1 M5   Edit
Assignee: Tom Hofmann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 68826 (view as bug list)
Depends on: 72097
Blocks:
  Show dependency tree
 
Reported: 2004-08-06 09:43 EDT by Robert (Kraythe) Simmons CLA
Modified: 2005-01-10 11:28 EST (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 Robert (Kraythe) Simmons CLA 2004-08-06 09:43:46 EDT
There should be a variable that can be used to locate the type of object 
within a generic collection. For example in Set<String> the variable 
${collection_component} should resolve to String.  
 
This would be used in building a template for foreach iteration.  
 
for (final ${collection_component} str : ${collection}) { 
	System.out.println(str); 
} 
 
Then assuming this was invoked in the following method: 
 
public void someMethod(final Set<String> values) { 
    // invoked here 
} 
 
the result would be:  
 
public void someMethod(final Set<String> values) { 
    for (final String str : values) { 
        System.out.println(str); 
    } 
}
Comment 1 Tom Hofmann CLA 2004-08-17 04:10:10 EDT
already started with this
Comment 2 Tom Hofmann CLA 2004-08-17 11:07:03 EDT
blocked by bug 72097 since we don't get the parameter type information when
collecting completions.
Comment 3 Tom Hofmann CLA 2004-08-19 12:05:20 EDT
*** Bug 68826 has been marked as a duplicate of this bug. ***
Comment 4 Tom Hofmann CLA 2005-01-10 11:28:28 EST
fixed, available > 20050107