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
sortInt = new Integer(sortStr).intValue();
            } else {
                sortInt = settings.getInt(STORE_SORT_TYPE);
            }
            if (sortInt == ResourceSorter.NAME
                    || sortInt == ResourceSorter.TYPE)
                sortType = sortInt;
        } catch (NumberFormatException e) {
        }
        setSorter(new ResourceSorter(sortType));
    }
    /**
     * Restores the working set filter from the persistence store.
     */
    void initWorkingSetFilter() {
        String workingSetName = settings.get(STORE_WORKING_SET);
        IWorkingSet workingSet = null;
        
        if (workingSetName != null && workingSetName.equals("") == false) { 
			IWorkingSetManager workingSetManager = getPlugin().getWorkbench()
					.getWorkingSetManager();
			workingSet = workingSetManager.getWorkingSet(workingSetName);
		} else if (PlatformUI
				.getPreferenceStore()
				.getBoolean(
						IWorkbenchPreferenceConstants.USE_WINDOW_WORKING_SET_BY_DEFAULT)) {
			
			workingSet = getSite().getPage().getAggregateWorkingSet();
		}
		if (workingSet != null) {