[465] Has Live Template Indenting Changed?

I have a Live Template that creates a simple, new property. If I'm not mistaken,
the Template Text used to indent properly when the template expanded. Here
is the template text from the Options dialog:
--
private $Type$ _$FieldName$;

public $Type$ $FieldName$
{
get{ return _$FieldName$; }
set{ _$FieldName$ = value; }
}
--

When I actually expand the template, however, I get text like the following,
where the field is properly indented by the property is not:
--
private Type _FieldName;

public Type FieldName
{
get{ return _FieldName; }
set{ _FieldName = value; }
}
--

Has Live Template Indenting changed?


3 comments
Comment actions Permalink

Hello,

Make sure that your template has correct context setting (it should be
set to be available in C# files only).

Oleg Stepanov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

I have a Live Template that creates a simple, new property. If I'm not
mistaken,
the Template Text used to indent properly when the template expanded.
Here
is the template text from the Options dialog:
--
private $Type$ _$FieldName$;
public $Type$ $FieldName$
{
get{ return _$FieldName$; }
set{ _$FieldName$ = value; }
}



0
Comment actions Permalink

Hello flipdoubt,

Could you please verify that "Reformat" is checked for the Live Template?

Sincerely,
Ilya Ryzhenkov

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


f> I have a Live Template that creates a simple, new property. If I'm
f> not mistaken,
f> the Template Text used to indent properly when the template expanded.
f> Here
f> is the template text from the Options dialog:
f> --
f> private $Type$ _$FieldName$;
f> public $Type$ $FieldName$
f> {
f> get{ return _$FieldName$; }
f> set{ _$FieldName$ = value; }
f> }
f> --
f>
f> When I actually expand the template, however, I get text like the
f> following,
f> where the field is properly indented by the property is not:
f> --
f> private Type _FieldName;
f> public Type FieldName
f> {
f> get{ return _FieldName; }
f> set{ _FieldName = value; }
f> }
f> --
f>
f> Has Live Template Indenting changed?
f>


0
Comment actions Permalink

Reformat was checked but Oleg's context settings were set to everywhere.
I had some instances in the past where "everywhere" was the only one that
yield the behavior I expected. Hopefully, they are fixed in this version.

Thanks.


0

Please sign in to leave a comment.