Bug 71562

Summary: [5.0][templates] Foreach Iteration Template and variable needed.
Product: [Eclipse Project] JDT Reporter: Robert (Kraythe) Simmons <robert.simmons>
Component: TextAssignee: Tom Hofmann <eclipse>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: akiezun
Version: 3.0   
Target Milestone: 3.1 M5   
Hardware: Other   
OS: Linux   
Whiteboard:
Bug Depends on: 72097    
Bug Blocks:    

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