xsharp.eu • XIDE Sort entities
Page 1 of 1

XIDE Sort entities

Posted: Tue Dec 10, 2024 2:58 pm
by FFF
Chris,
just wanted to ask you, how you "do" the red line divider in the source editor, (i.e., decide, "where" to put it), as i thought building a "sort entities" tool might make a nice holiday project - only to find, you already implemented this, albeit "experimental"...

A first try let me a bit puzzled - the test prg was historically:
Class
Constructor
Method pshNew
Method Append
Acccess Name4P
Acccess Name4w

after sorting:
Class
Constructor
Method Append
Access Name4P
Access Name4W
Method pshNew

Does that mean, you sort Class, Constructor, and then "only" alphabetically, following the name? As you already do in the Project Explorer "pure alphabetics", i'd probably prefer here a "sort by entitiy type" - Class, Constr, Destructor Access/Assign (paired, if exists), Method. (Ideally, saved/editable in .cfg...)

(BTW, you might have a look at Destructor Statement in the help, the content seems a bit lost ....)

Re: XIDE Sort entities

Posted: Wed Dec 11, 2024 2:04 pm
by Chris
Hi Karl,

That's why I didn't really want to implement Sort Entities, because I'm sure everybody wants it to work in a different way, but when I tried to add a few methods in the plugin system so others can implement it, I realized I had actually already implemented it some time ago but just had the menu item hidden :)

In a moment of weakness I decided to enable it for 2.21, but I'd be very happy to remove it again and let you guys implement it as you want it in a plugin. This is what you meant you intended to do, right?

The red line divider goes automatically just before any entity declaration by the parser, you do not need to deal with this at all. The parser also checks if there are attribute lines before the entity declaration and puts the divider before those.

Also thanks for the note on the DESTRUCTOR help topic, I will open a ticket for this.