modeler.startUndo("Auto-connect sockets");
connection.connectStart(sourceSocketFigure.connectorAt(0, 0));
connection.connectEnd(targetSocketFigure.connectorAt(0, 0));
modeler.getDrawing().add(connection);
connection.layoutAndAdjustConnection();
modeler.endUndo();
autoAdjustPlaceholderName();