Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » UI model validation
UI model validation [message #1052937] Wed, 01 May 2013 09:32 Go to next message
David Apltauer is currently offline David Apltauer
Messages: 10
Registered: January 2013
Junior Member
Currently I have some validation in the main project which the UI project interprets as markers. I would like move that validation from the main project to the UI project, so that the parser is not concerned about it. Also I would like to add validations which need some data from preferences, so these have to be in the UI project as well, aimed to enrich the UI experience. What is the best way to plug in several model validations (preferably separate) which would get the marker-displaying support of Xtext?

David
Re: UI model validation [message #1052939 is a reply to message #1052937] Wed, 01 May 2013 09:40 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6125
Registered: July 2009
Senior Member
Hi,

simply adding a binding similar to the one in the runtimemodule to the ui module doesnt work?
Re: UI model validation [message #1052957 is a reply to message #1052939] Wed, 01 May 2013 10:49 Go to previous messageGo to next message
David Apltauer is currently offline David Apltauer
Messages: 10
Registered: January 2013
Junior Member
Thank you, it does! I didn't hope for it to ba that easy. It is not possible to bind multiple validators though. Also is there way to set when or how often the validation should be performed?
Re: UI model validation [message #1052971 is a reply to message #1052957] Wed, 01 May 2013 12:11 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6125
Registered: July 2009
Senior Member
@Check(CheckType)
Re: UI model validation [message #1053027 is a reply to message #1052957] Thu, 02 May 2013 02:15 Go to previous message
Alexander Nittka is currently offline Alexander Nittka
Messages: 1151
Registered: July 2009
Senior Member
Hi,

as to multiple validators. You can let your UI-Validator extend the regular one and you can use the ComposedCheck annotation for "registering" further validator classes.

Alex


Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext@itemis.de
Previous Topic:data binding beteen xtext and swt
Next Topic:How to limit content assist according to scoping
Goto Forum:
  


Current Time: Tue Jul 22 03:30:08 EDT 2014

Powered by FUDForum. Page generated in 1.34169 seconds