It seems like you want something like βLinks β Workspace (Control + Shift + G)β rather than a call hierarchy?
Have you used this option before? It uses FindReferencesAction, take a look at this class, and you can see how it creates a search query based on the currently selected IJavaElement parameter.
Could you use this as the base for a search query on multiple IJavaElements? Or do you want your own specific look?
source share