Skip to main content



      Home
Home » Eclipse Projects » Sirius » Delete root element of diagram does not delete the diagram from aird file
Delete root element of diagram does not delete the diagram from aird file [message #1834554] Thu, 12 November 2020 05:41 Go to next message
Eclipse UserFriend
Hello

I hope you are all going well.

Using Sirius, we encounter a behavior we don't understand when deleting the root element of a DRepresentation. We expect Sirius to automatically remove the DRepresentation from the aird file but it appears it is not the case.

The DRepresentation is shown as non usable in the Aird editor. Maybe the user has to manually delete it?

We embed Sirius in a RCP application and we don't use the Aird editor. We can add a ModelChangeTrigger to automatically remove the representation when the root element is deleted. Is it a good idea?

Thanks and have a nice day,
Yann

Attachment: a gif file showing root element deletion behavior on Ecore Designer.
Re: Delete root element of diagram does not delete the diagram from aird file [message #1834610 is a reply to message #1834554] Fri, 13 November 2020 08:55 Go to previous messageGo to next message
Eclipse UserFriend
Hi Yann,

We are doing well, thanks! Hope you're doing well too.

Indeed, in Sirius we do not remove the DRepresentation when deleting the root element. In Capella for instance, a specific implementation analysis the impact of a deletion and will remove the representation if needed.
Yes, the ModelCHangeTrigger (a precommit listener) seems a good idea to perform this task in the same transaction.
Don't forget to remove both DRepresentation and DRepresentationDescriptor.

Best regards,
Florian
Re: Delete root element of diagram does not delete the diagram from aird file [message #1834696 is a reply to message #1834610] Mon, 16 November 2020 05:40 Go to previous message
Eclipse UserFriend
Hi Florian

Everything is fine here too!

Thanks for the reply and the warning about DRepresentationDescriptor. I plan to use DialectManager.deleteRepresentation. It seems to match my need!

Have a nice day,
Yann
Previous Topic:Accessing attributes to set up pre/post-conditions
Next Topic:Nullable cells in table editor
Goto Forum:
  


Current Time: Tue Jun 17 17:21:46 EDT 2025

Powered by FUDForum. Page generated in 0.05185 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top