Skip to main content



      Home
Home » Archived » M2M (model-to-model transformation) » ATL - Problem with Enum transformation
ATL - Problem with Enum transformation [message #72287] Thu, 17 January 2008 03:57 Go to next message
Eclipse UserFriend
Hi,
I'm doing a transformation to UML and I want to transform an element to
UML Enum.
I have done a rule like:

rule generatePublicVisibility (attr : UMLMMODEL!Property) {
to
o : UMLMMODEL!VisibilityKind
do {
attr.visibility <- o.public;
}
}

but it throws an exception:
GRAVE: org.eclipse.emf.ecore.impl.EEnumImpl cannot be cast to
org.eclipse.emf.ecore.EClass


How can I do this ?
Thanks.
Re: ATL - Problem with Enum transformation [message #73719 is a reply to message #72287] Tue, 29 January 2008 05:57 Go to previous message
Eclipse UserFriend
I have solved it.

If you want to create a UML2 Property and you want to assign it a value to
its attribute visibility you only have to do this.

visibility <- #value


where value can be:
public
private
protected

that's all.
Previous Topic:[QVTOM] Deferred resolves
Next Topic:[ATL] Text wrapped in tags
Goto Forum:
  


Current Time: Thu Jul 31 14:12:50 EDT 2025

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

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

Back to the top