Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 22325

Summary: [Editor Mgmt] ClassCastException using GotoLineAction in MultiPageEditorPart
Product: [Eclipse Project] Platform Reporter: Peter Burka <peter_burka>
Component: UIAssignee: Eduardo Pereira <eduardo_pereira>
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: P1 CC: chrismlloyd, david_williams, joe.remes, kitlo
Version: 2.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Peter Burka CLA 2002-08-09 15:47:39 EDT
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
Comment 1 Eduardo Pereira CLA 2002-09-10 09:16:12 EDT
*** Bug 23352 has been marked as a duplicate of this bug. ***
Comment 2 Eduardo Pereira CLA 2002-09-10 14:08:28 EDT
Released fix in the HEAD stream.
Comment 3 Eduardo Pereira CLA 2002-09-16 09:39:57 EDT
*** Bug 22788 has been marked as a duplicate of this bug. ***
Comment 4 Eduardo Pereira CLA 2002-09-27 15:36:22 EDT
*** Bug 23994 has been marked as a duplicate of this bug. ***