I am trying to create my own live template which uses the current line that my cursor is on, but I cannot find the variable for it.
To explain what I mean, IntelliJ has a built-in.sout template which SOUTs the current statement.
I am trying to find a way to add my own.[extention] that wraps the current code on that line, into a different statement.
So something like this:
Any ideas on how to get that done properly?
You need to create postfix completion. Rather than Live template, postfix completion surrounds an expression you've just typed. See https://www.jetbrains.com/help/idea/settings-postfix-completion.html
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.