Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » delete doesn't delete from model
icon9.gif  delete doesn't delete from model [message #554849] Tue, 24 August 2010 14:27 Go to next message
No real name is currently offline No real nameFriend
Messages: 2
Registered: August 2010
Junior Member
Hi,
I have a very odd problem, i have a connection and whenever i hit the "del" key, only the diagramm/view gets deleted and after i press F5 the connection diagramm/view gets created again.
My workaround now is, that i make rightclick and select "delete from Model" from the Menu.

I tried to find the error but i only could find, that the "getDestroyElementCommand" only does fire when i delete the connection from the Model (but not when i hit the "del" key)(though it does fire quite a lot e.g. when i just click he connection - is that normal?).
The Element's are synchronised (thats why the connection gets recreated every time i think), but why doesn't the model gets destroyed when i delete the connection? Mad

If anyone could provide me with anything, a tip or just an idea please let me know, I am pretty much clueless right now.

P.S. I'm sorry that i couldn't provide a concrete code sample, but a) i dont know which i should post, and b) its a very large chunk of code and i don't know if I'm allowed to post it^^'.

P.P.S. If you need any additional Information, please let me know Smile


Thanks in advance! Smile
Re: delete doesn't delete from model [message #555908 is a reply to message #554849] Mon, 30 August 2010 08:12 Go to previous messageGo to next message
Tatiana Fesenko is currently offline Tatiana FesenkoFriend
Messages: 21
Registered: May 2010
Junior Member
Hi No Real Name,

In GMF "Del" usually means "Delete from Diagram" and "Ctrl + Del" usually deletes from model.

Google search for "GMF delete element" shows the following helpful links -
http:// dev.eclipse.org/newslists/news.eclipse.modeling.gmf/msg09277 .html
http:// dev.eclipse.org/newslists/news.eclipse.modeling.gmf/msg05855 .html
and http:// wiki.eclipse.org/GMF_Newsgroup_Q_and_A#How_can_I_disable_.27 Delete_from_model.27_for_an_element.3F
. The last one can be the most interesting for you as it gives an example how the "deleteFromDiagramAction" is removed in Ecore diagram editor.

Good luck!
Tanya.
Re: delete doesn't delete from model [message #557609 is a reply to message #554849] Wed, 08 September 2010 09:38 Go to previous message
No real name is currently offline No real nameFriend
Messages: 2
Registered: August 2010
Junior Member
Hi Tatiana,
although i disabled "Delete from Diagramm" it still would reappear in when pressing the "del" key (ctrl+del doesn't do anything).

My workaround now is, that i check in the getCommand method of my editPart if the diagramm si being deleted and then delete the modell myself with the executeCommand mehod.
It works, but isn't the prettiest thing to do, so if anyone has a idea how i could solve that in an other way, please let me know Smile

thank you
Previous Topic:Inconsistent action : CopyAppearancePropertiesAction
Next Topic:GMF graphdef, definition of a diamond
Goto Forum:
  


Current Time: Tue Apr 23 08:04:57 GMT 2024

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

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

Back to the top