Bug 135586 [Markers] ClassCastException invoking help from ProblemsView
M6 If you have help open and then hit F1 in the problems view you get the following exception !ENTRY org.eclipse.ui.workbench 4 2 2006-04-07 11:42:25.500 !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.ui.workbench". !STACK 0 java.lang.ClassCastException at org.eclipse.ui.views.markers.internal.MarkerView$ContextProvider.getContext(MarkerView.java:404) at org.eclipse.help.ui.internal.views.ContextHelpPart.handleActivation(ContextHelpPart.java:247) at org.eclipse.help.ui.internal.views.ContextHelpPart.setFormInput(ContextHelpPart.java:522) at org.eclipse.ui.forms.ManagedForm.setInput(ManagedForm.java:236) at org.eclipse.help.ui.internal.views.RelatedTopicsPart.setFormInput(RelatedTopicsPart.java:165) at org.eclipse.ui.forms.ManagedForm.setInput(ManagedForm.java:236) at org.eclipse.help.ui.internal.views.ReusableHelpPart.update(ReusableHelpPart.java:1060) at org.eclipse.help.ui.internal.views.HelpView.handlePartActivation(HelpView.java:129) at org.eclipse.help.ui.internal.views.HelpView.partActivated(HelpView.java:216) at org.eclipse.ui.internal.PartListenerList2$1.run(PartListenerList2.java:68) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.runtime.Platform.run(Platform.java:816) at org.eclipse.ui.internal.PartListenerList2.fireEvent(PartListenerList2.java:53) at org.eclipse.ui.internal.PartListenerList2.firePartActivated(PartListenerList2.java:66) at org.eclipse.ui.internal.PartService.firePartActivated(PartService.java:77) at org.eclipse.ui.internal.PartService.setActivePart(PartService.java:171) at org.eclipse.ui.internal.WWinPartService.updateActivePart(WWinPartService.java:124) at org.eclipse.ui.internal.WWinPartService.access$0(WWinPartService.java:115) at org.eclipse.ui.internal.WWinPartService$1.partDeactivated(WWinPartService.java:48) at org.eclipse.ui.internal.PartListenerList2$4.run(PartListenerList2.java:113) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.runtime.Platform.run(Platform.java:816) at org.eclipse.ui.internal.PartListenerList2.fireEvent(PartListenerList2.java:53) at org.eclipse.ui.internal.PartListenerList2.firePartDeactivated(PartListenerList2.java:111) at org.eclipse.ui.internal.PartService.firePartDeactivated(PartService.java:116) at org.eclipse.ui.internal.PartService.setActivePart(PartService.java:165) at org.eclipse.ui.internal.WorkbenchPagePartList.fireActivePartChanged(WorkbenchPagePartList.java:56) at org.eclipse.ui.internal.PartList.setActivePart(PartList.java:126) at org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:3139) at org.eclipse.ui.internal.WorkbenchPage.requestActivation(WorkbenchPage.java:2692) at org.eclipse.ui.internal.PartPane.requestActivation(PartPane.java:256) at org.eclipse.ui.internal.PartPane.handleEvent(PartPane.java:220) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:925) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:949) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:930) at org.eclipse.swt.widgets.Shell.setActiveControl(Shell.java:1199) at org.eclipse.swt.widgets.Shell.WM_MOUSEACTIVATE(Shell.java:1878) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3287) at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1539) at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4023) at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1915) at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:77) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4023) at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1915) at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:77) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4023) at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1915) at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:77) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4023) at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1915) at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:77) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4023) at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1915) at org.eclipse.swt.widgets.Tree.callWindowProc(Tree.java:1163) at org.eclipse.swt.widgets.Tree.windowProc(Tree.java:4589) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4023) at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method) at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:1839) at org.eclipse.swt.widgets.Tree.callWindowProc(Tree.java:1252) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334) at org.eclipse.swt.widgets.Tree.windowProc(Tree.java:4591) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4023) at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:2384) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2961) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:169) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336) at org.eclipse.core.launcher.Main.basicRun(Main.java:280) at org.eclipse.core.launcher.Main.run(Main.java:977) at org.eclipse.core.launcher.Main.main(Main.java:952)
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerView.java
import org.eclipse.core.resources.mapping.ResourceMapping;
import org.eclipse.core.resources.mapping.ResourceMappingContext;
import org.eclipse.core.resources.mapping.ResourceTraversal;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.IJobChangeListener;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.help.HelpSystem;
import org.eclipse.help.IContext;
import org.eclipse.help.IContextProvider;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.Separator;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.viewers.AbstractTreeViewer;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.OpenEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.window.Window;