I have created a code template to add a logger and the corresponding import:
${:import(org.apache.log4j.Logger)}
private static final Logger logger = Logger.getLogger(${enclosing_type}.class);
If I add this now, the logger always starts at the beginning of the line, even if my cursor is already indented. Is there a way to to force the placement at the position of the cursor?
This is a screenshot to show what I mean:
====>>>>
Edit: The answer from Grove helped in this specific case. But how about this example? I also want to add a comment to the logger. If I define the template like this in the same line, the logger actually apears in the same line as the comment.
${:import(org.apache.log4j.Logger)}
/**
* Logger
*/ private static final Logger logger = Logger.getLogger(${enclosing_type}.class);