Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Full reference to a metamodel class
[ATL] Full reference to a metamodel class [message #78965] Sat, 12 April 2008 23:07 Go to next message
Luis Pedro is currently offline Luis PedroFriend
Messages: 29
Registered: July 2009
Junior Member
Dear all,
I'm writing the following transformation rule based on the
information provided in
http://wiki.eclipse.org/index.php/ATL_FAQ#Full_name_referenc e_to_metamodel_classes

rule ADT {


from
dc : enumerationDC!DCEnum

to
coopnmodule: COOPNMetaModel!COOPNMetaModel::ADTModule::COOPNADT(
name<- 'MyCOOPNModule'

)


}

I get the error "No viable alternative at input :" in
"COOPNMetaModel!COOPNMetaModel:"

My Metamodel is named "COOPNMetaModel and is defined as follows:

package COOPNMetaModel {

class Module {...}

package ADTModule {
class COOPNADT {
attribute name : String;
}
}
}

Shouldn't my rule work? Any hint how to solve this problem?

Thanks very much in advance for your time.

Best regards,

Luis Pedro
Re: [ATL] Full reference to a metamodel class [message #78974 is a reply to message #78965] Mon, 14 April 2008 07:43 Go to previous messageGo to next message
William Piers is currently offline William PiersFriend
Messages: 301
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------030602040606080905020409
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hello,

In fact the MM!pck1::pck2::ME form isn't well recognized by the ATL
parser...
So you need to use the " around the model element location expression :
MM!"pck1::pck2::ME"

in your case :
COOPNMetaModel!"COOPNMetaModel::ADTModule::COOPNADT"

I updated the wiki, thanks for reporting this error !

Best regards,

William

Luis Pedro a
Re: [ATL] Full reference to a metamodel class [message #79048 is a reply to message #78974] Mon, 14 April 2008 09:42 Go to previous message
Luis Pedro is currently offline Luis PedroFriend
Messages: 29
Registered: July 2009
Junior Member
Thank you for the quick update. It works for me now.

Best regards,

Luis Pedro

William Piers wrote:
> Hello,
>
> In fact the MM!pck1::pck2::ME form isn't well recognized by the ATL
> parser...
> So you need to use the " around the model element location expression :
> MM!"pck1::pck2::ME"
>
> in your case :
> COOPNMetaModel!"COOPNMetaModel::ADTModule::COOPNADT"
>
> I updated the wiki, thanks for reporting this error !
>
> Best regards,
>
> William
>
> Luis Pedro a écrit :
>> Dear all,
>> I'm writing the following transformation rule based on the
>> information provided in
>> http://wiki.eclipse.org/index.php/ATL_FAQ#Full_name_referenc e_to_metamodel_classes
>>
>>
>> rule ADT {
>>
>> from
>> dc : enumerationDC!DCEnum
>> to
>> coopnmodule: COOPNMetaModel!COOPNMetaModel::ADTModule::COOPNADT(
>> name<- 'MyCOOPNModule'
>> )
>> }
>>
>> I get the error "No viable alternative at input :" in
>> "COOPNMetaModel!COOPNMetaModel:"
>>
>> My Metamodel is named "COOPNMetaModel and is defined as follows:
>>
>> package COOPNMetaModel {
>>
>> class Module {...}
>>
>> package ADTModule {
>> class COOPNADT {
>> attribute name : String;
>> }
>> }
>> }
>>
>> Shouldn't my rule work? Any hint how to solve this problem?
>>
>> Thanks very much in advance for your time.
>>
>> Best regards,
>>
>> Luis Pedro
>>
Previous Topic:Browse an atl model
Next Topic:Help with access stereotype by a class
Goto Forum:
  


Current Time: Thu Apr 25 00:49:06 GMT 2024

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

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

Back to the top