This is a migrated thread and some comments may be shown as answers.

Class and method name in template

5 Answers 67 Views
Code Templates
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Josh
Top achievements
Rank 1
Josh asked on 27 Jan 2011, 11:29 PM
Is it possible to access the name of the current class and/or method when you are creating an insert template?

For example, I have a template that inserts logging code and gives me a list of choices for the type of log entry (debug, info, error, etc). I would like it to automatically add MethodName(): and then leave the cursor ready for me to enter the relevant log entry text.

5 Answers, 1 is accepted

Sort by
0
Tsviatko Yovtchev
Telerik team
answered on 02 Feb 2011, 10:16 AM
Hello Josh,

 Rather unfirtunately there is no such template function at the moment. We will be introducing new tamplate functions later during the year but it's hard to commit to a more exact date. So, please, stay tuned.

Regards,
Tsviatko Yovtchev
the Telerik team
Browse the videos here>> to help you get started with JustCode
0
Josh
Top achievements
Rank 1
answered on 26 Mar 2013, 05:34 PM
Hello - I was wondering if there was any news on this
0
Zdravko
Telerik team
answered on 27 Mar 2013, 04:12 PM
Hello Josh,

 Thanks for getting back to us.
I regret to say that we have no progress regarding this request so far.
However, I would ask you to post a feature request at our new feedback portal and vote for it.
This way your idea could gather popularity and votes among the community and get closer to implementation.
Thanks.

All the best,
Zdravko
the Telerik team
Share what you think about JustCode with us, so we can help you even better! You can use the built-in feedback tool inside JustCode, our forum, or our JustCode feedback portal.
0
Chad England
Top achievements
Rank 1
answered on 16 May 2013, 11:54 PM
it is a bummer that this is a limitation, but ever new release JustCode gets better.  Currently I use this extension for method snippets

http://visualstudiogallery.msdn.microsoft.com/b08b0375-139e-41d7-af9b-faee50f68392
0
Svetlozar
Telerik team
answered on 17 May 2013, 08:16 AM
Hi,

 We recently added support for getting the member name. Here is an example template definition 

Console.WriteLine("$1=GET_MEMBER_NAME()$");

We will also add GET_TYPE_NAME. They will be available in the next internal build. 

All the best,
Svetlozar
the Telerik team
Share what you think about JustCode with us, so we can help you even better! You can use the built-in feedback tool inside JustCode, our forum, or our JustCode feedback portal.
Tags
Code Templates
Asked by
Josh
Top achievements
Rank 1
Answers by
Tsviatko Yovtchev
Telerik team
Josh
Top achievements
Rank 1
Zdravko
Telerik team
Chad England
Top achievements
Rank 1
Svetlozar
Telerik team
Share this question
or