[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.modeling.m2m] Re: [ATL] allInstances() fails with error "could not find operation From on MOF!EClass"
|
Hugo Bruneliere wrote:
You cannot use "->" because it is only for collections:
- "COMPONENTMETA!Component" is not a collection, it is a single
element which represents the COMPONENTMETA!Component type
- allInstances & allInstancesFrom are not operations on collections
You must write:
COMPONENTMETA!Component.allInstances()
COMPONENTMETA!Component.allInstancesFrom('InputModelName')
D'oh! Yes of course. Fixed that. However, that does not solve the problem.
Are you using the standard VM or the new EMF VM?
I assume you are referring to the run dialog setting
ATL Virtual Machine = (Regular VM | EMF specific VM)
I tried both. Does not solve the problem.
In both cases I get something like
An internal error occurred during: "Launching generateComponentModel".
operation not found: COMPONENTMETA!Component.From
Any hints?
Would it help if I attach some files from my project?
Thanks for your help,
Goetz
-----------------------------------------------------------
---- [1] ATL file -----------------------------------------
-----------------------------------------------------------
module generateComponentModel;
create componentOut : COMPONENTMETA from settingsIn : SETTINGSMETA,
componentIn : COMPONENTMETA, scm : SCMMETA;
-- Definition of visibility
helper context COMPONENTMETA!ComponentsModel def : isVisible() : Boolean =
true
;
helper context COMPONENTMETA!Component def : isVisible() : Boolean =
let allComponents : Sequence(COMPONENTMETA!Component) =
COMPONENTMETA!Component.allInstances() in
let allSettings : Sequence(SETTINGSMETA!Setting) =
SETTINGSMETA!Setting.allInstances() in
let allSettingComponentMappings :
Sequence(SCMMETA!SettingComponentMapping) =
SCMMETA!SettingComponentMapping.allInstances() in
-- here I would like to define the isVisible() function based on the
helper variables
-- allComponents, allSettings, and allSettingComponentMappings
-- however these are all empty
true
;
-- Copy Rules
rule componentsModel {
from s : COMPONENTMETA!ComponentsModel (
s.isVisible()
)
to t : COMPONENTMETA!ComponentsModel mapsTo s (
name <- s.name,
components <- s.components
)
}
rule component {
from s : COMPONENTMETA!Component (
s.isVisible()
)
to t : COMPONENTMETA!Component mapsTo s (
name <- s.name
)
}
-----------------------------------------------------------
---- [2] stack trace --------------------------------------
-----------------------------------------------------------
SEVERE: ****** BEGIN Stack Trace
SEVERE: message: ERROR: could not find operation From on MOF!EClass
having supertypes: [MOF!EClassifier, OclType, OclAny] (including Java
operations)
SEVERE: A.main() : ??#22 null
SEVERE: local variables = {self=generateComponentModel : ASMModule}
SEVERE: local stack = []
SEVERE: A.__matcher__() : ??#3 null
SEVERE: local variables = {self=generateComponentModel : ASMModule}
SEVERE: local stack = []
SEVERE: A.__matchcomponent() : ??#26 44:9-44:22
SEVERE: local variables = {s=componentIn!C1,
self=generateComponentModel : ASMModule}
SEVERE: local stack = []
SEVERE: MCOMPONENTMETA!Component;.isVisible() : ??#4 14:3-14:50
SEVERE: local variables = {self=componentIn!C1}
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 From on MOF!EClass having
supertypes: [MOF!EClassifier, OclType, OclAny] (including Java operations)
java.lang.RuntimeException: ERROR: could not find operation From on
MOF!EClass having supertypes: [MOF!EClassifier, OclType, OclAny]
(including Java operations)
at
org.eclipse.m2m.atl.engine.vm.SimpleDebugger.error(SimpleDebugger.java:195)
at
org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(StackFrame.java:95)
at
org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(StackFrame.java:91)
at
org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement.invoke(ASMEMFModelElement.java:700)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:240)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation.java:171)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:143)
at
org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement.invoke(ASMEMFModelElement.java:683)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:240)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:338)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation.java:171)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:143)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:101)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:240)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation.java:171)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:143)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:101)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.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.java:169)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.java:111)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.java:87)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLauncher(AtlRegularVM.java:326)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLauncher(AtlRegularVM.java:426)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlRegularVM.java:398)
at
org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDelegate.launch(AtlLaunchConfigurationDelegate.java:42)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:759)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:608)
at
org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:899)
at
org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlugin.java:1102)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
INFO: /ATL Experiments/transformations/generateComponentModel.atl
SEVERE: ****** BEGIN Stack Trace
SEVERE: message: ERROR: could not find operation From on MOF!EClass
having supertypes: [MOF!EClassifier, OclType, OclAny] (including Java
operations)
SEVERE: A.main() : ??#22 null
SEVERE: local variables = {self=generateComponentModel : ASMModule}
SEVERE: local stack = []
SEVERE: A.__matcher__() : ??#3 null
SEVERE: local variables = {self=generateComponentModel : ASMModule}
SEVERE: local stack = []
SEVERE: A.__matchcomponent() : ??#26 44:9-44:22
SEVERE: local variables = {s=componentIn!C1,
self=generateComponentModel : ASMModule}
SEVERE: local stack = []
SEVERE: MCOMPONENTMETA!Component;.isVisible() : ??#4 14:3-14:50
SEVERE: local variables = {self=componentIn!C1}
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 From on MOF!EClass having
supertypes: [MOF!EClassifier, OclType, OclAny] (including Java operations)
java.lang.RuntimeException: ERROR: could not find operation From on
MOF!EClass having supertypes: [MOF!EClassifier, OclType, OclAny]
(including Java operations)
at
org.eclipse.m2m.atl.engine.vm.SimpleDebugger.error(SimpleDebugger.java:195)
at
org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(StackFrame.java:95)
at
org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(StackFrame.java:91)
at
org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement.invoke(ASMEMFModelElement.java:700)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:240)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation.java:171)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:143)
at
org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement.invoke(ASMEMFModelElement.java:683)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:240)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:338)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation.java:171)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:143)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:101)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:240)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation.java:171)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:143)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:101)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.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.java:169)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.java:111)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.java:87)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLauncher(AtlRegularVM.java:326)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLauncher(AtlRegularVM.java:426)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlRegularVM.java:398)
at
org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDelegate.launch(AtlLaunchConfigurationDelegate.java:42)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:759)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:608)
at
org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:899)
at
org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlugin.java:1102)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
INFO: /ATL Experiments/transformations/generateComponentModel.atl