Auto-Declare template

I'm trying to create an Auto-Declare template, but I can't figure out which
macro will suggest a list of constructor parameters. This is the template
I've created thus far:

$Type$ $var$ = new $Type$($params$);

Explanation:
$Type$ uses no macro.
$var$ uses "Suggest name for a variable.
$params$ uses "Execute SmartType completion" - this is where I need help

Usage:
I type "ad + tab". Then enter "Da" and the IDE suggests $Type$ is a DateTime,
which is what I want. Then I auto-accept the variable name. Next, I want
$params$ to show the DateTime constructor overloads so I can choose the appropriate
one. Any advice?


1 comment
Comment actions Permalink

Hello flipdoubt,

I can suggest using this kind of template

$Type$ $var$ = new $Type$($END$);

where $END$ is built-in marker where caret is placed when template is finished.
Thus, you will have caret in place and can see normal parameter information
and use Ctrl-Shift-Space (Smart Complete) to quickly fill in parameters.

Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


f> I'm trying to create an Auto-Declare template, but I can't figure out
f> which macro will suggest a list of constructor parameters. This is
f> the template I've created thus far:
f>
f> $Type$ $var$ = new $Type$($params$);
f>
f> Explanation:
f> $Type$ uses no macro.
f> $var$ uses "Suggest name for a variable.
f> $params$ uses "Execute SmartType completion" - this is where I need
f> help
f> Usage:
f> I type "ad + tab". Then enter "Da" and the IDE suggests $Type$ is a
f> DateTime,
f> which is what I want. Then I auto-accept the variable name. Next, I
f> want
f> $params$ to show the DateTime constructor overloads so I can choose
f> the appropriate
f> one. Any advice?


0

Please sign in to leave a comment.