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

Generate variable from class instance

5 Answers 62 Views
Code Generation
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Kris-I
Top achievements
Rank 1
Kris-I asked on 24 Nov 2012, 08:02 AM
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,

5 Answers, 1 is accepted

Sort by
0
Barry
Top achievements
Rank 1
answered on 25 Nov 2012, 02:06 PM
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
0
Vladi
Telerik team
answered on 26 Nov 2012, 12:45 PM
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.
0
Barry
Top achievements
Rank 1
answered on 26 Nov 2012, 02:35 PM
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
0
Barry
Top achievements
Rank 1
answered on 26 Nov 2012, 02:47 PM
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
0
Vladi
Telerik team
answered on 27 Nov 2012, 10:27 AM
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.
Tags
Code Generation
Asked by
Kris-I
Top achievements
Rank 1
Answers by
Barry
Top achievements
Rank 1
Vladi
Telerik team
Share this question
or