Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » MWE and Check language
MWE and Check language [message #1052637] Tue, 30 April 2013 10:33 Go to next message
Dhanya M is currently offline Dhanya MFriend
Messages: 19
Registered: April 2013
Junior Member
Hi,

I have 2 ecores in my project having the same contexts in it with same namespace. I want to validate based on one of the ecores. I use a check language and write workflow files to validate.

My workflow file:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<workflow>
<component class="org.eclipse.xtend.check.CheckComponent">
<metaModel class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
<modelFile value="actual path of the ecore"/>
</metaModel>
<emfAllChildrenSlot value="model"/>
<checkFile value="CheckFile"/>
</component>
</workflow>

When i gave a relative path to my ecore, it was not able to find it. When i gave the actual path of the ecore workflow file executed. However it was not reporting any issues as it used to when there was only one ecore.

How can i be sure that it picks the correct ecore and validate?
I suppose it has something to do with same context names and same namespace. How can i resolve this?
Re: MWE and Check language [message #1053474 is a reply to message #1052637] Mon, 06 May 2013 08:05 Go to previous message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 762
Registered: July 2009
Location: Dortmund, Germany
Senior Member

First, there is no setter "modelFile" in type EmfMetaModel, it must be "metaModelFile".

The relative path should work when it is relative to the classpath root. Otherwise "metaModelFile" must be a URI string.

You can be sure that the right Ecore metamodel is used just by the fact that it can be located through the URI you are passing. If the file does not exist, you will notice an error.

Since your metaModel is local to the CheckComponent defined you can be sure that this EmfMetaModel instance will be another one than if you define a second CheckComponent. Each CheckComponent will use a different execution context.

Regards,
~Karsten


Need professional support for Xtext, EMF, Eclipse IDE?
Go to: http://devhub.karakun.com
Twitter : @kthoms
Blog : www.karsten-thoms.de

[Updated on: Mon, 06 May 2013 08:12]

Report message to a moderator

Previous Topic:[Xpand/Xtend] Check File problem
Next Topic:[Acceleo] How to get a default value of EnumerationLiteral attribute and how to get a target name of
Goto Forum:
  


Current Time: Thu Apr 25 11:11:51 GMT 2024

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

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

Back to the top