Community
Participate
Working Groups
I would like to be able to add filters to existing diagram specifications in a viewpoint extension model. This was previously discussed in the forums: https://www.eclipse.org/forums/index.php/t/1074429/
The documentation says that this is possible, so maybe update this to not have people waste their time trying: "A Diagram Extension can specify the Metamodels of the semantic elements it represents if it supports types of elements which were not represented in the extended diagram. Inside a Diagram Extension, you can define validation rules, filters and additional layers." https://www.eclipse.org/sirius/doc/specifier/diagrams/Diagrams.html#extensibility
There is already a bug filled for the documentation problem: https://bugs.eclipse.org/bugs/show_bug.cgi?id=487304# The interesting part of the exchange in the forum is : "CompositeFilter (which produces filters in the tabbar) are children of the DiagramDescription. DiagramExtensionDescription can be used to provide additional layers (with mappings and tools) to existing diagrams but not to provide additional filters. Currently, there is no way to contribute CompositeFilter to an existing diagram unless you modify its DiagramDescription in the initial VSM. This could be an interesting idea to complete the filters support by filter provided by activated layers (which can be contributed by diagram extension) or by diagram extension."
Would this be as easy as adding a contaimnent 'filters' to DiagramExtensionDescription and hack the corresponding lookup during refresh to also search for filters in registered extensions?