|
Re: Copying/Moving items [message #1818841 is a reply to message #1818828] |
Mon, 30 December 2019 10:08 |
|
Hello,
Indeed, as the diagrams are located in the aird file and referencing ComponentA as their semantic root, when you moved all the element, the diagrams now become empty. In the same way, if you already had created a diagram on ComponentB, all the elements would have appeared (assuming that your diagram is as default a synchronized diagram). This is the expected behavior.
Now if you do this operation a lot and want to move the diagram as well, then you can add to the session event broker (org.eclipse.sirius.business.api.session.Session.getEventBroker()) a new ModelChangeTrigger (addLocalTrigger) with a notification filter scope set to listen to Move notification on your semantic elements. The action of this trigger would be to create a new representation on the target new container.
Best regards,
Steve
Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
Re: Copying/Moving items [message #1818873 is a reply to message #1818867] |
Tue, 31 December 2019 09:21 |
|
Hello,
Not in your case because you are moving the content of the (root) semantic element that your diagram targets, ComponentA. If you had moved ComponentA, then the diagram would have "followed" because it would still references ComponentA.
It is not a default behaviour when moving elements to check if there is a representation that has no elements to display anymore and create a new representation automatically. You can add this as I presented before, but this is not default. What should be done if you move only part of the elements under ComponentA? If there are elements under ComponentB? If there are other diagram there. I see why your idea to automatically create the diagram is interesting, but it is a custom requirement. Some user will not want to see diagram be created when the refactor the semantic model I think.
Best 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.04406 seconds