Skip to main content



      Home
Home » Eclipse Projects » Sirius » Container Drop
Container Drop [message #1776159] Mon, 13 November 2017 05:14 Go to next message
Eclipse UserFriend
In the Section Tools, I have created a tool to create Container. Now, I have created another tool "Container Drop" and the operation in begin is "Create View". (see image).

So the scenario is: I have created this container in one diagram A and dragged-dropped from model to other instances of diagram A.

My question is:
1. When deleting this container from one diagram I want to first check if this container is represented in other diagrams or not. If so, confirm before deleting. How will I get this information in the "Delete Element" tool that the element is represented in another diagrams as well.

2. Since, the dragged and dropped container is having only view (create view) in other diagram and when I do the container.eContainer().eAllContents() it does not show the container that is dropped here. How can I see the containers that are created else where but also represented in the current diagram.

Any pointers are appreciated.

(I hope I am able to explain the problem :) )

-Yash

index.php/fa/31270/0/
Re: Container Drop [message #1776170 is a reply to message #1776159] Mon, 13 November 2017 06:23 Go to previous message
Eclipse UserFriend
Hello,

1. You can find all diagram element referencing a semantic element using the session cross referencer like this:
ECrossReferenceAdapter xref = session.getSemanticCrossReferencer();
for (EStructuralFeature.Setting setting : xref.getInverseReferences(semanticElement)) {
...
If you find DiagramElements that are not in the current diagram, then you can trigger the confirmation dialog before deleting.

2. I do not understand your question. You can't have only view in other diagram, graphical elements are based on semantic elements. I assume that your are working on unsychronized diagram if you need drag and drop tools creating views. Then you start from a blank diagram and use your tool to only display the semantic elements you want on your diagram. Right? Then if you want to access other representation of a semantic element you should use the semantic cross referencer as in answer 1.

Regards,
Steve
Previous Topic:SiriusCon 2017
Next Topic:Sirius Tutorials
Goto Forum:
  


Current Time: Wed Jul 23 21:10:57 EDT 2025

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

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

Back to the top