|
Re: Graphiti Inactive Shapes [message #1707100 is a reply to message #1707094] |
Wed, 02 September 2015 06:33  |
Eclipse User |
|
|
|
Hi Everyone,
I already found a work around.
// Create a temporary holder of ContainerShape children
List<Shape> tempCopy = new ArrayList<Shape>();
// Add active shape to the temporary holder
for (Shape shape : ((ContainerShape) pictogramElement).getChildren()) {
shape.setActive(true);
tempCopy.add(shape);
}
// Clear the original children
((ContainerShape) pictogramElement).getChildren().clear();
// Add the a new separate copy of the children to the shape
for (Shape shape : tempCopy) {
((ContainerShape) pictogramElement).getChildren().add(EcoreUtil.copy(shape));
}
In case there is a much pretty, easy, and accepted approach, please feel free to comment.
|
|
|
Powered by
FUDForum. Page generated in 0.05283 seconds