MultiPageEditorPart and ActionBarContributor [message #459946] |
Fri, 19 August 2005 20:09  |
Eclipse User |
|
|
|
I have multipage editor with 4 parts which has contributor class defined
in plugin.xml. This contributor class extends from
org.eclipse.emf.edit.ui.action.EditingDomainActionBarContrib utor which
internally extend from MultiPageEditorActionBarContributor. I need this
EMF editingDomainActionBarContributor for 3 of the parts of my editor but
for first part, I still need MultiPageEditorActionBarcontributor. I need
normal CTRL+C, CTRL+V actions to work on my text controls on my first
part, while I need EMF actions (CTRL+C, CTRL+V) actual copy, paste of
elements in 3 of the parts. What's the best way to break this ? Is there
any way to specify contributor based on the part rather than having one in
plugin.xml ?
Thanks in advance.
--
SS
|
|
|
Re: MultiPageEditorPart and ActionBarContributor [message #459961 is a reply to message #459946] |
Sun, 21 August 2005 16:26  |
Eclipse User |
|
|
|
I had a similar problem in my application. I ended up defining a
new CutAction, CopyAction, and PasteAction classes that did either an
EMF action or a text action depending on what was selected. The tricky
part
was getting the menu selectabiliy correct. I added
a text selection adapter to the editor that listened for changes to
text components. Even with this, I could not get the selectability
perfect. Items were selectable sometimes when they shouldn't have been.
Each page of the editor must register its text components with the text
selection adapter in the editor. I would be interested to know if anyone
has a more elegant solution.
Thanks
Carolyn
SS wrote:
> I have multipage editor with 4 parts which has contributor class defined
> in plugin.xml. This contributor class extends from
> org.eclipse.emf.edit.ui.action.EditingDomainActionBarContrib utor which
> internally extend from MultiPageEditorActionBarContributor. I need this
> EMF editingDomainActionBarContributor for 3 of the parts of my editor but
> for first part, I still need MultiPageEditorActionBarcontributor. I need
> normal CTRL+C, CTRL+V actions to work on my text controls on my first
> part, while I need EMF actions (CTRL+C, CTRL+V) actual copy, paste of
> elements in 3 of the parts. What's the best way to break this ? Is there
> any way to specify contributor based on the part rather than having one in
> plugin.xml ?
> Thanks in advance.
> --
> SS
|
|
|
Powered by
FUDForum. Page generated in 0.03067 seconds