Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Problem to instantiate objects of a specific type from another of the same type(objects appears on properties view but not on diagram)
Problem to instantiate objects of a specific type from another of the same type [message #1827523] Sun, 17 May 2020 09:35 Go to next message
Léo Cauvin is currently offline Léo CauvinFriend
Messages: 12
Registered: April 2020
Junior Member
Hi,
You can see my metamodel in attachments, the problem is to create a new object of type "Node" from the Node object already created from "Authentifier". As we can see in nodeProperties.png, objects are successfully created and connected to the first Node object, but nothing appears on the diagram. So I can't even change the name of each Node object, and I can't connect them to any other objects. Do someone know how can I make them appear on the diagram ? The three other screenshots show you how I did to create a node Node.
Regards

Léo

Re: Problem to instantiate objects of a specific type from another of the same type [message #1827544 is a reply to message #1827523] Mon, 18 May 2020 05:42 Go to previous messageGo to next message
Avi Shaked is currently offline Avi ShakedFriend
Messages: 131
Registered: October 2019
Senior Member
Since you say that the node is created successfully, I actually suspect the problem is in the node representation. Perhaps its candidates are not well specified. Can you share your definition for the node element in the diagram (not the create node, but the node itself)?
Re: Problem to instantiate objects of a specific type from another of the same type [message #1827560 is a reply to message #1827544] Mon, 18 May 2020 09:32 Go to previous messageGo to next message
Léo Cauvin is currently offline Léo CauvinFriend
Messages: 12
Registered: April 2020
Junior Member
Hi,
Here is the representation of my Node (very simple), nothing in other tabs, and nothing special except a feature:name as label in the Square light_orange properties. But I don't think this is the problem here because one objet Node is correctly created on the diagram (the one from Authentifier).
Could it come from the relation between an object Node and itself ?
Thanks for your answer.
Re: Problem to instantiate objects of a specific type from another of the same type [message #1827570 is a reply to message #1827560] Mon, 18 May 2020 13:58 Go to previous messageGo to next message
Avi Shaked is currently offline Avi ShakedFriend
Messages: 131
Registered: October 2019
Senior Member
I am not sure but I think the problem is with the relationship between the node and itself in the metamodel (which you marked in red). It should be a composition relationship and not a bidrectional relationship in order to have the new node under an existing node (if this is what you meant by create a new object of type "Node" from the Node object already created). Anyway, I think it is better to use the composition relationship instead of 1 parent to multiple children bi-directional relations.
Re: Problem to instantiate objects of a specific type from another of the same type [message #1827579 is a reply to message #1827570] Mon, 18 May 2020 16:35 Go to previous messageGo to next message
Léo Cauvin is currently offline Léo CauvinFriend
Messages: 12
Registered: April 2020
Junior Member
Yes you're right. That's what I meant, so I changed the relation by a composition and now it's working. It solved the problem.
Thank you again Avi !
Re: Problem to instantiate objects of a specific type from another of the same type [message #1827583 is a reply to message #1827579] Mon, 18 May 2020 17:07 Go to previous message
Avi Shaked is currently offline Avi ShakedFriend
Messages: 131
Registered: October 2019
Senior Member
Great. You're welcome.
Previous Topic:Using Sirius for simple flow chart
Next Topic:Rulers and Grids scaling on Windows
Goto Forum:
  


Current Time: Fri Apr 19 19:53:17 GMT 2024

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

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

Back to the top