Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 10:41 Go to next message
Yann Mortier is currently offline Yann MortierFriend
Messages: 16
Registered: July 2009
Location: Paris FR
Junior Member
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 13:55 Go to previous messageGo to next message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 262
Registered: August 2010
Senior Member
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 10:40 Go to previous message
Yann Mortier is currently offline Yann MortierFriend
Messages: 16
Registered: July 2009
Location: Paris FR
Junior Member
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: Thu Apr 22 03:40:59 GMT 2021

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

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

Back to the top