Skip to main content



      Home
Home » Modeling » EMF » Can trigger a method call for an attribute change in an EMF model?
Can trigger a method call for an attribute change in an EMF model? [message #1059569] Mon, 20 May 2013 10:07 Go to next message
Eclipse UserFriend
Hi there,

Can I trigger a method call for an attribute change in an EMF model?

I need to call a validation method for an EMF attribute change. I am just wondering, if this type of functionality is possible with EMF models?

Any idea/help is appreciated.

Cheers,
Kosala
Re: Can trigger a method call for an attribute change in an EMF model? [message #1059586 is a reply to message #1059569] Mon, 20 May 2013 11:33 Go to previous messageGo to next message
Eclipse UserFriend
Kosala,

You can add an adapter to any EObject and listen for changes. Your
question is without much context though. What will this validation do?
How is the result of the validation used in the tool?


On 20/05/2013 4:07 PM, Kosala Yapa wrote:
> Hi there,
>
> Can I trigger a method call for an attribute change in an EMF model?
>
> I need to call a validation method for an EMF attribute change. I am
> just wondering, if this type of functionality is possible with EMF
> models?
>
> Any idea/help is appreciated.
>
> Cheers,
> Kosala
Re: Can trigger a method call for an attribute change in an EMF model? [message #1060728 is a reply to message #1059586] Tue, 28 May 2013 05:19 Go to previous messageGo to next message
Eclipse UserFriend
Hi Ed,

Thanks.

Attribute changes in an EMF model need to trigger OCL rules validation. OCL rules validate EMF model for changed attributes, and error results(if available) are displayed on the tool.

Cheers,
Kosala
Re: Can trigger a method call for an attribute change in an EMF model? [message #1060769 is a reply to message #1060728] Tue, 28 May 2013 07:50 Go to previous messageGo to next message
Eclipse UserFriend
Kosala,

The latest version of EMF supports generating a live validator that will
revalidate all the instrinct constraints in the model after each command
stack execution. It's possible to expression such constraints using
OCL; you can look at that project's documentation.


On 28/05/2013 11:19 AM, Kosala Yapa wrote:
> Hi Ed,
>
> Thanks.
>
> Attribute changes in an EMF model need to trigger OCL rules
> validation. OCL rules validate EMF model for changed attributes, and
> error results(if available) are displayed on the tool.
>
> Cheers,
> Kosala
Re: Can trigger a method call for an attribute change in an EMF model? [message #1061011 is a reply to message #1060769] Wed, 29 May 2013 09:47 Go to previous messageGo to next message
Eclipse UserFriend
Thanks a mil.

Could you please send me the link of the document?
I am using eclipse Indigo 3.7.

Cheers,
Kosala

[Updated on: Wed, 29 May 2013 09:48] by Moderator

Re: Can trigger a method call for an attribute change in an EMF model? [message #1061015 is a reply to message #1061011] Wed, 29 May 2013 10:01 Go to previous message
Eclipse UserFriend
Kosala,

You'd need to install a Kepler version of EMF. I think that would
install into Indigo...

There's no documentation other than my blog:
http://ed-merks.blogspot.de/2013/01/decorating-with-emf.html


On 29/05/2013 3:47 PM, Kosala Yapa wrote:
> Thanks a mil.
>
> Could you please send me the link for the document?
> I am using eclipse Indigo 3.7.
>
> Cheers,
> Kosala
>
>
Previous Topic:[EMF] Change volatile and transient properties
Next Topic:Using eKey
Goto Forum:
  


Current Time: Wed Jul 30 11:39:13 EDT 2025

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

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

Back to the top