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".
Alex Kravets Messages: 340 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.
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?
Alex Kravets Messages: 340 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.