Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How invoke .chk / CheckComponent from MWE2(How invoke .chk file / CheckComponent from MWE2)
How invoke .chk / CheckComponent from MWE2 [message #627914] Thu, 23 September 2010 07:06 Go to next message
Hendrik Jan van Randen is currently offline Hendrik Jan van RandenFriend
Messages: 11
Registered: July 2009
Location: Netherlands
Junior Member
Where can I find an example of invoking a .chk file through the CheckComponent from an MWE2 workflow?

Hendrik Jan
Re: How invoke .chk / CheckComponent from MWE2 [message #628850 is a reply to message #627914] Fri, 24 September 2010 12:39 Go to previous messageGo to next message
Meinte Boersma is currently offline Meinte BoersmaFriend
Messages: 434
Registered: July 2009
Location: Leiden, Netherlands
Senior Member
Afaik, that hasn't changed from earlier versions, of course apart from the MWE2 syntax. It would quite probably look something very much like this:
	component = org.eclipse.xtend.check.CheckComponent {
		checkFile = "blah"	// without .chk
		metaModel = org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel {}
		emfAllChildrenSlot = "modelSlot"
	}


Re: How invoke .chk / CheckComponent from MWE2 [message #629520 is a reply to message #628850] Tue, 28 September 2010 14:59 Go to previous message
Hendrik Jan van Randen is currently offline Hendrik Jan van RandenFriend
Messages: 11
Registered: July 2009
Location: Netherlands
Junior Member
Thank you Meinte, your hint got me started!

The following works fine in the xtext hello world example project:

In the mwe2 file:

component = org.eclipse.xtend.check.CheckComponent {
checkFile = "templates::NewCheckFile"
metaModel = org.eclipse.xtend.type.impl.java.JavaBeansMetaModel {}
metaModel = org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel {}
expression = "greetings"
}


In the .chk file:

import org::xtext::example::mydsl::myDsl;

context Greeting WARNING "You can't greet the whole world unless you're a spammer" :
name != "world";
Previous Topic:"Partial" Formatting
Next Topic:Integration of the editor
Goto Forum:
  


Current Time: Mon Sep 23 22:54:49 GMT 2024

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

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

Back to the top