Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 363530 - [EditorMgmt] MultiEditor needs a IEditorLauncher to open with FileEditorInput
Summary: [EditorMgmt] MultiEditor needs a IEditorLauncher to open with FileEditorInput
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: PC Windows 7
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-10 15:02 EST by Sebastian Goschin CLA
Modified: 2019-11-14 03:27 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Goschin CLA 2011-11-10 15:02:43 EST
Build Identifier: 20110301-1815

If a MultiEditor is started using a extension point of org.eclipse.ui.editors using a concrete MultiEditor class and a file as input leads to a ClassCastException because the MultiEditor expects a MultiEditorInput. More precisely, the EditorReference calls the method openMultiEditor(...) of the EditorManager and there is never any method triggered of the MultiEditor where it is possible to change the input.

This problem can be bypassed if you are using an IEditorLauncher where you can change the the FileEditorInput to MultiEditorInput.

An easier way would be if the EditorReference would check the IEditorInput and if the part is a MultiEditor but the editorInput not a MultiEditorInput that it would call a method editorInput=((MultiEditor)part).convertInput(editorInput) and to extend the MultiEditor by abstract public IEditorInput convertInput(IEditorInput input) which returns a MultiEditorInput.

Reproducible: Always
Comment 1 Paul Webster CLA 2011-11-11 07:49:04 EST
The javadoc needs to be updated on MultiEditor that a MultiEditorInput needs to be supplied (it has always worked this way and I thought that it was documented, but I can't see it in the doc)

PW
Comment 2 Lars Vogel CLA 2019-11-14 03:27:58 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

If the bug is still relevant, please remove the "stalebug" whiteboard tag.