Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Menu contribution to a nested editor
Menu contribution to a nested editor [message #539301] Thu, 10 June 2010 09:46 Go to next message
Mauro Condarelli is currently offline Mauro CondarelliFriend
Messages: 428
Registered: September 2009
Senior Member
I have an editor (WorldEditor extends FormEditor) that, in one page
includes a custom TextEditor (SceneEditor extends

I added an entry to the context menu of this editor:
label="Add &amp;Actor"

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.

Re: Menu contribution to a nested editor [message #540222 is a reply to message #539301] Tue, 15 June 2010 12:29 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

In a MultiPageEditorPart, the Eclipse Workbench can only see the "main"
editor, not the inner editors.

You would have to do something like:
if (editor instanceof WorldEditor) {


Paul Webster .platform.doc.isv/guide/workbench.htm

Previous Topic:RCP plugins directory
Next Topic:How to trim down application size?
Goto Forum:

Current Time: Thu Jun 21 05:09:27 GMT 2018

Powered by FUDForum. Page generated in 0.01465 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top