@Override
public PictogramElement add(IAddContext context) {
IGaService gaService = Graphiti.getGaService();
IPeService peService = Graphiti.getPeService();
Message msg = (Message) context.getNewObject();
int width = context.getWidth() > 0 ? context.getWidth() : 30;
int height = context.getHeight() > 0 ? context.getHeight() : 20;
int textArea = 15;
ContainerShape container = peService.createContainerShape(context.getTargetContainer(), true);
Rectangle invisibleRect = gaService.createInvisibleRectangle(container);
gaService.setLocationAndSize(invisibleRect, context.getX(), context.getY(), width, height + textArea);
Envelope envelope = GraphicsUtil.createEnvelope(invisibleRect, 0, 0, width, height);
envelope.rect.setFilled(true);
StyleUtil.applyBGStyle(envelope.rect, this);
envelope.line.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
Shape textShape = peService.createShape(container, false);
peService
.setPropertyValue(textShape, UpdateBaseElementNameFeature.TEXT_ELEMENT, Boolean.toString(true));
Text text = gaService.createDefaultText(getDiagram(), textShape, msg.getName());
text.setStyle(StyleUtil.getStyleForText(getDiagram()));
text.setHorizontalAlignment(Orientation.ALIGNMENT_CENTER);
text.setVerticalAlignment(Orientation.ALIGNMENT_TOP);
gaService.setLocationAndSize(text, 0, height, width, textArea);