Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Getting complex stereotype properties values
Getting complex stereotype properties values [message #476900] Thu, 31 January 2008 15:55 Go to next message
Mark Howard is currently offline Mark HowardFriend
Messages: 10
Registered: July 2009
Junior Member
Hello UML2 developers,

I have a uml profile which defines a stereotype with a property which is
a list of objects of a class which is also defined in the same profile.
I'm able to use this profile in uml models, setting all the properties,
using rational software modeller.

I can't manage to access the same properties through my own code through.

value = property.getValue(mystereotype, "myproperty")
returns (according to a debugger) an EcoreEList$Dynamic<E>
This appears to be a collection of DynamicEObjectImpl objects. They have
an eClass field (which seems to be the definition of the class in the
profile which is the type of the property) and also a eSettings field,
which is an Object[] and contains some of the values I want, but not all
of them. eSettings has string values, but not enumeration literal values
(they are all set to null).

I'm sure that this can't be the correct was to be accessing these things,
but can't figure out how to get at the data. Does anyone know how to do
this?

Many thanks in advance,

Mark Howard
Re: Getting complex stereotype properties values [message #476901 is a reply to message #476900] Thu, 31 January 2008 16:51 Go to previous message
Mark Howard is currently offline Mark HowardFriend
Messages: 10
Registered: July 2009
Junior Member
After digging through the source code I've managed to answer my own
question: a path can be added to getValue() like this:

umlProperty.getValue(stereotype, "arrayproperty[0]::parameter")
umlProperty.getValue(stereotype, "arrayproperty[0]::parameter")

Regards,

Mark Howard
Re: Getting complex stereotype properties values [message #625957 is a reply to message #476900] Thu, 31 January 2008 16:51 Go to previous message
Mark Howard is currently offline Mark HowardFriend
Messages: 10
Registered: July 2009
Junior Member
After digging through the source code I've managed to answer my own
question: a path can be added to getValue() like this:

umlProperty.getValue(stereotype, "arrayproperty[0]::parameter")
umlProperty.getValue(stereotype, "arrayproperty[0]::parameter")

Regards,

Mark Howard
Previous Topic:Getting complex stereotype properties values
Next Topic:AddStructuralFeatureValue constraint
Goto Forum:
  


Current Time: Wed Apr 24 18:37:32 GMT 2024

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

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

Back to the top