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

Constructor Request

6 Answers 41 Views
Refactorings
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
sitefinitysteve asked on 12 Apr 2013, 02:47 AM
You know how right now you have the ability to create a constructor?

Could you give us another one to create a constructor that also passes in all the properties and initializes them?

So it would take this
public class AlphaPagerItem {
     public string Text { get; set; }
     public string Url { get; set; }
     public string Class { get; set; }
 }

ANd do this
public class AlphaPagerItem {
     public AlphaPagerItem(string text, string url, string cssClass)
     {
           this.Text = text;
           this.Url = url;
           this.CssClass = cssClass;
     }
 
     public string Text { get; set; }
     public string Url { get; set; }
     public string CssClass { get; set; }
 }
Going the extra mile would be the ability to remove properties before it "saves"

...thoughts?

6 Answers, 1 is accepted

Sort by
0
Zdravko
Telerik team
answered on 12 Apr 2013, 12:49 PM
Hello Steve,

 Thanks for the suggestion.
We will discuss it within the team. I was thinking to pop up an additional window to the current command that will allow you to select which properties to pass and if none selected to create constructor without parameters.

Thanks.

Kind regards,
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
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
answered on 12 Apr 2013, 12:56 PM
If you could work it such that keystrokes would just work, that'd be fantastic...generally I hate having to move from keyboard to a mouse in a popup....like the replace dialog that pops up, always feel I need to go to the mouse to make sure I'm not replacing solution-wide

Google your competitors "Smart Constructor"
0
Zdravko
Telerik team
answered on 12 Apr 2013, 01:01 PM
Hi,

 Right now you can generate constructor by selecting the properties that you want to include for initialization. But this way you can't skip any.
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
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
answered on 12 Apr 2013, 01:03 PM
Right now you can generate constructor by selecting the properties that you want to include for initialization

Oh!?...how?  Is there any documentation or video...or?

I tried just screwing around with Ctrl-~ on a new class and couldn't see (wasn't obvious)
0
Zdravko
Telerik team
answered on 12 Apr 2013, 01:07 PM
Hi,

 Indeed, it seems there is a lapse in the documentation which I will fix right now. Here is the demo.
Thanks.

Greetings,
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
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
answered on 12 Apr 2013, 01:12 PM
OH!  See that's not even obvious from the JC UI that it would even happen!...documentation aside

Thanks
Tags
Refactorings
Asked by
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
Answers by
Zdravko
Telerik team
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
Share this question
or