I see a similar question asked in the following link :
There is no public API to add a context menu in Display Manager UI components. However, FDO API and Map 3D Geospatial Platform API has many good features to do variety of things. You could call your custom function from Ribbon or command line instead of context menu of FDO layer group.
Access a broad range of knowledge to help get the most out of your products and services.