History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: RSRP-45820
Type: New Feature New Feature
Status: Open Open
Priority: Normal Normal
Assignee: Oleg Stepanov
Reporter: Drew Noakes
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
ReSharper

Ability to invert values in ternary operation

Created: 19 Jul 07 11:50   Updated: 19 Jul 07 14:19
Component/s: Code Editing
Fix Version/s: 4.0
Security Level: Everybody (All jira users)

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 468


 Description  « Hide
For the statement:

a ? b : c

With build 468 I can "Invert condition" which maintains the logic, giving:

!a ? c : b

I had some code in which what I really wanted was:

a ? c : b

Firstly, I'd tried doing "CTRL+ALT+SHIFT Left/Right" to swap them. Then I hunted around for intentions, finding the one above.

It seems as though all intentions are designed to maintain equivalent function of the code, yet what I'm after would invert the logic. To me it seems natural to use C+A+S L/R for this.



 All   Comments   Work Log   Change History      Sort Order:
Ilya Ryzhenkov - 19 Jul 07 14:19
I also think C-A-S-Left/Right would be nice to swap second and third arguments of ?: operator.