Project: Eclipse_Platform_UI
Bug 305585 [FastView] FastViewManager assumes all IViewReferences are ViewReferences
Reported: 2010-03-11 15:02:35 | Status: verified fixed

Build Identifier: I20080617-2000 In our product, we have views that are not shown in a perspective. We've created our own view reference class that implements IViewReference. When dynamically removing a view extension point for one of these views, the IPerspectiveListener2 perspectiveChanged event is triggered and our view part reference is passed in. While what we are doing may be unconventional, the FastViewManager has an IPerspectiveListener2 listener that assumes that any IViewReference is a ViewReference, resulting in a ClassCastException in our case. Can this be modified such that the check is more appropriate: Inside FastViewManager.handlePerspectiveChange(): if (changeId.equals(IWorkbenchPage.CHANGE_VIEW_HIDE)) { if (partRef instanceof ViewReference) { ViewReference ref = (ViewReference) partRef; instead of: if (changeId.equals(IWorkbenchPage.CHANGE_VIEW_HIDE)) { if (partRef instanceof IViewReference) { ViewReference ref = (ViewReference) partRef; Thanks for your attention on this. Reproducible: Always

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/FastViewManager.java