Menu-Entry for specific Java class instances only

I would like to have an entry in the right-click pop menu of the editor where the entry is only enabled when the mouse-click is within a Java class of a specific instance.

For example:
Only when right-clicking in a Java class which is an instance of type Comparable I want to have the menu entry enabled.

Can anybody help me on that? Any hint on this is appreciated very much!

Thanks, Etienne

Please sign in to leave a comment.