How to modify the context menu of a foreign parameter

I also read this code last night looking at this thread and seems the paramhandle weak pointer is pretty important, but I didn’t dig beyond that