Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » How to programmatically set tagged value of enumerated type to stereotyped element
How to programmatically set tagged value of enumerated type to stereotyped element [message #725248] Wed, 14 September 2011 11:23 Go to next message
Neslepaks  is currently offline Neslepaks Friend
Messages: 37
Registered: April 2011
Member
Hi,

Sorry for the spam but I decided to create an own thread for my question so that the title would be more descriptive. I asked the question here previously: http://www.eclipse.org/forums/index.php/mv/msg/236230/719855/#msg_719855

I already got one answer, but I didn't completely understand how it would resolve the problem.

So, I have static profile. In the profile, there is an enumeration ColorType with possible values "Black" and "White". Also there is a stereotype called ColoredPackage that has a tagged value Color of type ColorType.

Then when I am programmatically creating ColoredPackages to diagrams I would like to set the Color to "Black". How should I do that?

If the solution is the snippet in the link, then I need some more assistance of how to use that.

[Updated on: Wed, 14 September 2011 11:23]

Report message to a moderator

Re: How to programmatically set tagged value of enumerated type to stereotyped element [message #740210 is a reply to message #725248] Tue, 18 October 2011 09:08 Go to previous message
Neslepaks  is currently offline Neslepaks Friend
Messages: 37
Registered: April 2011
Member
I got it solved. The problem didn't have actually anything to do with enumerated values in profile. So, it is possible to pass "any" values to stereotyped package with setValue even if they are not legal according to profile. Therefore, for example package.setValue(coloredPackage, "Color", "Any Color") works and I don't have to worry about any enumerations.

Another thing confusing me was, that one tagged value had to be set as a EList.
Previous Topic:Looking for Papyrus for EAST-ADL version 2.1.8
Next Topic:Names of the pins in instances of CallBehaviorAction
Goto Forum:
  


Current Time: Sun Dec 21 12:50:32 GMT 2014

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

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