|
|
Re: Model change validation [message #1696451 is a reply to message #1695779] |
Tue, 26 May 2015 14:20 |
Esteban Dugueperoux Messages: 472 Registered: July 2009 |
Senior Member |
|
|
Hi Bernhard,
If you want to react to model changes to do other model changes, you can
use a precommit listener [1] and if the changes doesn't comply to your
validation rules you can throw a RollbackException to have changes undone.
[1]
http://download.eclipse.org/modeling/emf/transaction/javadoc/1.1.3/org/eclipse/emf/transaction/ResourceSetListener.html
[2]
http://www-01.ibm.com/support/knowledgecenter/SSCLKU_7.5.5/com.ibm.xtools.modeler.doc.isv/prog-guide/listening.html
Le 19/05/2015 15:08, Bernhard Edler a écrit :
> I am using Sirius with an Xtext DSL. In the event of changes to the semantic model, I need to be able to manually validate the change and, if necessary add my own subsequent changes to the model.
>
> E.g. if the datatype of an attribute in my class diagram is set or changed (see attached picture), I need to make sure the containing package is aware of the datatype or, if not, manually imports it.
>
> How can I access these changes programmatically and perform my validations/additions?
>
>
> regards,
>
> Bernhard
>
--
Esteban Dugueperoux - Obeo
Need professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
Powered by
FUDForum. Page generated in 0.03368 seconds