Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Global Actions in Multipage Editor with a Diagram Editor
Global Actions in Multipage Editor with a Diagram Editor [message #215959] Wed, 21 January 2009 03:29 Go to next message
Eclipse UserFriend
Originally posted by: Erazerx.gmx.de

Hi all :)!

I have implemented a Multipage Editor with a tab that contains a
generated GMF Editor. I made it similar to this article:
http://www.eclipse.org/articles/article.php?file=Article-Int egrating-EMF-GMF-Editors/index.html
..

To get the global Actions to work, i did it just as mentioned in the
article, by letting my Editor Class implement the IDiagramWorkbenchPart
interface, redirect all the methods from it to the diagram editor and
making some extensions to the globalActionHandlerProviders extension point.

Well, it works excellent for all actions in the context menu and even
for cut, copy, paste with the keyboard shortcuts. But despite making a
extension for the global actions "delete" and "rename" the bound keys
for the actions doesn't work at all.

I have noticed, that the methods from the implemented
IDiagramWorkbenchPart don't even get called when the bound keys get pressed.

Well is there any known way to get the global actions like "delete" and
"rename" to work with their bound keys as expected?

Thx in advance, Arne
Re: Global Actions in Multipage Editor with a Diagram Editor [message #215998 is a reply to message #215959] Wed, 21 January 2009 04:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Erazerx.gmx.de

Oh i forgot to mention Edit -> Delete is also disabled, of course. But
Edit -> Cut, Copy, Paste are enabled.


Arne schrieb:
> Hi all :)!
>
> I have implemented a Multipage Editor with a tab that contains a
> generated GMF Editor. I made it similar to this article:
> http://www.eclipse.org/articles/article.php?file=Article-Int egrating-EMF-GMF-Editors/index.html
> .
>
> To get the global Actions to work, i did it just as mentioned in the
> article, by letting my Editor Class implement the IDiagramWorkbenchPart
> interface, redirect all the methods from it to the diagram editor and
> making some extensions to the globalActionHandlerProviders extension point.
>
> Well, it works excellent for all actions in the context menu and even
> for cut, copy, paste with the keyboard shortcuts. But despite making a
> extension for the global actions "delete" and "rename" the bound keys
> for the actions doesn't work at all.
>
> I have noticed, that the methods from the implemented
> IDiagramWorkbenchPart don't even get called when the bound keys get pressed.
>
> Well is there any known way to get the global actions like "delete" and
> "rename" to work with their bound keys as expected?
>
> Thx in advance, Arne
Re: Global Actions in Multipage Editor with a Diagram Editor [message #216825 is a reply to message #215998] Fri, 30 January 2009 06:43 Go to previous message
Eclipse UserFriend
Hello Arne,

I have the following lines in plugin.xml of the .diagram plugin:

<extension point=" org.eclipse.gmf.runtime.common.ui.services.action.globalActi onHandlerProviders ">
<?gmfgen generated="false"?>
<GlobalActionHandlerProvider
class=" org.eclipse.gmf.runtime.diagram.ui.providers.DiagramGlobalAc tionHandlerProvider "
id="TopicMapPresentation">
<Priority name="Lowest"/>
<ViewId id="org.example.emfgmf.topicmap.presentation.TopicmapEditorID ">
<ElementType class=" org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditP art ">
<GlobalActionId actionId="delete"/>
</ElementType>
<ElementType class=" org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart ">
<GlobalActionId actionId="save"/>
</ElementType>
</ViewId>
</GlobalActionHandlerProvider>

Note: specified <ViewId id="org.example.emfgmf.topicmap.presentation.TopicmapEditorID ">
is an ID of the multipage editor (not a diagram one).

-----------------
Alex Shatalin
Previous Topic:Linking from a node inside a compartment to a child node outside the compartment
Next Topic:modification of ElementInitializers generation
Goto Forum:
  


Current Time: Fri May 16 06:37:00 EDT 2025

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

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

Back to the top