Delete Shapes inside Containershape [message #1786648] |
Tue, 08 May 2018 18:05  |
Eclipse User |
|
|
|
Hey Guys,
I want to update the Graphical Representation of my model.
Therefore, i need to delete all contained shapes/texts/polylines.
When i try
public boolean update(IUpdateContext context) {
PictogramElement pictogramElement = context.getPictogramElement();
if (pictogramElement instanceof ContainerShape) {
ContainerShape cs = (ContainerShape) pictogramElement;
cs.getChildren().clear();
I can't save the diagram any more. So how is it possible to remove shapes without errors?
It throws this exception:
org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The object 'org.eclipse.graphiti.mm.pictograms.impl.PictogramLinkImpl@2bb60439' is not contained in a resource.
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.endSave(XMLSaveImpl.java:301)
I want to clear the containershape to fill it with new Texts. Is this possible?
Thanks in advance
Markus
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.27048 seconds