| Summary: | "Create Snippet" doesn't handle variable declarations in different blocks | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Marcel Bruch <marcel.bruch> |
| Component: | Recommenders | Assignee: | Anne-Christine Karpf <acka> |
| Status: | RESOLVED FIXED | QA Contact: | Johannes Dorn <johannes.dorn> |
| Severity: | enhancement | ||
| Priority: | P5 | CC: | johannes.dorn |
| Version: | unspecified | Keywords: | helpwanted |
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Mac OS X | ||
| See Also: | https://bugs.eclipse.org/bugs/show_bug.cgi?id=436694 | ||
| Whiteboard: | |||
The fix is merged https://git.eclipse.org/r/#/c/30194/ Thanks, Anne! |
Given a code fragment like: { // block 1 String e1; } { // block 2 String e1; } produces a snippet like: { // block 1 String ${e1:newName(java.lang.String)}; } { // block 2 String ${e1}; } ${:import(java.lang.String)}${cursor} which is not correct since e1 in the block 2 is not the same as in block 1. Currently there is no scope. In order to fix this, every variable binding must be traced back to it's defining variable declaration statement and ids must be given based on these definition statements. It's a half day's work I think.