Create a mechanism to enable sorting the prototypes (categories) in model elements view aside of the standard lexicographical one
The order of the elements inside the model elements view is defined by the order of the respective prototype categories. Currently, these categories are sorted lexicographically. However, for some categroies it might be more suitable to have them grouped on a specific position of the list. Example: reuse libraries should be grouped and be probably at the end of the list behind the standard elements (independent of their names).
Suggestion: A priority can be introduced for the prototype categories, which will override the lexicographical order (except for same prios). By default they are always prio 0 but if wanted the developer can assign a different prio and thus force the categories to a specific position (in relation to the other ones). In the reuse library example, their categories would get something like -1 (or -10) to have them always at the end of the list.
Starting points:
- Prio should be added to org.fortiss.tooling.kernel.extension.data.PrototypeCategory
- Sorting in org.fortiss.tooling.kernel.internal.PrototypeService.getAllTopLevelPrototypesCategories() should be updated based on the prios
- the new prio of reuse libraries should be set to below default in org.fortiss.tooling.ext.reuse.ui.prototypes.PrototypeProvider.registerPrototypes()
Test procedure:
- Before/Without the commit solving this issue:
- Create a new AF3 Project with a Component inside a Component Architecture
- Add this Component to a Reuse Library by creating during this process a new Reuse Library called "A-Library"
- Save and click inside the editor so that it gets refreshed
- Observe: The "Model Elements" view shows now the library, but before, e.g. "Behavioral Specifications" (due to the lexicographical order)
- After/With the new commit/merge request:
- Do the same as above
- Observe: "A-Library" should now be visible behind the standard prototype categories like "Behavioral Specifications" (since the developers were now able to assign a (lower) priority to it)