Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Sort lines by ...

You must be registered to post a reply.
Click here to register.

Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji

Forum code is on.
Html is off.

Check to subscribe to this topic.

T O P I C    R E V I E W
Uniwares Posted - Nov 10 2021 : 12:53:47 PM
Refactoring code is a pain, sometimes it would be really useful to be able to sort lines by syntactic criteria, like property or value.

    divPayChecksReceipts.Visible = true;
    btnSelectYear.Disabled = false;
    btnAccept.Disabled = true;
    btnBack.Disabled = false;
    btnClose.Disabled = false;
    btnCloseUser.Enabled = true; 
    btnNew.Disabled = true;
    btnConfirm.Enabled = true; 
    btnNewP.Disabled = true;
    btnValidate.Enabled = false;
Notice those Enabled in the middle of all?
When you got a few dozen of those around, you really may want to sort them by the property (or method), or by the value assigned.

All current line sort methods I found, sort only alphabetically.
4   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Nov 15 2021 : 07:54:01 AM
Jumping around between different tools and versions of Visual Studio, the different versions of regular expressions sometimes just give me a headache. It's the way the IDE's Find dialog regular expressions are so different that can really irritate. I don't think I have yet seen a tool that would help with the IDE's Find dialog regex syntax.
Uniwares Posted - Nov 12 2021 : 08:14:22 AM
One could of course also use the Roslyn tree to select sorting options, but that might be a far shot. There are some very good regex editors for VS out there, my personal favorite is https://marketplace.visualstudio.com/items?itemName=GeorgyLosenkov.RegexEditorLite which has a great reference guide built in and a testing area.

I might try the macro though.
feline Posted - Nov 12 2021 : 08:09:28 AM
Interesting, and I do see what you are getting at here. We are considering adding a regex sorting option:


its just that there are so many different flavours of regex, and not everyone understands how to use regex. Still, it would be ideal here.

If you run into situations like this fairly often it might be trying one of the IDE macro extensions. This should be the sort of thing that an IDE macro is well suited to doing, depending on how well the extensions work.
Uniwares Posted - Nov 10 2021 : 1:12:43 PM
Well, thinking about it, might even use RegEx for it

Sort by group 1 (property) then group 2 (value)

© 2021 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000