Source:
<code>public Command getAssociationClassElementCommand(CreateConnectionViewAndElementRequest createConnectionViewAndElementRequest, Command command) { if (false == createConnectionViewAndElementRequest.getSourceEditPart() instanceof GraphicalEditPart) { return UnexecutableCommand.INSTANCE; } GraphicalEditPart sourceEditPart = (GraphicalEditPart) createConnectionViewAndElementRequest.getSourceEditPart(); Point p = sourceEditPart.getFigure().getBounds().getTopRight().getCopy(); sourceEditPart.getFigure().translateToAbsolute(p); int edgeCount = sourceEditPart.getNotationView().getSourceEdges().size(); int offset = (edgeCount * 50) - 100; p = p.translate(100, offset); GraphicalEditPart parent = (GraphicalEditPart) sourceEditPart.getParent(); AssociationClassViewCreateCommand assCommand = new AssociationClassViewCreateCommand(createConnectionViewAndElementRequest, getEditingDomain(), (View) parent.getModel(), sourceEditPart.getViewer(), sourceEditPart.getDiagramPreferencesHint(), p); command = command.chain(new ICommandProxy(assCommand)); IAdaptable associationClassLinkViewAdapter = (IAdaptable) (createConnectionViewAndElementRequest.getNewObject()); <START> String semanticHint = "4016"; <END> ConnectionViewDescriptor viewDescriptor = new ConnectionViewDescriptor(UMLElementTypes.Link_4016, semanticHint, sourceEditPart.getDiagramPreferencesHint()); ICommand dashedLineCmd = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), semanticHint, associationClassLinkViewAdapter, null, sourceEditPart.getViewer(), sourceEditPart.getDiagramPreferencesHint(), viewDescriptor, assCommand); command = command.chain(new ICommandProxy(dashedLineCmd)); return command; }</code><technical_language>AssociationClassDashedLinkEditPart#VISUAL_ID (More explicit & robust)</technical_language>

Target:
public Command getAssociationClassElementCommand(CreateConnectionViewAndElementRequest createConnectionViewAndElementRequest, Command command) { if (false == createConnectionViewAndElementRequest.getSourceEditPart() instanceof GraphicalEditPart) { return UnexecutableCommand.INSTANCE; } GraphicalEditPart sourceEditPart = (GraphicalEditPart) createConnectionViewAndElementRequest.getSourceEditPart(); Point p = sourceEditPart.getFigure().getBounds().getTopRight().getCopy(); sourceEditPart.getFigure().translateToAbsolute(p); int edgeCount = sourceEditPart.getNotationView().getSourceEdges().size(); int offset = (edgeCount * 50) - 100; p = p.translate(100, offset); GraphicalEditPart parent = (GraphicalEditPart) sourceEditPart.getParent(); AssociationClassViewCreateCommand assCommand = new AssociationClassViewCreateCommand(createConnectionViewAndElementRequest, getEditingDomain(), (View) parent.getModel(), sourceEditPart.getViewer(), sourceEditPart.getDiagramPreferencesHint(), p); command = command.chain(new ICommandProxy(assCommand)); IAdaptable associationClassLinkViewAdapter = (IAdaptable) (createConnectionViewAndElementRequest.getNewObject()); String semanticHint = ((IHintedType) UMLElementTypes.Link_4016).getSemanticHint(); ConnectionViewDescriptor viewDescriptor = new ConnectionViewDescriptor(UMLElementTypes.Link_4016, semanticHint, sourceEditPart.getDiagramPreferencesHint()); ICommand dashedLineCmd = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), semanticHint, associationClassLinkViewAdapter, null, sourceEditPart.getViewer(), sourceEditPart.getDiagramPreferencesHint(), viewDescriptor, assCommand); command = command.chain(new ICommandProxy(dashedLineCmd)); return command; }