Bug 46351 Call Hierarchy must not implement IViewSite [call hierarchy]
I20031105 The call hierarchy component implements IViewSite which is not allowed. There seems to be no reason for doing so: the CallHierarchyViewPart should directly set the selection provider to its site.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/OpenCallHierarchyAction.java
}
    }
    
    public void run(IJavaElement[] elements) {
        if (elements.length == 0) {
            getShell().getDisplay().beep();
            return;
        }
        CallHierarchyUI.open(elements, getSite().getWorkbenchWindow());
    }
    
    private static String getDialogTitle() {
        return CallHierarchyMessages.getString("OpenCallHierarchyAction.dialog.title"); 
    }
    
    private static IStatus compileCandidates(List result, IJavaElement elem) {
        IStatus ok= new Status(IStatus.OK, JavaPlugin.getPluginId(), 0, "", null);         
        switch (elem.getElementType()) {
            case IJavaElement.METHOD:
                result.add(elem);
                return ok;
        }
        return createStatus(CallHierarchyMessages.getString("OpenCallHierarchyAction.messages.no_valid_java_element")); 
    }
    
    private static IStatus createStatus(String message) {
        return new Status(IStatus.INFO, JavaPlugin.getPluginId(), IJavaStatusConstants.INTERNAL_ERROR, message, null);
    }           
}