Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sapphire » initial values for properties created in list editor
initial values for properties created in list editor [message #848149] Tue, 17 April 2012 21:22 Go to next message
Greg Amerson is currently offline Greg Amerson
Messages: 116
Registered: March 2010
Senior Member
In my editor I have a list property editor and when a new ModelElement is created for this list via the "add" button on the list editor, I would like for various properties on that new element to have initial values written out to the underlying XML store.

I was trying to use initial value expressions for this, but the initial value service is not consulted for all the element's properties when a new ModelElement is created via the "Add" handler for a list property editor.

What would be the recommended way for me to accomplish this instead? Would adding individual property listeners on each property in the ModelElement be the appropriate way to handle this?

Thanks for any help or suggestions.
Re: initial values for properties created in list editor [message #848217 is a reply to message #848149] Tue, 17 April 2012 23:06 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin Komissarchik
Messages: 937
Registered: July 2009
Senior Member
Using InitialValueService is the way to go here, but there looks to be a bug here. A quick code inspection confirms that it will not get called when creating list or element property child elements. It only works for root elements.

Please open a bug report.

- Konstantin
Re: initial values for properties created in list editor [message #848303 is a reply to message #848217] Wed, 18 April 2012 01:19 Go to previous message
Greg Amerson is currently offline Greg Amerson
Messages: 116
Registered: March 2010
Senior Member
Ok, no problem. https://bugs.eclipse.org/bugs/show_bug.cgi?id=377047
Previous Topic:SapphireFormText
Next Topic:Diagram node handler factory
Goto Forum:
  


Current Time: Fri Aug 01 09:59:40 EDT 2014

Powered by FUDForum. Page generated in 0.09975 seconds