| Cannot find class in reference model [message #1047563] |
Tue, 23 April 2013 07:38  |
Gunnar Arndt Messages: 46 Registered: June 2012 |
Member |
|
|
Hi again,
I'm trying to create sub-model elements in my output model, which yields the error messages:
org.eclipse.m2m.atl.engine.emfvm.VMException: Cannot find class OpenScreen in reference model otx
org.eclipse.m2m.atl.engine.emfvm.VMException: Cannot find class hmi::OpenScreen in reference model otx
org.eclipse.m2m.atl.engine.emfvm.VMException: Cannot find class otx::hmi::OpenScreen in reference model otx
org.eclipse.m2m.atl.engine.emfvm.VMException: Cannot find class org::iso::otx::hmi::OpenScreen in reference model otx
depending on the rule notation used:
lazy rule Presenter2OpenScreen {
from
source: transformate!PresenterTacticTransformer
to
otxActionRealisation: otx!OpenScreen (
--otxActionRealisation: otx!"hmi::OpenScreen" (
--otxActionRealisation: otx!"otx::hmi::OpenScreen" (
--otxActionRealisation: otx!"org::iso::otx::hmi::OpenScreen" (
modal <- true
)
}
I had posted that problem in another context before and have recently switched to loading otx.genmodel instead of otx.ecore in the transformation, because the genmodel definitely contains the sub-metamodels (HMI, namely), which originally is created from hmi.xsd imported by otx.xsd. You can verify that from the screenshots below.
OpenScreen's interface definition looks like this:
package org.iso.otx.hmi;
import org.iso.otx.ActionRealisation;
public interface OpenScreen extends ActionRealisation {
//...
}
Two screenshots of the genmodel's properties to make the names of the metamodels clear:
* OTX itself:

* HMI:

The ATL documentation is not totally clear on how to specifiy sub-model elements.
Can you tell me how exactly to create sub-model elements in ATL? None of the above alternatives have worked for me. Thank you!
[Updated on: Tue, 23 April 2013 07:39] Report message to a moderator
|
|
|
| Re: Cannot find class in reference model [message #1048343 is a reply to message #1047563] |
Wed, 24 April 2013 06:29  |
Gunnar Arndt Messages: 46 Registered: June 2012 |
Member |
|
|
SOLVED: I had accidently used an exclamation mark in a binding's name:
rule bla() {
to
otxIfConditionalFlow: otx!ConditionalFlow (
condition <- otx!ConditionHeader -- Wouldn't this better be rejected by the compiler?
),
otxConditionHeader: otx!ConditionHeader (
)
do {
otxIfConditionalFlow;
}
}
That prevented the instantiation of otx!ConditionHeader everywhere in the module.
|
|
|
Powered by
FUDForum. Page generated in 0.01489 seconds