XIDE Sort entities

This forum is meant for questions and discussions about the X# language and tools
Post Reply
FFF
Posts: 1590
Joined: Fri Sep 25, 2015 4:52 pm
Location: Germany

XIDE Sort entities

Post 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 ....)
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
User avatar
Chris
Posts: 4978
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Re: XIDE Sort entities

Post 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.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
Post Reply