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] by Moderator