Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[henshin-dev] ConditionalUnit example

Hi,

I would like to have some examples using a ConditionalUnit during a Henshin transformation.
I don't understand how the "if" condition works :
 - Shall the rule return a boolean parameter ? How ?
- Shall the rule return a parameter, and if it's null or empty, the condition is false ?
 - Anything else ?

Here is what I'm doing :
My source ecore model contains a class "Platform", with an attribute named "wordSize", which can have following values : 16 or 32.
I would like to transform this to :
- a class "MyNewPlatform" with its attribute "wordSize" set to _16 (it's an enumeration value) if Platform.wordSize = 16 - a class "MyNewPlatform" with its attribute "wordSize" set to _32 (it's an enumeration value) if Platform.wordSize = 32

Could you help me with this ?

Regards,
Sebastien


Back to the top