Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » GMF delete node problem
GMF delete node problem [message #662920] Fri, 01 April 2011 09:37 Go to next message
Joao S is currently offline Joao S
Messages: 51
Registered: January 2011
Member
Hello everyone,

I´m facing some problems here, this is what i want to do:

When I delete a node in the diagram I would like to save some data about it in a file (ID, Name etc...)

How can I get this data just before it is deleted and save it to the file?

Thanks in advance,

Joao
Re: GMF delete node problem [message #665580 is a reply to message #662920] Fri, 15 April 2011 03:27 Go to previous messageGo to next message
emil salageanu is currently offline emil salageanu
Messages: 94
Registered: June 2010
Location: Nice, France
Member
Hello,

you should receive an event in the edit part of the parent node when you delete the node. Doesn't that event contain the information you need ?

cheers,

emil

Re: GMF delete node problem [message #665744 is a reply to message #665580] Fri, 15 April 2011 13:12 Go to previous messageGo to next message
Joao S is currently offline Joao S
Messages: 51
Registered: January 2011
Member
Hello Emil,

First of all thank you very much for your answer.

I don´t need this feature anymore in my project.

Yes, edit part receives an event but I believe that by that time the eobject instance doesn´t exists anymore.

Am I correct?

Joao

Re: GMF delete node problem [message #665931 is a reply to message #665744] Mon, 18 April 2011 04:28 Go to previous messageGo to next message
emil salageanu is currently offline emil salageanu
Messages: 94
Registered: June 2010
Location: Nice, France
Member
I suppose you are, I'm not sure how much information can you find in the event object about the deleted object ... Smile

I actually thought about that when I wrote my message but I hoped that would give you a least a starting point Smile

cheers,
emil.
Re: GMF delete node problem [message #1058955 is a reply to message #665931] Wed, 15 May 2013 19:23 Go to previous messageGo to next message
bradai hazem is currently offline bradai hazem
Messages: 20
Registered: March 2013
Junior Member
any solution ?
Re: GMF delete node problem [message #1060449 is a reply to message #1058955] Fri, 24 May 2013 13:05 Go to previous message
Thomas Beyer is currently offline Thomas Beyer
Messages: 55
Registered: February 2013
Member
Hi Bradai,

the generated DeleteElementAction abstracts from AbstractDeleteFromAction, that shows, how a DestroyElementRequest is used to create the appropriate command from the EditPart.
You could hook into this class to get the appropriate information prior to execution.
Another approach would be to get the latest command from the commandstack and take the information from there.

Regards
Thomas

[Updated on: Fri, 24 May 2013 13:06]

Report message to a moderator

Previous Topic:Auto Resize
Next Topic:Link Constraints and shared tool element
Goto Forum:
  


Current Time: Tue Jul 22 05:18:34 EDT 2014

Powered by FUDForum. Page generated in 0.15576 seconds