I am adding a node (nodeA) via the toolbox. I want to have a second node (nodeB) added to the diagram. nodeB is a reference of nodeB, so a edge needs to be drawn between the two nodes.
I extended nodeACreateCommand's doExecuteWithResult method with the following code:
NodeA newElement = xxxFactory.eINSTANCE.createNodeA();
Container owner = (Container) getElementToEdit();
//Start of my added code
NodeB nodeB = xxxFactory.eINSTANCE.createNodeB();
//End of my added code
doConfigure(newElement, monitor, info);
NodeA and NodeB show up on the diagram but the edge between NodeA and NodeB does not show up. It shows up after closing and openening the diagram. What can I do to get the edge showing immediatly after adding the two nodes?