Bug 519937 - Adding filters through viewpoint extensions
Summary: Adding filters through viewpoint extensions
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Diagram (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2017-07-20 06:29 EDT by Felix Dorner CLA
Modified: 2021-02-26 07:58 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Dorner CLA 2017-07-20 06:29:16 EDT
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/
Comment 1 Felix Dorner CLA 2017-07-20 06:32:25 EDT
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
Comment 2 Pierre Guilet CLA 2017-07-20 10:30:01 EDT
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."
Comment 3 Felix Dorner CLA 2021-02-26 07:58:19 EST
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?