Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » Cannot find class in reference model
Cannot find class in reference model [message #1047563] Tue, 23 April 2013 11:38 Go to next message
Gunnar Arndt is currently offline Gunnar ArndtFriend
Messages: 57
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:
    http://i37.tinypic.com/317fy3r.png
    * HMI:
    http://i33.tinypic.com/w9ius0.png


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 11: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 10:29 Go to previous message
Gunnar Arndt is currently offline Gunnar ArndtFriend
Messages: 57
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.
Previous Topic:foreach
Next Topic:UM2L to UML2: don't want to transform certain Generalizations and Associations
Goto Forum:
  


Current Time: Wed Nov 26 05:56:11 GMT 2014

Powered by FUDForum. Page generated in 0.01714 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software