R#6 Live Templates - Painful experience

Hello,

I'm using Visual Studio 2010 Ultimate.

I'm using the template below to create types and R#6 just formats it incorrectly and is acting weird.

$HEADER$
namespace $NAMESPACE$
{
    using System;

    /// <summary>
    ///  $SUMMARY$
    /// </summary>
    $MODIFIER$ $TYPE$ $TYPENAME$
    {
    }
}

template.jpg

Notice that for the header  token "$HEADER$" I'm checking "Editable  Occurrence" because it doesn't seems to generate the header if it's not  checked.

Here is the output I'm getting.

template_output.jpg

The expected result should be something like that.

// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Type4.cs" company="Eyal Shilony">
//     © 2011 Eyal Shilony, All rights reserved.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

namespace Shilony.DataAccessLayer.UnitTest
{
    using System;
    
    /// <summary>
    ///  #todo: Update summary.
    /// </summary>
    public class ClassName
    {
    }
}

I tried to use both Live Templates and File Templates and still the same thing happens, is it a bug in the macros ?

4 comments

Hello Eyal,

Could you please export that template into an .xml file and attach it here,
so that I could check this behavior with the exact same template that you're
using? Thank you!

Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Hello,

I'm using Visual Studio 2010 Ultimate.

I'm using the template below to create types and R#6 just formats it
incorrectly and is acting weird.

$HEADER$
namespace $NAMESPACE$
{
using System;
/// <summary>
///  $SUMMARY$
/// </summary>
$MODIFIER$ $TYPE$ $TYPENAME$
{
}
}
Image:template.jpg
Notice that for the header  token "$HEADER$" I'm checking "Editable
Occurrence" because it doesn't seems to generate the header if it's
not  checked.

Here is the output I'm getting.
Image:template_output.jpg
The expected result should be something like that.

//
----------------------------------------------------------------------
----------------------------------------------

// <copyright file="Type4.cs" company="Eyal Shilony">

//     © 2011 Eyal Shilony, All rights reserved.

// </copyright>

//
----------------------------------------------------------------------
----------------------------------------------

namespace Shilony.DataAccessLayer.UnitTest
{
using System;
/// <summary>
///  #todo: Update summary.
/// </summary>
public class ClassName
{
}
}
I tried to use both Live Templates and File Templates and still the
same thing happens, is it a bug in the macros ?

---
Original message URL:
http://devnet.jetbrains.net/message/5320132#5320132



0

Hello Eyal,

Thank you! This seems to be a bug, so I've logged it under http://youtrack.jetbrains.net/issue/RSRP-276069
and you're welcome to vote for it.

Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Yeah sure.

---
Original message URL:
http://devnet.jetbrains.net/message/5320147#5320147



0

Please sign in to leave a comment.