Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [EVL] Custom validation messages
[EVL] Custom validation messages [message #1048451] Wed, 24 April 2013 09:44 Go to next message
Tina Martin is currently offline Tina Martin
Messages: 4
Registered: March 2013
Junior Member
Hi!

I would like to know if there is any configuration option which disabled automatic validation messages. It means, those messages included in plugin.properties of org.eclipse.emf.ecore. I would like to show my own custom messages when validating a model, and it shows only those messages defined in that .properties file.

Thanks!

Tina.
Re: [EVL] Custom validation messages [message #1048533 is a reply to message #1048451] Wed, 24 April 2013 12:00 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris Kolovos
Messages: 794
Registered: July 2009
Senior Member
Hi Tina,

I'm not sure I fully understand your question. Could you please elaborate a bit more?

Cheers,
Dimitris
Re: [EVL] Custom validation messages [message #1048568 is a reply to message #1048533] Wed, 24 April 2013 13:00 Go to previous messageGo to next message
Tina Martin is currently offline Tina Martin
Messages: 4
Registered: March 2013
Junior Member
Hi Dimitris,

I have defined some .evl constraints defined with its respective error messages, but when I validate a model also appears those errors due to cardinalities. What I need is to know f there is any option to ignore those messages and only show the messages that I have defined in the .evl. For example, I don't want to show messages like this: "The feature xxx of xxx have 0 values and must have at least 1.

Thanks!
Re: [EVL] Custom validation messages [message #1049023 is a reply to message #1048568] Thu, 25 April 2013 04:43 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris Kolovos
Messages: 794
Registered: July 2009
Senior Member
Hi Tina,

To do this you'd need to un-register/suppress the built-in EMF validation rules programmatically (through EValidator.Registry.INSTANCE) but it's not clear why you would want to do this given that these are legitimate error messages. Would it be an option to relax your metamodel instead (i.e. so that it doesn't impose the > 0 constraint)?

Cheers,
Dimitris
Re: [EVL] Custom validation messages [message #1049198 is a reply to message #1049023] Thu, 25 April 2013 09:52 Go to previous messageGo to next message
Tina Martin is currently offline Tina Martin
Messages: 4
Registered: March 2013
Junior Member
Hi Dimitris,

I want to do that to show my own messages for errors related with cardinalities. I mean, I want to show my messages, not the default messages.
Re: [EVL] Custom validation messages [message #1049772 is a reply to message #1049198] Fri, 26 April 2013 04:55 Go to previous message
Dimitris Kolovos is currently offline Dimitris Kolovos
Messages: 794
Registered: July 2009
Senior Member
Hi Tina,

I'm afraid there's no way to do this using EVL at the moment but please feel free to file an enhancement request and we'll have a look at this.

https://bugs.eclipse.org/bugs/enter_bug.cgi?product=EMFT.Epsilon

Cheers,
Dimitris
Previous Topic:Generated Compile Errors
Next Topic:[EGL] Arrays in Epsilon?
Goto Forum:
  


Current Time: Tue Jul 22 15:44:06 EDT 2014

Powered by FUDForum. Page generated in 0.02812 seconds