Live template "magic"
Is it possible to write live templates that do magic with the file in
question, thats NOT at the cursor location?
i.e. add something to the template like
#import org.foo.Bar
doSomethingThatNeedsBar( Bar $foo$ )
{
...
}
Mark
请先登录再写评论。
Just use the qualified name of "org.foo.Bar" in the live template. There is
a checkbox "Shorten FQ names" in the live template configuration. It causes
replacing of such names with short with adding necessary import statement.
The checkbox is on by default.
--
Valentin Kipiatkov
JetBrains, Inc
http://www.intellij.com
"Develop with pleasure!"
"Mark Derricutt" <mark@talios.com> wrote in message
news:pan.2002.12.17.03.45.23.196455@talios.com...
>
>
>
"Valentin Kipiatkov" <valentin@intellij.com> wrote in message
news:atsjh6$pv2$1@is.intellij.net...
is
causes
Ha! I've been wondering for a long time what "FQ" means; it means
"fully-qualified". Kind of ironic that it's abbreviated, eh? (Kind of like
abbreviation being such a long word...)