|
|
Re: [ATL] specify the UML2 metamodel [message #78612 is a reply to message #78530] |
Wed, 09 April 2008 12:57   |
Eclipse User |
|
|
|
Thanks William for this quick reply. Yes I have this error in the console
----------
ATL Console initiated
SEVERE: ****** BEGIN Stack Trace
SEVERE: message: ERROR: could not find operation hasStereotype on
UML2!Class having supertypes: [UML2!BehavioredClassifier,
UML2!EncapsulatedClassifier, OclType, OclAny] (including Java operations)
SEVERE: A.main() : ??#17 null
SEVERE: local variables = {self=CopyClass : ASMModule}
SEVERE: local stack = []
SEVERE: A.__matcher__() : ??#6 null
SEVERE: local variables = {self=CopyClass : ASMModule}
SEVERE: local stack = []
SEVERE: A.__matchCopyclass() : ??#21 18:37-18:61
SEVERE: local variables = {null=IN!Employee, self=CopyClass : ASMModule}
SEVERE: local stack = []
SEVERE: MUML2!Class;.checkMyPropertyValue() : ??#2 6:13-6:47
SEVERE: local variables = {self=IN!Employee}
SEVERE: local stack = []
SEVERE: ****** END Stack Trace
INFO: Execution terminated due to error (see launch configuration to allow
continuation after errors).
SEVERE: ERROR: could not find operation hasStereotype on UML2!Class having
supertypes: [UML2!BehavioredClassifier, UML2!EncapsulatedClassifier,
OclType, OclAny] (including Java operations)
java.lang.RuntimeException: ERROR: could not find operation hasStereotype
on UML2!Class having supertypes: [UML2!BehavioredClassifier,
UML2!EncapsulatedClassifier, OclType, OclAny] (including Java operations)
at
org.eclipse.m2m.atl.engine.vm.SimpleDebugger.error(SimpleDeb ugger.java:195)
at
org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(Sta ckFrame.java:95)
at
org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(Sta ckFrame.java:91)
at
org.eclipse.m2m.atl.drivers.uml24atl.ASMUMLModelElement.real Invoke(ASMUMLModelElement.java:633)
at
org.eclipse.m2m.atl.drivers.uml24atl.ASMUMLModelElement.invo ke(ASMUMLModelElement.java:581)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:143)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:101)
at
org.eclipse.m2m.atl.drivers.uml24atl.ASMUMLModelElement.real Invoke(ASMUMLModelElement.java:616)
at
org.eclipse.m2m.atl.drivers.uml24atl.ASMUMLModelElement.invo ke(ASMUMLModelElement.java:581)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:338)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:143)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:101)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:143)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:101)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
at
org.eclipse.m2m.atl.engine.vm.ASMInterpreter.<init>(ASMInterpreter.java:299)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:169)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:111)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:87)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:326)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:426)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:398)
at
org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:42)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:766)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:608)
at
org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:899)
at
org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlu gin.java:1102)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
-------------
Ive just applied the use case Verifying UML profiled models using the
same source files sample.uml and sample.profile.uml. I created the ATL
transformation file as shown on its web site with a little modification.
module CopyClass; -- Module Template
create OUT : UML2 from IN : UML2, IN_profile : UML2;
---This helper verifies if the value of the proterty 'myProperty' is
different of 'value1'
helper context UML2!Class def : checkMyPropertyValue() : Boolean =
if (self.hasStereotype('MyStereotype')) then
if (self.getTaggedValueFromStereotypeName('MyStereotype','myPro perty')
<> 'value1') then
true
else
false
endif
else
true
endif;
rule Copyclass{
from
s : UML2!Class (not s.checkMyPropertyValue())
to
t : UML2!Class(
name <- 'product' + s.name
)
}
Any hint to solve this problem will be great,
Rasha
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05228 seconds