Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forums[ATL] Applying UML profile
https://www.eclipse.org/forums/index.php/mv/msg/206255/660304/#msg_660304
I'm trying to apply a UML profile and stereotype to a UML sequence diag. giving my profile (Pro) as input model. But it raises this error:
org.eclipse.m2m.atl.engine.emfvm.VMException: Operation not found: OUT!CustomerInterface.getStereotype(java.lang.String)
at __applyLifeline#19(transApplied2.atl[40:22-40:49])
The ATL file:
module transApplied2;
create OUT : UML from IN : UML, Pro : UML;
rule Model {
from
s : UML!Model
to
t : UML!Model ( name <- s.name)
do {
t.applyProfile(UML!Profile.allInstancesFrom('Pro')->select(p | p.name = 'seqProTest1')->first()); }
}
rule Lifeline {
from
s : UML!Lifeline
to
t : UML!Lifeline (name <- s.name)
do {
t.applyStereotype(t.getStereotype('optional'));
--t.applyStereotype(t.getApplicableStereotype('seqProTest1:: optional')); }
}
Does anyone know why it couldn't find the operation getStereotype.
Thanks in advance,
Sally
]]>Sally 2011-03-17T18:04:13-00:00Re: [ATL] Applying UML profile
https://www.eclipse.org/forums/index.php/mv/msg/206255/660305/#msg_660305
thisModule.getStereotype(str)]]>Sylvain EVEILLARD2011-03-17T18:16:38-00:00Re: [ATL] Applying UML profile
https://www.eclipse.org/forums/index.php/mv/msg/206255/660340/#msg_660340
Sally 2011-03-18T01:24:05-00:00Re: [ATL] Applying UML profile
https://www.eclipse.org/forums/index.php/mv/msg/206255/661402/#msg_661402
Your passing a UML!Stereotype into getStereotype(name : String) when the helper expects the stereotype name. This means ATL won't find a helper matching your signature.
Regards,
Ronan]]>Ronan B2011-03-24T14:35:45-00:00Re: [ATL] Applying UML profile
https://www.eclipse.org/forums/index.php/mv/msg/206255/663429/#msg_663429
Hi,
I modified to
t.applyStereotype(thisModule.getStereotype('optional'));
where optional is the stereotype name
I get this error
Operation not found: OUT!CustomerInterface.applyStereotype(org.eclipse.m2m.atl.en gine.emfvm.lib.OclUndefined)
The profile is correctly applied to the model, the problem with the operation applyStereotype.