Source:
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 = "4016"; 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; }

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; }