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
*/
    public static final String NAVIGATOR_VIEW_HELP_ID = INavigatorHelpContextIds.RESOURCE_VIEW;
    /**
     * True iff we've already scheduled an asynchronous call to linkToEditor
     */
    private boolean linkScheduled = false;
    
    
    private static final String TAG_SORTER = "sorter"; 
    private static final String TAG_FILTERS = "filters"; 
    private static final String TAG_FILTER = "filter"; 
    private static final String TAG_SELECTION = "selection"; 
    private static final String TAG_EXPANDED = "expanded"; 
    private static final String TAG_ELEMENT = "element"; 
    private static final String TAG_IS_ENABLED = "isEnabled"; 
    private static final String TAG_PATH = "path"; 
    private static final String TAG_CURRENT_FRAME = "currentFrame"; 
    private IPartListener partListener = new IPartListener() {
        public void partActivated(IWorkbenchPart part) {
            if (part instanceof IEditorPart)
                editorActivated((IEditorPart) part);
        }
        public void partBroughtToTop(IWorkbenchPart part) {
        }
        public void partClosed(IWorkbenchPart part) {
        }
        public void partDeactivated(IWorkbenchPart part) {
        }
        public void partOpened(IWorkbenchPart part) {
        }