Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Using Enum (I can't create an attribute of Enum type in the model created by the transformation)
[ATL] Using Enum [message #670006] Thu, 12 May 2011 11:51 Go to next message
Alessandro Tiso is currently offline Alessandro TisoFriend
Messages: 17
Registered: February 2011
Junior Member
Hi everybody,

I have a problem using Enum during a simple ATL transformation from a model conform to UML to a model conform to an ecore meta-model. The Ecore meta-model contains only a Class (Problem) with two properties, description of type EString and severityType of type Severity where Severity is an Enum with three literals. The transformation is:



module modelChecker;
create OUT : MM1 from IN : MM;

rule aaa {
	from
		s1 : MM!Class 

	to 
		t :  MM1!Problem  (
			description <- 'Test' ,
			severityType <- 'error'
		)
}


In the output model I can't see the severityType! What is wrong?
Any help is appreciated.

Re: [ATL] Using Enum [message #670079 is a reply to message #670006] Thu, 12 May 2011 15:15 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 556
Registered: July 2009
Senior Member
#error
Re: [ATL] Using Enum [message #670137 is a reply to message #670079] Thu, 12 May 2011 19:19 Go to previous messageGo to next message
Alessandro Tiso is currently offline Alessandro TisoFriend
Messages: 17
Registered: February 2011
Junior Member
Thank you for the quick response.

But, the result is the same.In other words, in the XMI of the output model I can't see severityType!
Re: [ATL] Using Enum [message #670304 is a reply to message #670137] Fri, 13 May 2011 13:21 Go to previous message
Alessandro Tiso is currently offline Alessandro TisoFriend
Messages: 17
Registered: February 2011
Junior Member
Probably I have found when I can't see the severityType attribute in the XMI of the outputModel. It seems that it happens when I choose the first literalElement in the Enum (error) to initialize the severityType. If I choose another literal (not the first) it will appear in the XMI of the output model as a value of severityType.
Can someone explain why?
Previous Topic:an executable file of ATL project
Next Topic:[ATL] Error loading platform
Goto Forum:
  


Current Time: Wed Apr 24 22:03:00 GMT 2024

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

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

Back to the top