Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » actionSetPartAssociations with a multipage editor
actionSetPartAssociations with a multipage editor [message #507937] Fri, 15 January 2010 09:03 Go to next message
Eclipse UserFriend
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 #508345 is a reply to message #507937] Mon, 18 January 2010 13:52 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

The framework can't see the inner editor, so the best you can do is
associate with the MPEP. If the actionSet decides it is disabled
because it wants to work with the inner editor type and not a MPEP,
there's nothing you can do about that except re-write the actionSet or
provide an MPEP compatible version.

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: actionSetPartAssociations with a multipage editor [message #508590 is a reply to message #508345] Tue, 19 January 2010 14:49 Go to previous message
Eclipse UserFriend
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
Previous Topic:close perspective on switch
Next Topic:New Project / New File Comtext Menu shortcut
Goto Forum:
  


Current Time: Fri Mar 29 12:26:26 GMT 2024

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

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

Back to the top