Link Creation using Popup Menu

I’m currently trying to implement a functionality where when creating a link from one port and on releasing the mouse it should show a popup with the possible elements to which it can be connected. On selection of an element from popup, a link should be created between these two ports. Refer the below youtube video which gives an idea what i’m trying to achieve. Forward video to 1:56

The problem is as soon as the mouse is released without connecting it to a port, it calls the DoNoNewLink in GoToolLinkingNew which discards the link. I’m not sure how to override this to achieve the functionality.

I’m currently handling the MouseDown event of View to check if a Port is selected and then MouseUp event of view to show a Popup where the mouse is released. But the link is discarded as soon as the popup is shown.

Do you have a sample to show how this can be achieved ?
Thanks in advance !

I have an unfinished UML sample here that may be of some help.

When a node is selected, it shows active hotspots that you can click on and drag to create new connected nodes. I’ll email you a .zip.

for example:

So do a similar thing where the node is created at the end of the drag, and create a “proto node” that sits there while you do the user interaction to pick the node type, then swap the proto out with the user chosen one.