Add a priority concept to components

You don’t mention what your proposal means for ComponentDescriptor, but that’s what everything is based on.

For me, this does not really make sense.

There should be two completely different values since it’s two completely different use cases and needs and I can easily think of use cases where you need to override a specific component and at the same time order it among others components which share the same role and there is very little chance that you can use the same value for both (just think of a use case where you override a component to change its order).

If you really want to talk about both subjects in the same proposal, I would suggest the following changes:

  • ComponentDescriptor should have two different getters for those concepts (“override priority” and “role priority”)
  • As you proposed, having the “role priority” as a field of the @Component annotation sounds good
  • Keeping components.txt as the way to configure the “override priority” for Java components is probably enough, I’m fine having the possibility to also configure it at @Component level as long as it’s a different field
  • For wiki based components, all it takes is adding two properties for those concepts in whatever xclass which is used to define them