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/SelectionProviderAdapter.java
fListener=
            new ISelectionChangedListener() {
                public void selectionChanged(SelectionChangedEvent event) {
                    listener.selectionChanged(new SelectionChangedEvent(fProvider, convertSelection(event.getSelection())));
                }
            };
        fProvider.addSelectionChangedListener(fListener);
    }
    public ISelection getSelection() {
        return convertSelection(fProvider.getSelection());
    }
    public void removeSelectionChangedListener(ISelectionChangedListener listener) {
        fProvider.removeSelectionChangedListener(fListener);
    }
    public void setSelection(ISelection selection) {
    }
    
    private ISelection convertSelection(ISelection selection) {
        Object element= SelectionUtil.getSingleElement(selection);
        if (element instanceof MethodWrapper) {
            MethodWrapper methodWrapper= (MethodWrapper) element;
            if (methodWrapper != null) {
                    IJavaElement je= methodWrapper.getMember();
                    if (je != null)
                        return new StructuredSelection(je);
            }
        }
        return StructuredSelection.EMPTY;       
    }
}