| Summary: | [5.0][templates] Foreach Iteration Template and variable needed. | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Robert (Kraythe) Simmons <robert.simmons> |
| Component: | Text | Assignee: | 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: | |||
already started with this blocked by bug 72097 since we don't get the parameter type information when collecting completions. *** Bug 68826 has been marked as a duplicate of this bug. *** fixed, available > 20050107 |
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); } }