Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » EMF Model to .mydsl file Validation
EMF Model to .mydsl file Validation [message #1718749] Tue, 29 December 2015 18:08 Go to next message
Abedhl Mhnugi is currently offline Abedhl MhnugiFriend
Messages: 2
Registered: December 2015
Junior Member
Hey,

I try to save an EMF object model to a .mydsl file but the validation (written in Xtend) fails and will not be called. I use the Injector from the StandaloneSetup to get a ResourceSet and the XtextResource. But when I call save() on the XtextResource it just saves the invalid .mydsl file.

My validator basically checks if every name of an element starts in uppercase and tested this using the ValidatorTestHelper.


Is there anything other I have to do that the validator in Xtend is called when I try to save a resource?

Thanks and regards.

[Updated on: Tue, 29 December 2015 22:48]

Report message to a moderator

Re: EMF Model to .mydsl file Validation [message #1718755 is a reply to message #1718749] Tue, 29 December 2015 19:35 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
no it will not be called. you have to call it yourself (as described in the docs - Validating Manually)

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: EMF Model to .mydsl file Validation [message #1718757 is a reply to message #1718755] Tue, 29 December 2015 19:39 Go to previous message
Abedhl Mhnugi is currently offline Abedhl MhnugiFriend
Messages: 2
Registered: December 2015
Junior Member
Christian Dietrich wrote on Tue, 29 December 2015 19:35
no it will not be called. you have to call it yourself (as described in the docs - Validating Manually)

This seems to be pretty useful. I will try it out tomorrow - thank you! Smile

[Updated on: Tue, 29 December 2015 19:40]

Report message to a moderator

Previous Topic:UI Tests fail on Mac
Next Topic:Export DSL plug-in or IDE with Xtext 2.9
Goto Forum:
  


Current Time: Fri Mar 29 08:01:15 GMT 2024

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

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

Back to the top