Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Validation in gmf
Validation in gmf [message #713953] Tue, 09 August 2011 09:36 Go to next message
Eclipse UserFriend
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 14:12 Go to previous messageGo to next message
Eclipse UserFriend
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 15:17 Go to previous messageGo to next message
Eclipse UserFriend
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 16:57 Go to previous message
Eclipse UserFriend
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: Mon Jul 14 10:58:30 EDT 2025

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

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

Back to the top