Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » MultiPageEditorPart and ActionBarContributor
MultiPageEditorPart and ActionBarContributor [message #459946] Sat, 20 August 2005 00:09 Go to next message
SS is currently offline SSFriend
Messages: 3
Registered: July 2009
Junior Member
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 20:26 Go to previous message
Carolyn Duby is currently offline Carolyn DubyFriend
Messages: 30
Registered: July 2009
Member
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
Previous Topic:building SWT
Next Topic:SWT_AWT trigger popup menu with contributions
Goto Forum:
  


Current Time: Fri Apr 26 15:59:27 GMT 2024

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

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

Back to the top