MBS-7704: Factor out option trees from entities

Merged
#1063 · Created  · Last updated

Description

The various entities that are organized in a tree (having a parent, children, a child_order) each implemented the relevant fields themselves, a massive duplication of code. The common parts are factored out into a parameterized OptionsTree role, corresponding to the Data role of the same name.

The sorted_children accessor that a few of these entities already had is made available in all of them, and is extended to use a specific collator instead of sorting by (lowercased) codepoint order.

This reduces the code size by more than four hundred lines.

0 attachments

0 comments

Loading commits...