|Multiple Different Editors for a Single Resource [message #512294]
||Thu, 04 February 2010 15:19
Registered: February 2010
When I want to open an editor from code I use the corresponding IDE.openEditor(...) method. If I have in my runtime a DiagramDocumentEditor opened on a certain IEditorInput and I want to open the same file in a DefaultTextEditor, calling
IDE.openEditor(new FileEditorInput(file), "org.eclipse.ui.DefaultTextEditor");
just activates the diagram editor that is already opened.
The developers guide on org.eclipse.ui.editors states "Only one editor can be open for any particular editor input in a workbench page. For example, if the user is editing readme.txt in the workbench, opening it again in the same perspective will activate the same editor. (You can open another editor on the same file from a different workbench window or perspective)"
But if I use "Open With -> Text Editor" in the package explorer or "Window -> New Editor" it is possible to open another editor in the same window (and in the same perspective).
Could anyone please point me to the actions associated with "Window->New Editor" or to "Open With -> Text Editor" in the package explorer? Or explain how they call IDE.openEditor(...) to open a second editor?
[Updated on: Thu, 04 February 2010 15:20]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.01541 seconds