Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sapphire » Implementing a list of ReferenceValues?
Implementing a list of ReferenceValues? [message #1021240] Tue, 19 March 2013 18:02 Go to next message
Ellen Badgley is currently offline Ellen Badgley
Messages: 35
Registered: October 2012
Member
I have a situation where I'd like a model element to maintain a list of ReferenceValues, but all of the examples of ReferenceValue I'm seeing are single value properties. What is the recommended way to accomplish this?

(I currently have a FusionCenter element that "fuses" a number of Sensor elements, so I'd like my fusedSensors property to enable convenient retrieval of references, as well as allowing for browsing on the Sapphire editor.)

Re: Implementing a list of ReferenceValues? [message #1021243 is a reply to message #1021240] Tue, 19 March 2013 18:10 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin Komissarchik
Messages: 942
Registered: July 2009
Senior Member
To model a list of values (whether regular values or reference values), define a wrapper element with the value property as its sole property and define a list property based on that element. I frequently place the wrapper element type as an inner interface right next to the list property in these situations.

- Konstantin
Re: Implementing a list of ReferenceValues? [message #1021261 is a reply to message #1021243] Tue, 19 March 2013 18:51 Go to previous message
Ellen Badgley is currently offline Ellen Badgley
Messages: 35
Registered: October 2012
Member
That makes perfect sense (and was actually similar to the workaround I had in mind). Thank you!
Previous Topic:Project Lombok
Next Topic:Working with Java Types
Goto Forum:
  


Current Time: Sun Oct 26 07:48:58 GMT 2014

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

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