Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] IllegalArgumentException: Error, when applying a stereotype
[ATL] IllegalArgumentException: Error, when applying a stereotype [message #665144] Wed, 13 April 2011 12:53 Go to next message
Sally  is currently offline Sally Friend
Messages: 16
Registered: March 2011
Junior Member
Hi all,

When I'm trying to apply a UML profile and stereotype to a UML class diag. , the profile is correctly applied to the model, but I got this error for the stereotype.

org.eclipse.m2m.atl.engine.emfvm.VMException: Exception during invocation of operation applyStereotype on org.eclipse.uml2.uml.internal.impl.ClassImpl@18c26d7 (name: CustomerInterface, visibility: <unset>) (isLeaf: false, isAbstract: false) (isActive: false)
Caused by: java.lang.IllegalArgumentException: org.eclipse.uml2.uml.internal.impl.StereotypeImpl@ed4b5a (name: variant, visibility: <unset>) (isLeaf: false, isAbstract: false) (isActive: false)at org.eclipse.uml2.uml.internal.operations.ElementOperations.a pplyStereotype(ElementOperations.java:1411)at org.eclipse.uml2.uml.internal.impl.ElementImpl.applyStereoty pe(ElementImpl.java:499)

The ATL file:
module transAppProfile2;
create OUT : UML from IN : UML, Pro : UML;

helper def : getStereotype(name : String) : UML!Stereotype =
UML!Stereotype.allInstancesFrom('Pro')->select(p | p.name = name)->first();

rule Model {
from
s : UML!Model
to
t : UML!Model ( name <- s.name)
do {
t.applyProfile(UML!Profile.allInstancesFrom('Pro')->select(p|p.name='ClassProject')- >first()); }
}
rule Class {
from
s : UML!Class
to
t : UML!Class (name <- s.name)
do {
t.applyStereotype(thisModule.getStereotype('variant'));}
}

I see in previous messages that this error is not new, but no one stated how it can be solved or why it's raised.

Does anyone know?

Thanks
Sally

Re: [ATL] IllegalArgumentException: Error, when applying a stereotype [message #685577 is a reply to message #665144] Fri, 17 June 2011 19:43 Go to previous message
Lu  is currently offline Lu Friend
Messages: 4
Registered: December 2010
Junior Member
Hi Sally,
I had the same problem reported by you.
Do you solve the problem? How do you do that?

Thank you very much for your attention.

Yours sincerely,
Lu


Previous Topic:[ATL] Error: "Cannot overload Ecore"
Next Topic:ATL error
Goto Forum:
  


Current Time: Fri Apr 26 22:11:55 GMT 2024

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

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

Back to the top