Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » assign a EEnumLiteral(EEnumLiteral assignment )
assign a EEnumLiteral [message #1727654] Thu, 24 March 2016 20:04 Go to next message
Deji Paul is currently offline Deji PaulFriend
Messages: 5
Registered: August 2015
Junior Member
Hi,

Please how can I assign a EEnumLiteral value from a source model to an attribute of similar EEnumLiteral type belonging to a target model element Using ETL.


Thanks

Paul.
Re: assign a EEnumLiteral [message #1727660 is a reply to message #1727654] Thu, 24 March 2016 20:53 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Paul,

Would something like the following do the trick?

if (sourceElement.property1 = Source!Enum1#Literal1) {
    targetElement.property2 = Target!Enum2#Literal2;
}


Cheers,
Dimitris.
Re: assign a EEnumLiteral [message #1727966 is a reply to message #1727660] Tue, 29 March 2016 22:46 Go to previous message
Deji Paul is currently offline Deji PaulFriend
Messages: 5
Registered: August 2015
Junior Member
Hi Dimitris,

Thanks for the response. Sorry, guess I didn't explain the problem clear enough.

I have a EEnum from a stereotype in my UML source model and I will like to access this "variable" then transform it to my Target EEnum.
E.g. take the example below:
Assuming
source:
UML!Class.name= A
<< FM>>
Oc : Oclevel [1...*] = [high, moderate, low, ]

and

Target:

Mean!Class FC{
attr Oclevel Oc ;
}

enum Oclevel {
high;
moderate;
low; }


How do I assess and transform the Enumeration variables of the source to the target?

Thanks.

Paul DD.
Previous Topic:[EML] Standalone: Match Trace from other module
Next Topic:EVL: How to determine there is no unsatisfied constraint in a module
Goto Forum:
  


Current Time: Wed Apr 24 17:14:56 GMT 2024

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

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

Back to the top