Activator.logError(e);
}
}
protected void createDIShape(Shape gShape, BaseElement elem, BPMNShape shape) {
ILocation loc = Graphiti.getLayoutService().getLocationRelativeToDiagram(gShape);
if (shape == null) {
EList<EObject> businessObjects = Graphiti.getLinkService().getLinkForPictogramElement(getDiagram())
.getBusinessObjects();
for (EObject eObject : businessObjects) {
if (eObject instanceof BPMNDiagram) {
BPMNDiagram bpmnDiagram = (BPMNDiagram) eObject;
shape = BpmnDiFactory.eINSTANCE.createBPMNShape();
// shape.setId(EcoreUtil.generateUUID());
shape.setBpmnElement(elem);
Bounds bounds = DcFactory.eINSTANCE.createBounds();
if (elem instanceof Activity) {
bounds.setHeight(gShape.getGraphicsAlgorithm().getHeight());
} else {
bounds.setHeight(gShape.getGraphicsAlgorithm().getHeight());
}
bounds.setWidth(gShape.getGraphicsAlgorithm().getWidth());
bounds.setX(loc.getX());
bounds.setY(loc.getY());
shape.setBounds(bounds);
addShape(shape, bpmnDiagram);
ModelUtil.setID(shape);
}