|
|
Re: [ATL] Multiple source patterns [message #80360 is a reply to message #80348] |
Tue, 29 April 2008 12:37 |
Luis Pedro Messages: 29 Registered: July 2009 |
Junior Member |
|
|
Uauuu! That's really something! Thanks for the quick and simple solution!
Cheers,
Luis Pedro
Adil Anwar wrote:
> did you add this line at the top of your transformation definition ??
>
> -- @atlcompiler atl2006
>
> Best Regards,
> Adil Anwar
>
>
> "Luis Pedro" <luis.pedro@cui.unige.ch> a écrit dans le message de news:
> fv6q14$qvl$1@build.eclipse.org...
>> Dear all,
>> I'm trying to write an ATL transformation in which I have two source
>> models (from different metamodels). The code I'm using is the following:
>>
>> module ControlSystemGenDSMLTransformation; -- Module Template
>> create dvmCOOPN : COOPNMetaModel from dvm : GenericCospel, cfc :
>> COOPNMetaModel;
>>
>> rule init {
>>
>> from
>> system : GenericCospel!System
>> to
>> coopnpackage: COOPNMetaModel!COOPNPackage(
>> name <- system.name,
>> ownedModules <- system.ownedTypes
>> )
>> }
>>
>> rule ruleType {
>> from
>> t : GenericCospel!Type,
>> c : COOPNMetaModel!COOPNPackage(c.name= 'cfc')
>>
>> to
>> ....
>> ....
>> }
>>
>> If I comment the line "c : COOPNMetaModel!COOPNPackage(c.name= 'cfc')"
>> everything works fine otherwise I've the following errors:
>> SEVERE: ****** BEGIN Stack Trace
>> SEVERE: exception:
>> SEVERE: null
>> java.lang.NullPointerException
>> at
>> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:301)
>> 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:759)
>> 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)
>> SEVERE: A.main() : ??#22 null
>> SEVERE: local variables = {self=ControlSystemGenDSMLTransformation :
>> ASMModule}
>> SEVERE: local stack = []
>> SEVERE: A.__matcher__() : ??#3 null
>> SEVERE: local variables = {self=ControlSystemGenDSMLTransformation :
>> ASMModule}
>> SEVERE: local stack = []
>> SEVERE: A.__matchruleType() : ??#21 18:35-18:41
>> SEVERE: local variables = {self=ControlSystemGenDSMLTransformation :
>> ASMModule, t=dvm!Fridge}
>> SEVERE: local stack = []
>> SEVERE: ****** END Stack Trace
>> INFO: Execution terminated due to error (see launch configuration to
>> allow continuation after errors).
>> SEVERE: null
>> java.lang.RuntimeException
>> 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:87)
>> at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:173)
>> 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:759)
>> 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)
>> Caused by: java.lang.NullPointerException
>> at
>> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:301)
>> 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)
>> ... 21 more
>>
>>
>> Any hint?
>>
>> Thanks very much in advance,
>>
>> Best regards,
>>
>> Luis Pedro
>>
>> p.s. In attachment the screenshot of my ATL configuration.
>>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03154 seconds