Generate variable from class instance

6 posts, 0 answers
  1. Christian I.
    Christian I. avatar
    3 posts
    Member since:
    Nov 2006

    Posted 24 Nov 2012 Link to this post

    Hello,

    Is there a way to do this ..

    I wrote :
    new MyClass();

    Is there a way to generate the variable like this :
    var myClass = new MyClass();

    or/and

    MyClass myClass = new MyClass();

    Thanks,
  2. Barry
    Barry avatar
    8 posts
    Member since:
    Jul 2010

    Posted 25 Nov 2012 Link to this post

    Hello Christian,

    Anywhere before the semicolon, you can use CTRL-R-V to generate a variable.  Works well as soon as you key the open parenthesis you can use CTRL-R-V and it will complete the line and introduce the variable.

    Alternatively you can see it under the "R" Visual tag as well.

    Now if we could also have it complete the ending parenthesis automatically that would be great.

    Regards,
    Barry
  3. DevCraft banner
  4. Vladi
    Admin
    Vladi avatar
    167 posts

    Posted 26 Nov 2012 Link to this post

    Hello everyone,

    @Barry: Thanks for the help with the answer. You're correct. I've updated your Telerik points as a small sign of our appreciation. And just one note in regard of "Now if we could also have it complete the ending parenthesis automatically that would be great." I guess you have your Typing Assistance turned off and that's why JustCode doesn't put ending parenthesis automatically. Please turn it on (JustCode Options->General->Typing Assistance->Use Typing Assistance (ON)) and try again. Please let us know if you still have issues.

    Kind regards,
    Vladi
    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.
  5. Barry
    Barry avatar
    8 posts
    Member since:
    Jul 2010

    Posted 26 Nov 2012 Link to this post

    Hello Vladi,

    Sorry I didn't express my "Like to have" feature better. I meant JustCode does not put in the parenthesis at all. It will automatically close them.  Just not create them automatically.  Sorry for the confusion. Thank you for the points!

    Regards,
    Barry
  6. Barry
    Barry avatar
    8 posts
    Member since:
    Jul 2010

    Posted 26 Nov 2012 Link to this post

    Hello Christian,

    Keep in mind, the key bindings I list (CTRL-R-V) is specific to your setup. I currently have mine at the R# settings.

    Regards,
    Barry
  7. Vladi
    Admin
    Vladi avatar
    167 posts

    Posted 27 Nov 2012 Link to this post

    Hello everyone,

    @Barry: Thanks for the clarification. Can you please suggest and vote for it in our Feedback portal (www.telerik.com/justcode/feedback) so that other users can vote for it as well?

    All the best,
    Vladi
    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