[DevExpress Support Team: CLONED FROM T609122: Object Initialization Formatting indentation rules not followed on subsequent format of document]
I could get used to splitting things out more, but I would certainly love to see the Smart Copy / Paste automatically introduce a local variable for me as in CodeRush Classic -- otherwise splitting things out interrupts my flow too much.
Jason,
I am not sure that I understand what scenario with Smart Copy \ Paste you consider to be missing if compared to CodeRush Classic. So, please provide us with a code sample or a screencast that illustrates this in action.
We appreciate your cooperation.
I can't really do that because I don't have an old version of VS installed, nor CodeRush Classic.
CodeRush Classic had a "Smart Cut/Paste" feature as a sub-option of Smart Copy/Paste where I could select an object initialized out of the middle of a code segment:
DoSomething(new Request() { Foo = bar });
and then I could cut "new Request() { Foo = bar }" and paste it above. It would introduce a new local variable automatically in front, automatically adding a reference to the new variable in the place I cut from and I'd end up with:
Request request = new Request() { Foo = bar }; DoSomething(request);
just by pasting that segment.
It was a very slick feature that I'd like to see again.
Incidentally, I just noticed that 'Introduce Local' feature got added somewhere along the way since I started using CR for Roslyn, so that will be sufficient for me if you don't want to re-implement Smart Cut / Paste.
Thank you for the clarification, Jason.
You are talking about the Intelligent Paste feature.
You are right, it is not ported from CodeRush Classic yet, but we have a card for this feature in our product backlog.
I have added your request to this card, so we will take it into account when we plan future releases.
We will notify you when we implement this in CodeRush for Roslyn.