IllegalArgumentException: Error, when applying a stereotype [message #664911] |
Tue, 12 April 2011 13:26 |
Sally 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
|
|
|
Powered by
FUDForum. Page generated in 0.03577 seconds