Community
Participate
Working Groups
With the current FacetManager implementation, it is possible to delegate the evaluation of a query to the static supertype. However, in most cases, we don't want to delegate to the static type: we want to delegate to the query that is next in the queue (This is computed dynamically). In general, Facets are independent from each other, so instead of: - DefaultFacet -- GenericFacet --- SpecificFacet1 ---- SpecificFacet2 We have: - DefaultFacet -- GenericFacet -- SpecificFacet1 -- SpecificFacet2 And each of these Facets only know about their static super-type (DefaultFacet in this case). If SpecificFacet2 is not able to compute a result for a query, it will only be able to delegate to DefaultFacet, because it knows nothing about SpecificFacet1 and GenericFacet. In EMF Facet 1.X, the delegation was dynamic, i.e. the facet manager computes a priority queue of facets for a given query, and if a facet cannot return a result, it delegates to the next one in the queue. We need something similar for Papyrus Facet. It may be useful to keep the current mechanism for "static" delegation, but we also need a dynamic one (In most cases, the Static one is not so useful, but there is no need for removing it) Dynamic priority queues can also allow more advanced customization, such as "decorating" a label returned by another query (e.g. adding a pre-/post-fix)
This is also related to Bug 485539, as the computation of the priority queue needs to be cached for performances reason (Both bugs require a refactoring of the FacetManager algorithm)