Bug 121772 [Viewers] ClassCastException opening file from Navigator
I get a class cast exception when I open a file from the navigator. The problem is that there is a cast to StructuredSelection instead of IStructuredSelection in the ResourceNavigator class (and the object being cast is a TreeSelection). Here are the interesting lines of the trace. Caused by: java.lang.ClassCastException: org/eclipse/jface/viewers/TreeSelection incompatible with org/eclipse/jface/viewers/StructuredSelection at org.eclipse.ui.views.navigator.ResourceNavigator$8.run(ResourceNavigator.java:726)
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/ResourceNavigator.java
return ((IResource) o).getFullPath().makeRelative().toString();
            } else {
                return ResourceNavigatorMessages.ResourceNavigator_oneItemSelected;
            }
        }
        if (selection.size() > 1) {
            return NLS.bind(ResourceNavigatorMessages.ResourceNavigator_statusLine, String.valueOf(selection.size()));
        }
        return ""; 
    }
    /**
     * Returns the name for the given element.
     * Used as the name for the current frame. 
     */
    String getFrameName(Object element) {
        if (element instanceof IResource) 
            return ((IResource) element).getName();
        String text = ((ILabelProvider) getTreeViewer().getLabelProvider())
        .getText(element);
        if(text == null)
        	return "";
        return text;
    }
    /**
     * Returns the tool tip text for the given element.
     * Used as the tool tip text for the current frame, and for the view title tooltip.
     */
    String getFrameToolTipText(Object element) {
        if (element instanceof IResource) {
            IPath path = ((IResource) element).getFullPath();