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/OpenDeclarationAction.java
}
        
        if (method != null) {
            return true;
        }
        return false;
    }
    public ISelection getSelection() {
        ISelection selection= getSelectionProvider().getSelection();
        
        if (selection instanceof IStructuredSelection) {
            IStructuredSelection structuredSelection= (IStructuredSelection) selection;
            List javaElements= new ArrayList();
            for (Iterator iter= structuredSelection.iterator(); iter.hasNext();) {
                Object element= iter.next();
                if (element instanceof MethodWrapper) {
                    javaElements.add(((MethodWrapper)element).getMember());
                }
            }
            return new StructuredSelection(javaElements);
        }
        return selection; 
    }
    public Object getElementToOpen(Object object) throws JavaModelException {
        if (object instanceof MethodWrapper) {
            return ((MethodWrapper) object).getMember();
        }
        return object;
    }   
}