New refactoring: reverse order
Posted: Sat Nov 21, 2009 9:17 pm
Could you add a new XML refactoring that would reverse the order of the selected elements?
Most common use would be to flip the order of two adjacent elements.
(But occasionally it would be useful to invert the order of three or more adjacent elements. Suppose you have <a/><b/><c/><d/> and you want to get to <d/><b/><c/><a/>. You could do two cut-and-paste (or drag-and-drop), but this always seems to go wrong, and messes up the formatting to boot, requiring a format-and-indent. Alternatively, with reverse order, you could go <a/><b/><c/><d/> to <d/><c/><b/><a/> to <d/><b/><c/><a/>. I'd find that easier and less likely to go wrong, myself.)
John
Most common use would be to flip the order of two adjacent elements.
(But occasionally it would be useful to invert the order of three or more adjacent elements. Suppose you have <a/><b/><c/><d/> and you want to get to <d/><b/><c/><a/>. You could do two cut-and-paste (or drag-and-drop), but this always seems to go wrong, and messes up the formatting to boot, requiring a format-and-indent. Alternatively, with reverse order, you could go <a/><b/><c/><d/> to <d/><c/><b/><a/> to <d/><b/><c/><a/>. I'd find that easier and less likely to go wrong, myself.)
John