|
|
Re: MultiPage Editor : swapping Action ContributorClasses [message #671880 is a reply to message #671348] |
Thu, 19 May 2011 08:57 |
Maqsood Ahmed Messages: 41 Registered: September 2010 |
Member |
|
|
Thanks Paul,
But the problem now is hw will i show/hide actions when other editors are opened inside this MPE? The Common Contirbutor would still be there, contirbuting all actions..
I cant access the editor's site while it is being initialized also(is null),
hence unable to disable the actions that i dont need.
There is this problem because, each time the MPE editor that opens up will be having different editor (as a page in this MPE). Can u give some leads to solve this problem.
Mak
[Updated on: Thu, 19 May 2011 09:07] Report message to a moderator
|
|
|
(no subject) [message #671894 is a reply to message #671348] |
Thu, 19 May 2011 08:57 |
Eclipse User |
|
|
|
Originally posted by: <forums-noreply
Thanks Paul,
But the problem now is hw will i show/hide actions when other editors are opened inside this MPE? The Common Contirbutor would still be there, contirbuting all actions..
I cant access the editor's site while it is being initialized also(is null),
hence unable to disable the actions that i dont need.
Mak
|
|
|
Re: MultiPage Editor : swapping Action ContributorClasses [message #672002 is a reply to message #671880] |
Thu, 19 May 2011 14:41 |
|
Are you asking about actions contributed through each editors EditorActionBarContributors (possibly 2 per real editor)? Or are you asking about editors that add IActions to their IActionBars in their createPartControl(Composite) method?
In the first case, those contributions literally don't exist. There's no "I'll just point my MPEP at the original editor" API, because there are 2 many assumptions to host them correctly within an editor. If you want this case, the MPEP editor/EditorActionBarContributor has to re-implement everything it wants to swap in and out for each type of editor in its pages, and manage the whole thing itself.
In the second case, it looks like org.eclipse.ui.part.MultiPageEditorSite simply delegates to MPEP actionBars, which would mean the multiple editors in the MPEP would simple contribute all of their actions (they'd all be available while the MPEP was the active editor, regardless of what page it was on). In theory the MultiPageEditorSite is extendable, but I'm unless providing SubActionBars per site worked, I'm not sure what it would do.
PW
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
|
|
|
|
Powered by
FUDForum. Page generated in 0.04100 seconds