Community
Participate
Working Groups
I am trying to define a code template for creating a new method and would like to have the cursor stop at the empty parameter list. I have a pattern similar to this: private void get(${}) { ${cursor} } ${:import(...)} The cursor starts at the method body and when I hit tab it doesn't go to the method parameter list. When I remember the ${:import(...)} variable, then the cursor starts at the method parameter list and on tab jumps to the method body as expected.
> When I remember the ${:import(...)} variable, ... I guess you meant "remove", not "remember". As a workaround, give the "import" variable a dummy name, e.g. private void get(${}) { ${cursor} }${x:import(java.util.Vector)}
Yes sorry..I meant remove. Thanks for the workaround!
The general problem is that multiple variables without a name are not handled gracefully. The parser doesn't even allow templates like this: ${:import(java.util.Vector)}${:importStatic(java.lang.Math.PI)} But it doesn't yell if there are one or more ${} in the template.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.