Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Validation in gmf
Validation in gmf [message #713953] Tue, 09 August 2011 13:36 Go to next message
Aris  is currently offline Aris Friend
Messages: 14
Registered: July 2011
Junior Member
Hi,

I am using the validation feature of gmf, to validate my diagram.
I would like to disable/replace the automated messages are produced such as "the required feature " " must be set".

Does anyone know if that is possible?

Thanks in advance,

Aris
Re: Validation in gmf [message #714066 is a reply to message #713953] Tue, 09 August 2011 18:12 Go to previous messageGo to next message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 393
Registered: November 2009
Senior Member
To change these messages I created a fragment for org.eclipse.emf.ecore and called it org.eclipse.emf.ecore.nl1. In there I created properties file plugin_en.properties which is a copy of plugin.properties from o.e.emf.ecore and changed values for keys that I wanted (_UI_RequiredFeatureMustBeSet_diagnostic, etc). When eclipse starts up it will see this fragment and load plugin_en.properties for your EN locale (of course you need to create plugin_{your_locale}.properties for your default language.)

Keep in mind that this will only change wording of the message. Substitutions for {0}...{n} will not change and will be still replaced with you feature names.

Alex
Re: Validation in gmf [message #714091 is a reply to message #714066] Tue, 09 August 2011 19:17 Go to previous messageGo to next message
Aris  is currently offline Aris Friend
Messages: 14
Registered: July 2011
Junior Member
Hi Alex,

thanks for the reply.

I need to completely disable these messages.
I produce my own messages by using the Epsilon Validation Language(part of epsilon project). The problem is that I get both my messages and emf default messages for the same errors.

Do you know if it's possible to disable them completely?

Thanks,

Aris

Re: Validation in gmf [message #714125 is a reply to message #714091] Tue, 09 August 2011 20:57 Go to previous message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 393
Registered: November 2009
Senior Member
Are the keys the same for EVL and EMF Validation? If they are you can't use fragment of the emf core plugin? Another way to change messages without creating language fragment is to extended EObjectValidator which Ed suggested when I originally asked question you have http://www.eclipse.org/forums/index.php/m/667919/#msg_667919. But I didn't go via that route because fragment was sufficient for my needs.

Alex
Previous Topic:[GMFgraph] Compartments
Next Topic:How to react to graphical changes/events in the diagram without manipulating generated code
Goto Forum:
  


Current Time: Fri Dec 19 03:15:13 GMT 2014

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

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