Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 14:07 Go to next message
Kosala Yapa is currently offline Kosala YapaFriend
Messages: 159
Registered: September 2010
Senior Member
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 15:33 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
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


Ed Merks
Professional Support: https://www.macromodeling.com/
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 09:19 Go to previous messageGo to next message
Kosala Yapa is currently offline Kosala YapaFriend
Messages: 159
Registered: September 2010
Senior Member
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 11:50 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
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


Ed Merks
Professional Support: https://www.macromodeling.com/
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 13:47 Go to previous messageGo to next message
Kosala Yapa is currently offline Kosala YapaFriend
Messages: 159
Registered: September 2010
Senior Member
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 13:48]

Report message to a 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 14:01 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
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
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[EMF] Change volatile and transient properties
Next Topic:Using eKey
Goto Forum:
  


Current Time: Sat Apr 20 03:45:52 GMT 2024

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

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

Back to the top