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
getTreeViewer().getTree().setFocus();
    }
    /**
     * Note: For experimental use only.
     * Sets the decorator for the navigator.
     * <p>
     * As of 2.0, this method no longer has any effect.
     * </p>
     *
     * @param decorator a label decorator or <code>null</code> for no decorations.
     * @deprecated use the decorators extension point instead; see IWorkbench.getDecoratorManager()
     */
    public void setLabelDecorator(ILabelDecorator decorator) {
        
    }
    /**
     * @see IResourceNavigator#setLinkingEnabled(boolean)
     * @since 2.1
     */
    public void setLinkingEnabled(boolean enabled) {
        this.linkingEnabled = enabled;
        		
        settings.put(IWorkbenchPreferenceConstants.LINK_NAVIGATOR_TO_EDITOR,
                enabled);
        
        if (enabled) {
            IEditorPart editor = getSite().getPage().getActiveEditor();
            if (editor != null) {
                editorActivated(editor);
            }