Project: Eclipse_Platform_UI
Bug 22325 [Editor Mgmt] ClassCastException using GotoLineAction in MultiPageEditorPart
Reported: 2002-08-09 15:47:39 | Status: resolved fixed

If you attempt to use the GotoLineAction for a text editor nested inside of a MultiPageEditorPart, or some other nesting editor, the attached ClassCastException occurs. It looks like the GotoLineAction assumes that its editor is a first level child of the IWorkbenchPage, but in some cases this is not the case. (Note that GotoLineAction works in the PDE editor, but this is not a good example, since it doesn't use a MultiPageEditorPart, but rolls its own). Unhandled exception caught in event loop. Reason: com/ibm/etools/ctc/flow/ui/NestedEditorSite incompatible with org/eclipse/ui/internal/PartSite java.lang.ClassCastException: com/ibm/etools/ctc/flow/ui/NestedEditorSite incompatible with org/eclipse/ui/internal/PartSite Stack trace: java/lang/Throwable.<init>()V java/lang/Throwable.<init>(Ljava/lang/String;)V java/lang/ClassCastException.<init>(Ljava/lang/String;)V org/eclipse/ui/internal/WorkbenchPage.getReference (Lorg/eclipse/ui/IWorkbenchPart;)Lorg/eclipse/ui/IWorkbenchPartReference; org/eclipse/ui/internal/WorkbenchPage.certifyPart (Lorg/eclipse/ui/IWorkbenchPart;)Z org/eclipse/ui/internal/WorkbenchPage.activate (Lorg/eclipse/ui/IWorkbenchPart;)V org/eclipse/ui/texteditor/GotoLineAction.gotoLine(I)V org/eclipse/ui/texteditor/GotoLineAction.run()V org/eclipse/ui/texteditor/RetargetTextEditorAction.run()V org/eclipse/jface/action/Action.runWithEvent (Lorg/eclipse/swt/widgets/Event;)V org/eclipse/jface/action/ActionContributionItem.handleWidgetSelection (Lorg/eclipse/swt/widgets/Event;)V org/eclipse/jface/action/ActionContributionItem.handleWidgetEvent (Lorg/eclipse/swt/widgets/Event;)V org/eclipse/jface/action/ActionContributionItem.access$0 (Lorg/eclipse/jface/action/ActionContributionItem;Lorg/eclipse/swt/widgets/Even t;)V org/eclipse/jface/action/ActionContributionItem$ActionListener.handleEvent (Lorg/eclipse/swt/widgets/Event;)V org/eclipse/swt/widgets/EventTable.sendEvent (Lorg/eclipse/swt/widgets/Event;)V org/eclipse/swt/widgets/Widget.sendEvent(Lorg/eclipse/swt/widgets/Event;)V org/eclipse/swt/widgets/Display.runDeferredEvents()Z org/eclipse/swt/widgets/Display.readAndDispatch()Z org/eclipse/ui/internal/Workbench.runEventLoop()V org/eclipse/ui/internal/Workbench.run(Ljava/lang/Object;)Ljava/lang/Object; org/eclipse/core/internal/boot/InternalBootLoader.run (Ljava/lang/String;Ljava/net/URL;Ljava/lang/String; [Ljava/lang/String;Ljava/lang/Runnable;)Ljava/lang/Object; org/eclipse/core/boot/BootLoader.run (Ljava/lang/String;Ljava/net/URL;Ljava/lang/String;[Ljava/lang/String;) Ljava/lang/Object; EclipseRuntimeLauncher.main([Ljava/lang/String;)V

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