Class and method name in template

6 posts, 0 answers
  1. Josh
    Josh avatar
    5 posts
    Member since:
    Jan 2011

    Posted 27 Jan 2011 Link to this post

    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.
  2. Tsviatko Yovtchev
    Admin
    Tsviatko Yovtchev avatar
    408 posts

    Posted 02 Feb 2011 Link to this post

    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
  3. DevCraft banner
  4. Josh
    Josh avatar
    5 posts
    Member since:
    Jan 2011

    Posted 26 Mar 2013 Link to this post

    Hello - I was wondering if there was any news on this
  5. Zdravko
    Admin
    Zdravko avatar
    657 posts

    Posted 27 Mar 2013 Link to this post

    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.
  6. Chad England
    Chad England avatar
    4 posts
    Member since:
    Mar 2006

    Posted 16 May 2013 Link to this post

    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
  7. Svetlozar
    Admin
    Svetlozar avatar
    269 posts

    Posted 17 May 2013 Link to this post

    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.
Back to Top
DevCraft banner