Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Aspect Orientet Programming (AOP) using reflective feature delegation?
Aspect Orientet Programming (AOP) using reflective feature delegation? [message #423638] Fri, 03 October 2008 17:15 Go to next message
Michael Scharf is currently offline Michael ScharfFriend
Messages: 301
Registered: July 2009
Senior Member
Hi,

given a dynamic model or a generated model with "feature delegation"
set to "Reflective". In both cases, overriding, the eGet, eSet etc
methods in the base class allow you to intercept the set/get calls.

That opens the door for aspect oriented programming! That
means you can intercept the set and get methods and create
advices like "around".

My question is: is there already some code/project that does
AOP for EMF using reflective feature delegation?


Michael
--
Michael Scharf
Wind River Systems GmbH
http://www.WindRiver.com
http://MichaelScharf.blogspot.com/
Re: Aspect Orientet Programming (AOP) using reflective feature delegation? [message #423639 is a reply to message #423638] Fri, 03 October 2008 17:30 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31486
Registered: July 2009
Senior Member
Michael,

Comments below.


Michael Scharf wrote:
> Hi,
>
> given a dynamic model or a generated model with "feature delegation"
> set to "Reflective". In both cases, overriding, the eGet, eSet etc
> methods in the base class allow you to intercept the set/get calls.
Note that we added a new pattern "Dynamic" in EMF 2.5 that accomplishes
the same goal, but still delegates through tailorable getX methods.
>
> That opens the door for aspect oriented programming! That
> means you can intercept the set and get methods and create
> advices like "around".
CDO makes good use of this type of thing too...
>
> My question is: is there already some code/project that does
> AOP for EMF using reflective feature delegation?
Eike did some stuff with AOP for legacy models with CDO, but I don't
know of anyone else.
>
>
> Michael


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Aspect Orientet Programming (AOP) using reflective feature delegation? [message #423640 is a reply to message #423639] Fri, 03 October 2008 18:06 Go to previous messageGo to next message
Michael Scharf is currently offline Michael ScharfFriend
Messages: 301
Registered: July 2009
Senior Member
Cool, then I'll take a look at 2.5 and at CDO.

Michael

Ed Merks wrote:
> Michael,
> Michael Scharf wrote:
>> Hi,
>>
>> given a dynamic model or a generated model with "feature delegation"
>> set to "Reflective". In both cases, overriding, the eGet, eSet etc
>> methods in the base class allow you to intercept the set/get calls.
> Note that we added a new pattern "Dynamic" in EMF 2.5 that accomplishes
> the same goal, but still delegates through tailorable getX methods.
>>
>> That opens the door for aspect oriented programming! That
>> means you can intercept the set and get methods and create
>> advices like "around".
> CDO makes good use of this type of thing too...
>>
>> My question is: is there already some code/project that does
>> AOP for EMF using reflective feature delegation?
> Eike did some stuff with AOP for legacy models with CDO, but I don't
> know of anyone else.
>>
>>
>> Michael


--
Michael Scharf
Wind River Systems GmbH
http://www.WindRiver.com
http://MichaelScharf.blogspot.com/
Re: Aspect Orientet Programming (AOP) using reflective feature delegation? [message #423641 is a reply to message #423639] Fri, 03 October 2008 18:11 Go to previous messageGo to next message
Michael Scharf is currently offline Michael ScharfFriend
Messages: 301
Registered: July 2009
Senior Member
Ed,

> Note that we added a new pattern "Dynamic" in EMF 2.5 that accomplishes
> the same goal, but still delegates through tailorable getX methods.

Is there any documentation or bug report to learn more about that
feature?

Michael
--
Michael Scharf
Wind River Systems GmbH
http://www.WindRiver.com
http://MichaelScharf.blogspot.com/
Re: Aspect Orientet Programming (AOP) using reflective feature delegation? [message #423642 is a reply to message #423641] Fri, 03 October 2008 18:24 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31486
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------050904020906090205080802
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Michael,

I know it's really hard to find what you need among all the copious
documentation we provide

https://bugs.eclipse.org/bugs/show_bug.cgi?id=232414


But there was a bug that was fixed in this week's I-build. It's
basically the same pattern as always, eGet(<x>) calls getX but rather
than return a variable, it calls eDynamicGet(<x>). So the net effect is
exactly the same, but by filtering through the generated method, it's
easier to override the behavior.


Michael Scharf wrote:
> Ed,
>
>> Note that we added a new pattern "Dynamic" in EMF 2.5 that
>> accomplishes the same goal, but still delegates through tailorable
>> getX methods.
>
> Is there any documentation or bug report to learn more about that
> feature?
>
> Michael

--------------050904020906090205080802
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Michael,<br>
<br>
I know it's really hard to find what you need among all the copious
documentation we provide<br>
<blockquote><a
href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=232414">https://bugs.eclipse.org/bugs/show_bug.cgi?id=232414</a><br>
</blockquote>
<br>
But there was a bug that was fixed in this week's I-build.&nbsp; It's
basically the same pattern as always, eGet(&lt;x&gt;) calls getX but
rather than return a variable, it calls eDynamicGet(&lt;x&gt;).&nbsp; So the
net effect is exactly the same, but by filtering through the generated
method, it's easier to override the behavior.<br>
<br>
<br>
Michael Scharf wrote:
<blockquote cite="mid:gc5n7o$4hb$2@build.eclipse.org" type="cite">Ed,
<br>
<br>
<blockquote type="cite">Note that we added a new pattern "Dynamic" in
EMF 2.5 that accomplishes the same goal, but still delegates through
tailorable getX methods.
<br>
</blockquote>
<br>
Is there any documentation or bug report to learn more about that
<br>
feature?
<br>
<br>
Michael
<br>
</blockquote>
</body>
</html>

--------------050904020906090205080802--


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[Teneo] upper case on only some generated column names
Next Topic:How to write an EMF model which has to implemment an external Java interface
Goto Forum:
  


Current Time: Mon Sep 28 22:20:04 GMT 2020

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

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

Back to the top