Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » How to automatically delete edge class when deleting node class
How to automatically delete edge class when deleting node class [message #1838264] Fri, 19 February 2021 19:57 Go to next message
Thomas Chiang is currently offline Thomas ChiangFriend
Messages: 50
Registered: March 2020
Member
HI,

I have an example where I have 3 classes and 2 edges. Then I want to delete one of the classes. In the class diagram the edge disappears but in the tree editor the edge still exists, except now either its source or target is empty. How can I make it so that when I delete a node it deletes all the edge classes that are attached to it?

I essentially want to make it so that an edge class can exist iff and only if src.exists() and tgt.exists == true.

[Updated on: Fri, 19 February 2021 20:48]

Report message to a moderator

Re: How to automatically delete edge class when deleting node class [message #1838406 is a reply to message #1838264] Wed, 24 February 2021 11:36 Go to previous message
Laurent Fasani is currently offline Laurent FasaniFriend
Messages: 177
Registered: October 2014
Senior Member
Hello

What do you mean by "in the tree editor the edge still exists" ?
Do you mean a representation of type Tree?

From what I understand, it seems that you edge represents an element still existing as a semantic element. I guess you have a "Element Based Edge" in your odesign
If you want to delete this semantic element you have to do it in your delete tool. (https://www.eclipse.org/sirius/doc/specifier/diagrams/Diagrams.html#tools_reference)
For example you can have a change context operation that will call a java service to delete any elements you want (https://www.eclipse.org/sirius/doc/specifier/general/Model_Operations.html#goto and https://www.eclipse.org/sirius/doc/specifier/general/Writing_Queries.html#service_methods)

I hope this helps

Best regards


Laurent Fasani - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Xtext integration with Sirius
Next Topic:Unable to build Sirius Desktop
Goto Forum:
  


Current Time: Sat Apr 17 21:51:34 GMT 2021

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

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

Back to the top