return intoDiagram || intoLane || intoParticipant || intoFlowELementContainer;
}
@Override
public PictogramElement add(IAddContext context) {
Gateway addedGateway = (Gateway) context.getNewObject();
IGaService gaService = Graphiti.getGaService();
IPeService peService = Graphiti.getPeService();
int d = 2 * GraphicsUtil.GATEWAY_RADIUS;
int p = GraphicsUtil.GATEWAY_TEXT_AREA;
ContainerShape containerShape = peService.createContainerShape(context.getTargetContainer(), true);
Rectangle rect = gaService.createInvisibleRectangle(containerShape);
gaService.setLocationAndSize(rect, context.getX(), context.getY(), d, d + p);
Shape gatewayShape = peService.createShape(containerShape, false);
Polygon gateway = GraphicsUtil.createGateway(gatewayShape);
StyleUtil.applyBGStyle(gateway, this);
gaService.setLocationAndSize(gateway, 0, 0, d, d);
decorateGateway(containerShape);
Shape textShape = peService.createShape(containerShape, false);
peService.setPropertyValue(textShape, UpdateBaseElementNameFeature.TEXT_ELEMENT, Boolean.toString(true));
Text text = gaService.createDefaultText(getDiagram(), textShape, addedGateway.getName());
text.setStyle(StyleUtil.getStyleForText(getDiagram()));
text.setHorizontalAlignment(Orientation.ALIGNMENT_CENTER);
text.setVerticalAlignment(Orientation.ALIGNMENT_TOP);
gaService.setLocationAndSize(text, 0, d, d, p);