Skip to main content


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: 762
Registered: July 2009
Location: Dortmund, Germany
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, EMF, Eclipse IDE?
Go to: http://devhub.karakun.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: Tue Apr 23 16:43:42 GMT 2024

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

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

Back to the top