Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Check] invoke programmatically
[Check] invoke programmatically [message #642428] Wed, 01 December 2010 09:59 Go to next message
Stephan Krusche is currently offline Stephan KruscheFriend
Messages: 18
Registered: August 2010
Location: Munich
Junior Member
How is it possible to invoke all constraints in one (or more) Check file(s) programmatically in Java?

Or is it only possible with an mwe workflow?

Thank you
Stephan
Re: [Check] invoke programmatically [message #642467 is a reply to message #642428] Wed, 01 December 2010 13:18 Go to previous message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 360
Registered: July 2009
Location: Dortmund
Senior Member

You can use the CheckFacade to do this.

	public final static void checkAll(final String checkFile, final Collection<?> toCheck, final ExecutionContext ctx, final Issues issues) 



checkFile: Qualified name of the check file to invoke, like you pass it in MWE
toCheck: Collection of elements
ctx: create an instance of ExecutionContextImpl, maybe look at AbstractExpressionUsingWorkflowComponent#getExecutionContext (). Important: Register the metamodel(s) used.
issues: instance of IssuesImpl

~Karsten


Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @kthoms
Blog : www.karsten-thoms.de
Previous Topic:[Xpand] Changes in 1.1
Next Topic:[Acceleo 3] Run transformation from java code
Goto Forum:
  


Current Time: Sun Dec 21 11:27:24 GMT 2014

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

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