Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 11:49 Go to next message
Gunnar Arndt is currently offline Gunnar ArndtFriend
Messages: 82
Registered: June 2012
Member
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 12:34 Go to previous message
Gunnar Arndt is currently offline Gunnar ArndtFriend
Messages: 82
Registered: June 2012
Member
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: Fri Apr 19 00:25:56 GMT 2024

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

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

Back to the top