Live templates: Macro for getting most inner type includes class itself?

[Build 6.1.37]

I have this class structure:


class Foo
        {
             class Bar : Foo
             {
               //cursor  
             }
        }

And I've created a Live template like this:

$END$
}

Where $Base$ is set to "Containing type name" and not editable. But when I execute template and type "Abc" I get code below:

class Foo
        {
             class Bar : Foo
             {
                 class Abc : Abc
                 {
                   //cursor   
                 }
             }
        }


I expected it to be "class Abc : Bar", isn't this the intent? Is there an existing macro I can use for my desired behavior?

(I create unit test fixtures this way, e.g. abstract class FooFixture {  abstract class WhenBarIsNullFixture : FooFixture { class AndSomethingElseFixture : WhenBarIsNullFixture ... etc. )

Thanks.
1
1 comment
Avatar
Andrey Serebryansky

Hello
     This looks like a bug to me. I've logged it as http://youtrack.jetbrains.net/issue/RSRP-288254. Thank you!

Andrey Serebryansky

Senior Support Engineer

JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"

1

Please sign in to leave a comment.