Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Update programmatically figure with EditPart
Update programmatically figure with EditPart [message #990822] Fri, 14 December 2012 06:00 Go to next message
excellion fdfds is currently offline excellion fdfds
Messages: 9
Registered: July 2012
Junior Member
Hello!
I have an rcp application, with gmf model.
So i have somes edit part who contains a model and a figure.

I want update bounds or routing points of a figure, programmatically with using directly the edit part (or the figure).
Directly make a figure.setPoints(pointList); not works (because not persisted in file).

To update a model, i create command with a transactionnal editing domain.

But for update figures, what is the procedure?

Thanks!
Re: Update programmatically figure with EditPart [message #990837 is a reply to message #990822] Fri, 14 December 2012 06:45 Go to previous message
Ralph Gerbig is currently offline Ralph Gerbig
Messages: 697
Registered: November 2009
Senior Member
Hi,

to make figures react on changes in your ecore model instanze you can do two things. You can use pins in graphical and gmfmap model which will have an OCL expression that is executed to determine whether the pin is executed. The second way is to override handleNotification in your editpart. If you want to persist your changes you should to these in the notation model. You can get the notation model element of a edit part by calling getNotationView on it. http://publib.boulder.ibm.com/infocenter/rsahelp/v7r0m0/topic/org.eclipse.gmf.doc/reference/api/runtime/org/eclipse/gmf/runtime/diagram/ui/editparts/IGraphicalEditPart.html#getNotationView()

Ralph
Previous Topic:Default value of node attribute
Next Topic:Adding bendpoints as part of Arrange All
Goto Forum:
  


Current Time: Thu Jul 31 20:02:13 EDT 2014

Powered by FUDForum. Page generated in 0.08664 seconds