actionSetPartAssociations with a multipage editor [message #507937] |
Fri, 15 January 2010 09:03 |
Eclipse User |
|
|
|
Originally posted by: pajai.extrabright.com
Hi all,
I am trying to define an action set association between some action set
and a multi-page editor, where one of its page is the editor for which
the action set should be visible.
Ex.
<extension point="org.eclipse.ui.actionSetPartAssociations">
<actionSetPartAssociation
targetID="org.foo.someActionSet">
<part id="org.foo.someMultipageEditor"/>
</actionSetPartAssociation>
</extension>
Here the editor with the id "org.foo.someMultipageEditor" inherits from
FormEditor and adds another text editor as a page using the following code:
@Override
protected void addPages() {
try {
StructuredTextEditor editor = new StructuredTextEditor();
editor.setEditorPart(this);
addPage(editor, getEditorInput());
} catch(PartInitException e) {}
}
Unfortunately my action set, although visible when an instance of
SomeMultiPageEditor is shown, remains disabled. I have tried to do the
association with the child editor as well, but this does not solve the
problem.
Anything else I should do to define correctly my association between the
action set and one editor of my multi-page editor?
Thanks in advance.
Cheers,
Patrick
|
|
|
|
Re: actionSetPartAssociations with a multipage editor [message #508590 is a reply to message #508345] |
Tue, 19 January 2010 14:49 |
Eclipse User |
|
|
|
Originally posted by: pajai.extrabright.com
Hi Paul,
Thank you for your answer.
Yes, I was afraid that there was no possibility to associate an
actionSet with an inner editor.
I think in my case the easiest will be to rewrite the action set to be
enabled when my MultiPageEditorPart is active, since I cannot modify the
existing action set (provided by the Eclipse platform).
Thanks again.
Cheers,
Patrick
|
|
|
Powered by
FUDForum. Page generated in 0.02822 seconds