CodeRush had member / using sorters. Clarion analog: sort the procedure prototypes in a MAP (or the method declarations in a CLASS) alphabetically.
Behaviour
Code action on a MAP block (or MODULE within it) / a CLASS declaration → "Sort declarations (A–Z)":
- Reorder the prototype / method-declaration lines alphabetically by name.
- Preserve comments attached to each line, and keep grouping (e.g.
MODULE(...) blocks sorted internally, not merged).
Infra it reuses
DocumentStructure already models MAP / MODULE / CLASS and their member lines with ranges — the reorder operates on known line groups.
Wrinkles to decide
- Whether to sort across
MODULE boundaries (recommend: within each MODULE / CLASS only).
- Overloads with the same name — keep stable relative order.
Acceptance
- Members sorted within their group; comments travel with their line; overload order stable; file still compiles.
Effort: ~1 day.
CodeRush had member / using sorters. Clarion analog: sort the procedure prototypes in a
MAP(or the method declarations in aCLASS) alphabetically.Behaviour
Code action on a
MAPblock (orMODULEwithin it) / aCLASSdeclaration → "Sort declarations (A–Z)":MODULE(...)blocks sorted internally, not merged).Infra it reuses
DocumentStructurealready modelsMAP/MODULE/CLASSand their member lines with ranges — the reorder operates on known line groups.Wrinkles to decide
MODULEboundaries (recommend: within eachMODULE/CLASSonly).Acceptance
Effort: ~1 day.