final IGaService gaService = Graphiti.getGaService();
RoundedRectangle roundedRectangle; // need to access it later
{
// create invisible outer rectangle expanded by
// the width needed for the anchor
final Rectangle invisibleRectangle = gaService.createInvisibleRectangle(containerShape);
gaService.setLocationAndSize(invisibleRectangle, context.getX(), context.getY(), width, height);
// create and set visible rectangle inside invisible rectangle
roundedRectangle = gaService.createRoundedRectangle(invisibleRectangle, 5, 5);
roundedRectangle.setParentGraphicsAlgorithm(invisibleRectangle);