[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.m2m] Re: [ATL] Problem with matched rule and multiple source models

Hello,

Luis Pedro a écrit :
Hello,

I have a matched rule with multiple source models, and the problem is that it does not get matched. The code follows:

rule init {
from
system : GenericCospel!System
to
coopnpackage: COOPNMetaModel!COOPNPackage(
name <- system.name, ownedModules <- system.ownedTypes
)
}


rule ruleType {
from
c : COOPNMetaModel!COOPNPackage,
t : GenericCospel!Type
to
.....
}

Here there is an error : you can't match output elements in the from section. You need to refer to the corresponding input element. For instance :


rule ruleType {
    from
        c : GenericCospel!System,
        t : GenericCospel!Type

Best regards,

William

Before putting the c variable in the source of ruleType, my result was a match between ruleType and the last line in rule init, giving me a hierarchy (things generated by ruleType were children of things generated by init).
After I added c, the match is not done. I suppose because the source is different from the system.ownedTypes type.


Since I need to have that c object further in the code, is there any way to achieve this matching?

Thanks very much in advance,