Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Ecore Tools » Interdependent attributes
Interdependent attributes [message #552874] Fri, 13 August 2010 23:06
Amit  is currently offline Amit Friend
Messages: 3
Registered: July 2009
Junior Member
Hi,

I have two int attributes A and B in my EMF model which need to follow the rule A + B <= 200. If A is 150 and B is 50 and then A is changed to 155, I want to set B automatically to 45. Similarly if B is changed to 55, A should be changed to 145 automatically.

I currently have all this logic for ensuring the <= 200 rule in my UI code. Is there a way to do this in the model? that is, if A is changed in the model, value of B should be adjusted automatically and vice versa, and also a notification should be sent to the UI when A or B is automatically changed so that the UI can display the new value.

If this can be done, my automated tests will be much simpler because they won't be UI-based any more.

Regards,
Amit
Previous Topic:EMF Serialization/Loading question
Next Topic:Example of EMF-EclipseLink integration
Goto Forum:
  


Current Time: Sat Apr 20 02:09:37 GMT 2024

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

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

Back to the top