Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [EVL] replace automated messages with mine
[EVL] replace automated messages with mine [message #713553] Mon, 08 August 2011 11:38 Go to next message
Aris  is currently offline Aris
Messages: 14
Registered: July 2011
Junior Member
Hi,

I am using EVL for diagram validation of my GMF editor.

I would like to replace the automated messages of GMF (e.g. the required feature " " must be set) with my own messages. So for example if I have the following class:

class{
attr String[1]name;
}

the validation produce a message as I mentioned above. I want to replace this message(or disable it) and use my own message that I wrote with in my evl file.
Do anyone know if that is possible?

Thanks in advance,

Aris
Re: [EVL] replace automated messages with mine [message #714461 is a reply to message #713553] Wed, 10 August 2011 10:59 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris Kolovos
Messages: 698
Registered: July 2009
Senior Member
Hi Aris,

The messages you mention are produced by the EMF validator. The following post seems to suggest that you need to implement a fragment which overrides the default messages: http://stackoverflow.com/questions/5861948/changing-default-validation-messages

Another option would be to customise your GMF code so that it does not invoke the EMF validator at all - but invokes a custom validator that only evaluates the EVL constraints instead.

Cheers,
Dimitris
Re: [EVL] replace automated messages with mine [message #714748 is a reply to message #714461] Thu, 11 August 2011 08:36 Go to previous messageGo to next message
Aris  is currently offline Aris
Messages: 14
Registered: July 2011
Junior Member
Hi Dimitris,

Thanks for the reply.

The option to not invoke the emf validator at all sounds good. Do you have any idea how that will be possible?

Thanks,

Aris
Re: [EVL] replace automated messages with mine [message #714760 is a reply to message #714748] Thu, 11 August 2011 08:59 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris Kolovos
Messages: 698
Registered: July 2009
Senior Member
Hi Aris,

Unfortunately, I haven't done this before so I too would have to investigate. I think I'd start by looking at the generated ValidateAction class.

Cheers,
Dimitris
Re: [EVL] replace automated messages with mine [message #716094 is a reply to message #714760] Tue, 16 August 2011 08:53 Go to previous message
Aris  is currently offline Aris
Messages: 14
Registered: July 2011
Junior Member
Hi Dimitris,

Unfortunately I didn't have time to solve it.
I posted a similar question to GMF forum. I put the link here with the answer I got if someone is interested in(despite the suggestion there is how to change the default messages, no disable them).

http://www.eclipse.org/forums/index.php/t/234205/



Thanks,

Aris
Previous Topic:cannot be read the detail 'width' from the ecore file using EOL
Next Topic:using the trim() on Strings
Goto Forum:
  


Current Time: Thu Apr 17 11:41:07 EDT 2014

Powered by FUDForum. Page generated in 0.01717 seconds