Skip to main content



      Home
Home » Modeling » ATL » How to override keywords/built-in types in metamodel?(The target metamodel defines data types which collide with ATL built-in types.)
icon5.gif  How to override keywords/built-in types in metamodel? [message #886181] Thu, 14 June 2012 07:49 Go to next message
Eclipse UserFriend
I've been using ATL for just a few days now in order to create a transformer between two Ecore metamodels, namely OTX as the target models (generated from the standardized ISO XML schema). It's been working fine so far, and the documentation on eclipse.org has proven helpful and compact.

Now, I have the following problem: OTX specifies several data types available in ATL as well, for instance String, Float and Integer.
How can I create a variable of type otx!String in a rule?
Currently, I receive the following warning:
Metamodel contains several classifiers with same name: String

rule createOutParameter(){
	to 
		otxOutParameter : otx!OutParameterDeclaration(
			realisation <- otxDeclarationRealisation,
			name <- 'out'
		),
		otxDeclarationRealisation : otx!DeclarationRealisation(),
		otxType : otx!String -- mismatched input 'String' expecting NAME
	do {
		otxOutParameter;
	}
}


Any help would be greatly apreciated.
icon14.gif  Re: How to override keywords/built-in types in metamodel? [message #886201 is a reply to message #886181] Thu, 14 June 2012 08:34 Go to previous message
Eclipse UserFriend
Ok, I've just found the answer accidently: otxType : otx!"String" does the trick.
Previous Topic:m2m how to remove unwanted fields?
Next Topic:[ATL] Invoking an ATL transformation on a part of a model, not on a whole model
Goto Forum:
  


Current Time: Wed Jul 23 06:06:31 EDT 2025

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

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

Back to the top