-
Notifications
You must be signed in to change notification settings - Fork 2
Description
I tried to create an ATL file that contains the transformation from a model to another. Basically, I developed 3 models: an abstract user interface, concrete UI, and final UI. There are 2 transformations created: AUI2CUI.atl and CUI2FUI.atl.
I have a problem with the second file that I did not recognize. The error is below:
mismatched input '(' expecting SEMI CUI2FUI.atl /ATLTransformationProject/Trans_Rules line 30, column 19 ATL Problem
can you pleaze help me to hundle this problem, however i'm not an expert on java and eclipse.

the file is below:
`
-- @path CUI=/ATLTransformationProject/Meta_Model/MyCUI.ecore
-- @path FUI=/ATLTransformationProject/Meta_Model/MyFUI.ecore
module CUI2FUI;
create OUT : FUI from IN : CUI;
rule CUIModelToFUIModel {
from
cuiModel : CUI!CUIModel
to
fuiModel : FUI!FUIModel ( ) }
-- Règle pour transformer l'énumération UIView en une classe UITextType
rule UIViewToUITextType {
from
uiView : CUI!UIView -- Référence à l'énumération dans le modèle source
to
textType : FUI!UITextType ( -- Nouvelle classe dans le modèle cible
name <- uiView.name, -- Copie le nom de l'énumération en nom de classe
UITextField <- thisModule.createAttribute(uiView, 'UITextField'),
UIDatePicker <- thisModule.createAttribute(uiView, 'UIDatePicker'),
UITextContentTypeEmailAddress <- thisModule.createAttribute(uiView, 'UITextContentTypeEmailAddress'),
UITextContentTypeTelephoneNumber <- thisModule.createAttribute(uiView, 'UITextContentTypeTelephoneNumber'),
UITextView <- thisModule.createAttribute(uiView, 'UITextView')
)
}
-- Helper pour créer des attributs dans la classe UITextType
helper def : createAttribute(uiView : CUI!UIView, attributeName : String) : FUI!Attribute =
FUI!Attribute (
name <- attributeName,
value <- if uiView.ownedLiteral->exists(l | l.name = attributeName)
then attributeName
else null
);
rule UIButtonTypeToUIButton {
from
cuiButtonType : CUI!UIButtonType
to
fuiButton : FUI!UIButton ( ) }
rule CICToWidget {
from
cuiCIC : CUI!CIC
to
fuiWidget : FUI!Widget ( ) }
rule CCToUIView {
from
cuiCC : CUI!CC
to
fuiView : FUI!UIView (
id <- cuiCC.id ) }
rule UITextComponentToUITextField {
from
cuiTextComponent : CUI!UITextComponent
to
fuiTextField : FUI!UITextField ( ) }
`