Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » ATL - Problem with Enum transformation
ATL - Problem with Enum transformation [message #72287] Thu, 17 January 2008 08:57 Go to next message
Miguel Llàcer San Fernando is currently offline Miguel Llàcer San FernandoFriend
Messages: 63
Registered: July 2009
Member
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 10:57 Go to previous message
Miguel Llàcer San Fernando is currently offline Miguel Llàcer San FernandoFriend
Messages: 63
Registered: July 2009
Member
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: Sun Apr 11 02:20:36 GMT 2021

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

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

Back to the top