Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » EMF GMF Integration - Delete key
EMF GMF Integration - Delete key [message #234136] Thu, 18 June 2009 17:33 Go to next message
Olivier Zanon is currently offline Olivier ZanonFriend
Messages: 7
Registered: July 2009
Junior Member
Hello,

I'm currently working on the excellent article about EMF and GMF
integration.
http://www.eclipse.org/articles/article.php?file=Article-Int egrating-EMF-GMF-Editors/index.html

However, I noticed a bug while running the example : the delete key does
not work in the diagram page.

Has anybody a hint or a pointer on how to solve this ?

I'm using:
EMF 2.4.2
GMF 2.1.3

Regards,
Olivier
Re: EMF GMF Integration - Delete key [message #234200 is a reply to message #234136] Fri, 19 June 2009 08:39 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Olivier,

Do you have other edit menu actions working? ( http://www.eclipse.org/articles/Article-Integrating-EMF-GMF- Editors/index.html#fixing_edit_menu_actions)

-----------------
Alex Shatalin
Re: EMF GMF Integration - Delete key [message #234347 is a reply to message #234200] Sat, 20 June 2009 09:53 Go to previous messageGo to next message
Olivier Zanon is currently offline Olivier ZanonFriend
Messages: 7
Registered: July 2009
Junior Member
Hi Alex,

Thank you for your answer.

Yes, everything is working fine, and I can even delete a node in the
diagram by using the Edit->Delete menu item.
The only thing that is not working is the delete key in the diagram editor
page. When I press "delete" after having selected a node in the diagram,
nothing happens.
The delete key is working fine in EMF editor pages (in the "selection
tree" for instance).

I think you can reproduce it by simply running the example given in the
article.

There are also warnings about handler conflicts as the following post is
referencing to:
http://dev.eclipse.org/newslists/news.eclipse.modeling.gmf/m sg16531.html
but I don't think those conflicts are responsible for disabling the delete
key. Actually, I managed to remove those warnings by simply removing
global handlers in the TopicmapActionBarContributor, and the delete key
problem remains in the diagram page.

Of course, when the diagram editor is not embedded in the multipage
editor, the delete key is working fine.

I'm experiencing this problem when running the article example, but also
with my own integrated editor.

Regards,
Olivier
Re: EMF GMF Integration - Delete key [message #234470 is a reply to message #234347] Mon, 22 June 2009 15:43 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Olivier,

To make "delete" keyboard action working I had to add following method into
TopicMapDiagramEditor:

public void selectionChanged(IWorkbenchPart part, ISelection selection) {
IWorkbenchPart thisWorkbenchPart = this;
IWorkbenchPartSite site = getSite();
if (site instanceof MultiPageEditorSite) {
thisWorkbenchPart = ((MultiPageEditorSite) site).getMultiPageEditor();
}
if (thisWorkbenchPart == part)
updateActions(getSelectionActions());
}

Another option is to listed selection change event in TopicMapEditor and
call "TopicMapDiagramEditor.updateActions()" from there.

-----------------
Alex Shatalin
Re: EMF GMF Integration - Delete key [message #234532 is a reply to message #234470] Tue, 23 June 2009 20:27 Go to previous message
Olivier Zanon is currently offline Olivier ZanonFriend
Messages: 7
Registered: July 2009
Junior Member
It works great !
Thank you so much Alex !
Previous Topic:Refresh Properties
Next Topic:how to get editPart from model/diagram filename
Goto Forum:
  


Current Time: Wed Apr 08 19:15:16 GMT 2020

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

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

Back to the top