Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 23994 - [Editor Mgmt] TextEditor + MultiPageEditor = ClassCastException
Summary: [Editor Mgmt] TextEditor + MultiPageEditor = ClassCastException
Status: RESOLVED DUPLICATE of bug 22325
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Eduardo Pereira CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-09-23 15:59 EDT by Joseph Remes CLA
Modified: 2002-09-27 15:36 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Remes CLA 2002-09-23 15:59:17 EDT
I have been able to get the platform's TextEditor to work (mostly) as a page 
in a MultiPageEditor. I copied code from 
org.eclipse.ui.texteditor.BasicTextEditorActionContributor into my contributor 
to implement the GOTO_LINE function. It works almost perfectly except...
Somewhere during the processing of this action 
org.eclipse.ui.internal.WorkbenchPage.getReference(IWorkbenchPart part) is 
called.
The first line in this method calls getSite() on the part. The returned object 
is then cast to PartSite. However it actually is an 
org.eclipse.ui.part.MultiPageEditorSite and a ClassCastException happens.
This seems to be a rather benign exception in my case as the gotoline function 
appears to complete.
Comment 1 Kai-Uwe Maetzel CLA 2002-09-27 13:20:07 EDT
Moving to Platform UI.
Comment 2 Eduardo Pereira CLA 2002-09-27 15:36:22 EDT

*** This bug has been marked as a duplicate of 22325 ***