Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Property sheet
Property sheet [message #903677] Fri, 24 August 2012 16:59 Go to next message
Rui Domingues is currently offline Rui Domingues
Messages: 187
Registered: October 2010
Senior Member
Hi.

Once in tutorial the binding between properties sheet and pictogram is not presented, i've been researching the more correct way of doing that. One example i've found is this one:
http://trac.rtsys.informatik.uni-kiel.de/trac/11ss-eclipse/browser/graphiti/de.cau.cs.rtprak.graphiti/src/de/cau/cs/rtprak/graphiti/property/StateSection.java

Is this the right way? We have to listen focus lost and then use a command to write the changes?

There is no such automatic binding mechanism like jface? I know Jface also binds emfproperties.
My question is if we must use the command to commit changes in the model.


Thanks in advance

[Updated on: Fri, 24 August 2012 17:01]

Report message to a moderator

Re: Property sheet [message #904014 is a reply to message #903677] Mon, 27 August 2012 03:42 Go to previous messageGo to next message
Michael Wenz is currently offline Michael Wenz
Messages: 1577
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Rui,

this could be one way to achieve it, if it fits depends on your tool. Our
FAQ page at http://www.eclipse.org/graphiti/developers/faq.php shows another
way how to add an editable property sheet.

Michael
Re: Property sheet [message #904045 is a reply to message #904014] Mon, 27 August 2012 12:06 Go to previous messageGo to next message
Rui Domingues is currently offline Rui Domingues
Messages: 187
Registered: October 2010
Senior Member
Hi. Thanks for your reply.

I thought that it should exist some way for automatic binding.

Thanks again.

Rui
Re: Property sheet [message #904287 is a reply to message #904045] Tue, 28 August 2012 03:04 Go to previous messageGo to next message
Michael Wenz is currently offline Michael Wenz
Messages: 1577
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Not within Graphiti or the properties. But there is a DataBinding
implementation for EMF. Maybe that's what you are looking for, e.g
http://www.vogella.com/articles/EclipseDataBindingEMF/article.html

Michael
Re: Property sheet [message #904334 is a reply to message #904287] Tue, 28 August 2012 05:08 Go to previous messageGo to next message
Rui Domingues is currently offline Rui Domingues
Messages: 187
Registered: October 2010
Senior Member
Hi. I saw that, but my question is if that deals (writes) to resource file with emf transactions?
I think it only changes the memory-model, and the developer is responsible for writing to file anyway, isn't it?
Re: Property sheet [message #904801 is a reply to message #904334] Wed, 29 August 2012 03:22 Go to previous message
Michael Wenz is currently offline Michael Wenz
Messages: 1577
Registered: July 2009
Location: Walldorf, Germany
Senior Member
The writing to memory must happen inside an EMF Transaction. AFAIK EMF
databinding does that, or at least there is an option to do so (sorry, my
memory is fading here, it's been a few years since I used databinding the
last time...). Writing to the filesystem is in the resposibility of the
developer anyhow, but if you use the editor's editing domain, the editor
will do it for you.

Michael
Previous Topic:Problem with Context Menu
Next Topic:Best practice for updating graphiti Graphics from business object changes
Goto Forum:
  


Current Time: Thu Aug 21 12:20:12 EDT 2014

Powered by FUDForum. Page generated in 0.03166 seconds