|
Re: How to show subset of the Sirius-based model diagram [message #1806672 is a reply to message #1806671] |
Mon, 13 May 2019 15:32 |
|
Hello,
Indeed, in this case, you will need a diagram where the domain class is a person. This will need new node mappings to display the parents and children as nodes. However, you should be able to reuse the same edge mappings as the "main" diagram description for the parents and children references as well as the tools.
Once the new sub diagram description is available in your VSM (odesign file), you will automatically be able to create the sub diagram from the main diagram when you select an element of the type of the sub diagram domain class. To make it simpler with your example, when you select Elias and right click, you will have a menu "New" to create the sub diagram and an "Open" diagram if one already exists. You are not required to add a tool, but if you want you can add a Double click tool with a navigation task to open the sub diagram with a double click on Elias.
Regards,
Steve
Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
Re: How to show subset of the Sirius-based model diagram [message #1806708 is a reply to message #1806688] |
Tue, 14 May 2019 09:16 |
|
Hello Akira,
Indeed, you can also take the variable filter approach. This means that in the semantic condition expression, you will need to call a Java service that will first find the selected element on the diagram and then compute a list of element that needs to be filtered (for the example that is elements that are not parent or children).
Concerning the "object-centered diagram" approach and the layout difference, you can fix it by using the copy/paste layout contextual action (or programatically) from the original diagram to the sub-diagram.
Best regards,
Steve
Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
Re: How to show subset of the Sirius-based model diagram [message #1807011 is a reply to message #1806958] |
Tue, 21 May 2019 09:20 |
|
Hello,
1) You should have automatically the New and Open contextual menu to open a sub-diagram so I imagine that you ask the question in the context of a tool you are adding. Depending on what you are doing it should be accessible by aql:self or var:element. If this is not the case, I will need more information.
2) It's not really the usual approach of variable filter (I mean triggering a filter and using the current selection) so I can't find a sample from the top of my head, sorry. You can define new variables on your tool but I do not think you will be able to have the selected element easily (or at all). The simplest way is probably to directly access the active editor (PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor()), access the current selection in the editor and get the semantic element.
Regards,
Steve
Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
Powered by
FUDForum. Page generated in 0.04724 seconds