Menu contribution to a nested editor [message #539301] |
Thu, 10 June 2010 05:46  |
Eclipse User |
|
|
|
Hi,
I have an editor (WorldEditor extends FormEditor) that, in one page
includes a custom TextEditor (SceneEditor extends
AbstractDecoratedTextEditor).
I added an entry to the context menu of this editor:
<menuContribution
locationURI="popup:#EditorContext?after=additions">
<command
commandId="it.condarelli.writer.commands.AddActor"
label="Add &Actor"
style="push">
</command>
</menuContribution>
Now, in the handler of this command (AddActor extends AbstractHandler) I
need to get access to the Document being edited.
Is there a way to do it? all fields and variables in the event
(ExecutionEvent event) point to the main editor (WorldEditor) and not to
the nested one (SceneEditor). Following the links down to the needed
Document *is* possible, but extremely cumbersome.
I fear I'm missing something obvious.
What am I doing wrong?
If it matters:
WorldEditor is EMF based and edits a custom XML Resource.
This model (World) has, deep inside, a string (content).
This string is used as EditorInput (SceneEditorInput implements
IEditorInput) for the SceneEditor.
TiA
Mauro
|
|
|
|
Powered by
FUDForum. Page generated in 0.03046 seconds