Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] volatile and derived feature
[CDO] volatile and derived feature [message #545220] Wed, 07 July 2010 08:53 Go to next message
Nils Israel is currently offline Nils IsraelFriend
Messages: 72
Registered: May 2010
Member
Hi,

I have an Ecode model with classes with some volatile and derived
features. Without CDO I would
set the feature delegation method to 'none' and would override the
generated getter methods. But since I am using CDO, which
requires 'reflective' feature delegation method this doesn't work.

Where is the correct place to compute the value of the derived feature?

Best regards,
Nils Israel
Re: [CDO] volatile and derived feature [message #545238 is a reply to message #545220] Wed, 07 July 2010 09:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ralf.ellner.cs.fau.de

Nils,

> I have an Ecode model with classes with some volatile and derived
> features. Without CDO I would
> set the feature delegation method to 'none' and would override the
> generated getter methods. But since I am using CDO, which
> requires 'reflective' feature delegation method this doesn't work.
>
> Where is the correct place to compute the value of the derived feature?

if you are using EMF 2.5+ you could set feature delegation to 'dynamic'
and implement the generated getter methods. See note at the bottom of
http://wiki.eclipse.org/Preparing_EMF_Models_for_CDO

Best regards, Ralf
Re: [CDO] volatile and derived feature [message #545250 is a reply to message #545220] Wed, 07 July 2010 09:53 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6690
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------070606010808050208010801
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Hi Nils,

Derived features should be declared transient so that they don't get stored somewhere. It may be the case that the EMF generator generates reflective delegation code into the getters for transient features, but you can just replace that code with your computation.

Cheers
/Eike

Contact: http://www.esc-net.de Blogger <http://thegordian.blogspot.com>Twitter <http://twitter.com/eikestepper>Linkedin <http://de.linkedin.com/in/eikestepper>Xing <http://www.xing.com/profile/Eike_Stepper>
Article: What exactly is inside that p2 repository? < http://thegordian.blogspot.com/2010/05/what-exactly-is-insid e-that-p2.html>


Am 07.07.2010 10:53, schrieb Nils Israel:
> Hi,
>
> I have an Ecode model with classes with some volatile and derived features. Without CDO I would
> set the feature delegation method to 'none' and would override the generated getter methods. But since I am using CDO, which
> requires 'reflective' feature delegation method this doesn't work.
>
> Where is the correct place to compute the value of the derived feature?
>
> Best regards,
> Nils Israel
>

--------------070606010808050208010801
Content-Type: multipart/related;
boundary="------------080506060105030900010906"


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

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Nils,<br>
<br>
Derived features should be declared transient so that they don't get
stored
<meta content="text/html; charset=ISO-8859-15"
http-equiv="Content-Type">
<meta content="text/html; charset=ISO-8859-15"
http-equiv="Content-Type">
somewhere. It may be the case that the EMF generator generates
reflective delegation code into the getters for transient features,
but you can just replace that code with your computation.<br>
<br>
<!--WISESTAMP_SIG_75665_START--><span style="color: black;">
<div dir="ltr">
<div>Cheers
<br>
/Eike
<br>
<br>
</div>
<div style="padding: 5px 0pt; font-family: arial,sans-serif;
font-size: 13.3px;"><span style="color: gray;">Contact: <a
href="http://www.esc-net.de">http://www.esc-net.de</a></span>
<a href="http://thegordian.blogspot.com" style="padding: 0pt
2px; color: blue; font-size: 10pt;" _service=""><img
src="cid:part1.02010207.05060805@esc-net.de" alt="Blogger"
style="vertical-align: middle; padding-bottom: 5px;"
border="0" height="16" width="16"></a><a
href="http://twitter.com/eikestepper" style="padding: 0pt
2px; color: blue; font-size: 10pt;" _service=""><img
src="cid:part2.02040808.06030808@esc-net.de" alt="Twitter"
style="vertical-align: middle; padding-bottom: 5px;"
border="0" height="16" width="16"></a><a
href="http://de.linkedin.com/in/eikestepper" style="padding:
0pt 2px; color: blue; font-size: 10pt;" _service=""><img
src="cid:part3.08030908.00070809@esc-net.de"
alt="Linkedin" style="vertical-align: middle;
padding-bottom: 5px;" border="0" height="16" width="16"></a><a
href="http://www.xing.com/profile/Eike_Stepper"
style="padding: 0pt 2px; color: blue; font-size: 10pt;"
_service=""><img
src="cid:part4.08020006.02070403@esc-net.de" alt="Xing"
style="vertical-align: middle; padding-bottom: 5px;"
border="0" height="16" width="16"></a></div>
<div style="color: gray; font-size: 13.3px; padding-bottom:
5px;">Article: <span style="color: blue; text-decoration:
underline;"><a
href=" http://thegordian.blogspot.com/2010/05/what-exactly-is-insid e-that-p2.html"
undefined="">What exactly is inside that p2 repository?</a></span></div>
</div>
</span><!--WISESTAMP_SIG_75665_END--><br>
<br>
Am 07.07.2010 10:53, schrieb Nils Israel:
<blockquote cite="mid:i11fah$qio$1@build.eclipse.org" type="cite">Hi,
<br>
<br>
I have an Ecode model with classes with some volatile and derived
features. Without CDO I would
<br>
set the feature delegation method to 'none' and would override the
generated getter methods. But since I am using CDO, which
<br>
requires 'reflective' feature delegation method this doesn't work.
<br>
<br>
Where is the correct place to compute the value of the derived
feature?
<br>
<br>
Best regards,
<br>
Nils Israel
<br>
<br>
</blockquote>
</body>
</html>

--------------080506060105030900010906
Content-Type: image/png;
name="blogger.png"
Content-Transfer-Encoding: base64
Content-ID: <part1.02010207.05060805@esc-net.de>
Content-Disposition: inline;
filename="blogger.png"

iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAAK/I NwWK6QAAABl0
RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAADkUExURf9xEv9m AP////9lAP+Q
SP9kAP9jAP9fAP9nAf9vD//x5/9hAP/iz/9iAP9eAP/s4P9vEP9yEv9qAP9q B/+LRP+we/90
I/+RSP/z6/+jZv/y6P+8kP/59f5yE//awf/Ttv9hAf9nAv/17v+4if9sC/9o BP+bWP/r3v/k
0v+wfP+QRv/o2f9gAP+OQ/93HP/l0/+0gv/Rsv/9/P/j0P+pcP+0hf/dx//D m//+/v+td/9o
AP+NQv/Yvf+zgv/x6P/q2/9xG//p2f9pAP/s3//8+fxxE//ex/+AK/9oCP/j 0f/Uuv///4Xw
StcAAABMdFJOU/////////////////////////////////////////////// ////////////
/////////////////////////////////////////wCejeTMAAAAsklEQVR4 2kSP1w6DMBAE
7cMGQg0hvffee++d//+f2IaIeTlppNXtIo88UAjxEIlhjCUG5lwJQuwoulqh FuUGcWGSiTF7
bt40EEoXBKtyIPQS5PffFqyHlhCS2obTK5kDmJ8lXxgA0zsPXer0L3zSUVmI D9ip3SC+hKwQ
2CxCtXYYL25gu1S8bf4jib5fTM+MNE079jom/+KwJUojwnAVifcQ46jM4M23 BHmkEK53iPcT
YACE/Q4KzoVQVwAAAABJRU5ErkJggg==
--------------080506060105030900010906
Content-Type: image/png;
name="twitter.png"
Content-Transfer-Encoding: base64
Content-ID: <part2.02040808.06030808@esc-net.de>
Content-Disposition: inline;
filename="twitter.png"

iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/ AP+gvaeTAAAA
CXBIWXMAAABIAAAASABGyWs+AAAACXZwQWcAAAAQAAAAEABcxq3DAAABxUlE QVQ4y4WTMW4U
QRBFX3X3zoy8FgZphTCYAEg4gAPEYbgBJEgEXIALkHMfAjIwItnAAfLK2JYB r3dmuj7BzI5m
2WBLqqzq//q/fxt9NTmrzo7MCIhgRpWSsaMSgEta5czcjYtWTKPxfALZXTEE 2wmAxLXD11VL
BZy2MAuJB/iuA3oAoJb4lUUCVkAGTM5t06gjATMjBiPFaFsADvx1MTFoBd/q zHkMeLcLgCEe
JqjbrCJ1IAkghGDz20Z/XEzMMMTnZTsSYANMAl7fq7YlZOBaUCCk4WowwyRA mBmL7CxcmwDu
rh+rzKU71YhQ/dnr8VbiaRF4MgmbAAZkxJU7lRk3Wby5W3FcJlbSICAjZjFS jJ42rSXWgoWL
fYPfLvaCMTVxJ0XoJTmQ/stF6GPABDhzcepi7uJ74yQDuXcDErjjGhkwNvHx xCjMOMkCg3eX
S85zyVEMtGt24GWVxvsM5yi3+nBV8/7iBmJv0gaZQMZhNL4cHXBYdDkY7HQL vD0oebVfQuud
a8FGHSAaP1vnpMmbHgDEECwafLq/x8fZlGfJKCVKiapvXLyoEsdl3JYwBMpd uW1YEjlz4aMh
AY+iURiU/Vf/B6EE4kjfs5YLAAAAAElFTkSuQmCC
--------------080506060105030900010906
Content-Type: image/png;
name="linkedin.png"
Content-Transfer-Encoding: base64
Content-ID: <part3.08030908.00070809@esc-net.de>
Content-Disposition: inline;
filename="linkedin.png"

iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/ AP+gvaeTAAAA
CXBIWXMAAABIAAAASABGyWs+AAAACXZwQWcAAAAQAAAAEABcxq3DAAACGklE QVQ4y6WTO2sU
URTHf3dmdp0kTnZJzErSrPjKYqNY2GljodhoLRLB1sLCD2DrZxAsfCAE/AaC grY+SBQSFTSC
xizGzZ3MTiYz92UxY5KNYuOBP+eew/3/73lwxfWHT9yjuR8YL0CwyxygAAPo Cqr0ntFcvjBB
cH++x8WzJzm8v/EnWVdks0PEgNWO95/XePD4HZ4ADk6MAhD6Hs26/08yBjwr ODrZBK0JADyv
LP7GsX2Evse9xR5Lsvgr+XfsO7ctoKwj9AWh7wEQIFCF+3sFGjCmgiJwQFwY Yge3X3cZrwXM
r2SDg9tJ1rokaw1alRXI3NAO61w60AAHTkE7qtNu1PjSUywsb3L60AgjNcHz hZgXb39WApoA
C3FqsIGjMxYC8OZbxlQU0GmFTLdCznWireV0pobYSDKevuzilMZDg0wN/cxu XdrMLVqX53TT
cu3OJ87cmmdlrQBgemoYKTMwqhSI+4Z0QMBhjANgcTnj1UdJHGd8Xc0AmBit Ecu0moGGODH0
h7cF8tyidSmgjSWWG6AUWpkypw1xLwXA4z8tQINcN/T3moEWtLZbr0mZQV5s 55RFJuU8RHR1
1iWtIzQ8nxOtIVCw9D2lWbM06w4ZZ8wtrEJRcLw9TDMUyKRg7kOPSHQR0ZVZ lyRjMDkOOVAU
FfLS57viHRaJLsHM+THuPtuDUgLTW2U0X672t47rrw82vOu/z9w8xS+MkDzV Boy6+QAAAABJ
RU5ErkJggg==
--------------080506060105030900010906
Content-Type: image/png;
name="xing.png"
Content-Transfer-Encoding: base64
Content-ID: <part4.08020006.02070403@esc-net.de>
Content-Disposition: inline;
filename="xing.png"

iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAACXBIWXMAAAsT AAALEwEAmpwY
AAABsklEQVR42mP8//8/AymAEb+G1x9333hU9fffZy52ZTONrQQ0/P7z7sLd hJfvN7Mw80mL
ROkqTodqAIKvv379+fuXhZmZh50dpv7f49dLLt1LYWD4ryRZCETsrJIIDYdu 3y5fu16AizPE
0CTFzgoo8fPXoxPX/T9/v8DHbWCito6LXRHFDw/evnXpm3D39Ws1Eck9xVmy wqLP3/SevlXC
ysKtLtuoJFmMxdObL17ymzqN8S9LnZddua/VrUcWD149FRNwNFFby8oiiEXD itNnImfN5WTi
nBhu7Gvw5OLdiv+MQnqKU6WEI7AE6+vPnx17+68+fmGrJL0wRe/rl/jbL94r isfqKs1kZuJE
1/Dt16/27TtatmzjYeZcnuZpqnDi3J16FmZxYDhKCAViibiVp8+Ur1v39N0H X12DFRkJ33/u
O3LVk+E/i5xYqq7iNCwaXn769PLTZ0ZGBnFePjE+3j9/3155kPvk9XIudgV9 5XnCfI6Ek8a7
T4dO3vD4+++HlHC4kepywhr+/P0ITEIPXk5jZxXTVpgE1EY48X36euHs7fBv P+8CVespzYGH
FSOpyRsAAuDh4a3m5z0AAAAASUVORK5CYII=
--------------080506060105030900010906--

--------------070606010808050208010801--


Re: [CDO] volatile and derived feature [message #545251 is a reply to message #545238] Wed, 07 July 2010 09:56 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6690
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------010104060408080101060800
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Hi Ralf,

You're generally right about the dynamic feature delegation, but I suspect (and hope) that Nils really wants to replace the whole getter logic without persisting anything for the derived features.

Cheers
/Eike

Contact: http://www.esc-net.de Blogger <http://thegordian.blogspot.com>Twitter <http://twitter.com/eikestepper>Linkedin <http://de.linkedin.com/in/eikestepper>Xing <http://www.xing.com/profile/Eike_Stepper>
Article: What exactly is inside that p2 repository? < http://thegordian.blogspot.com/2010/05/what-exactly-is-insid e-that-p2.html>


Am 07.07.2010 11:46, schrieb Ralf Ellner:

> Nils,
>
>> I have an Ecode model with classes with some volatile and derived
>> features. Without CDO I would
>> set the feature delegation method to 'none' and would override the
>> generated getter methods. But since I am using CDO, which
>> requires 'reflective' feature delegation method this doesn't work.
>>
>> Where is the correct place to compute the value of the derived feature?
> if you are using EMF 2.5+ you could set feature delegation to 'dynamic'
> and implement the generated getter methods. See note at the bottom of
> http://wiki.eclipse.org/Preparing_EMF_Models_for_CDO
>
> Best regards, Ralf

--------------010104060408080101060800
Content-Type: multipart/related;
boundary="------------070507000001090704010205"


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

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Ralf,<br>
<br>
You're generally right
<meta content="text/html; charset=ISO-8859-15"
http-equiv="Content-Type">
about the dynamic feature delegation, but I suspect (and hope) that
Nils really wants to replace the whole getter logic without
persisting anything for the derived features.<br>
<br>
Cheers
<br>
<span style="color: black;">
<div dir="ltr">
<div>/Eike
<br>
<br>
</div>
<div style="padding: 5px 0pt; font-family: arial,sans-serif;
font-size: 13.3px;"><span style="color: gray;">Contact: <a
href="http://www.esc-net.de">http://www.esc-net.de</a></span>
<a href="http://thegordian.blogspot.com" style="padding: 0pt
2px; color: blue; font-size: 10pt;" _service=""><img
src="cid:part1.01000701.05070901@esc-net.de" alt="Blogger"
style="vertical-align: middle; padding-bottom: 5px;"
border="0" height="16" width="16"></a><a
href="http://twitter.com/eikestepper" style="padding: 0pt
2px; color: blue; font-size: 10pt;" _service=""><img
src="cid:part2.03050507.07080607@esc-net.de" alt="Twitter"
style="vertical-align: middle; padding-bottom: 5px;"
border="0" height="16" width="16"></a><a
href="http://de.linkedin.com/in/eikestepper" style="padding:
0pt 2px; color: blue; font-size: 10pt;" _service=""><img
src="cid:part3.03060909.07070900@esc-net.de"
alt="Linkedin" style="vertical-align: middle;
padding-bottom: 5px;" border="0" height="16" width="16"></a><a
href="http://www.xing.com/profile/Eike_Stepper"
style="padding: 0pt 2px; color: blue; font-size: 10pt;"
_service=""><img
src="cid:part4.02000903.02010206@esc-net.de" alt="Xing"
style="vertical-align: middle; padding-bottom: 5px;"
border="0" height="16" width="16"></a></div>
<div style="color: gray; font-size: 13.3px; padding-bottom:
5px;">Article: <span style="color: blue; text-decoration:
underline;"><a
href=" http://thegordian.blogspot.com/2010/05/what-exactly-is-insid e-that-p2.html"
undefined="">What exactly is inside that p2 repository?</a></span></div>
</div>
</span><!--WISESTAMP_SIG_70323_END--><br>
<br>
Am 07.07.2010 11:46, schrieb Ralf Ellner:
<meta content="text/html; charset=ISO-8859-15"
http-equiv="Content-Type">
<br>
<!--WISESTAMP_SIG_70323_START--><span style="color: black;">
<div dir="ltr">
<div></div>
</div>
</span><br>
<blockquote cite="mid:i11ide$pua$1@build.eclipse.org" type="cite">
<pre wrap="">Nils,

</pre>
<blockquote type="cite">
<pre wrap="">I have an Ecode model with classes with some volatile and derived
features. Without CDO I would
set the feature delegation method to 'none' and would override the
generated getter methods. But since I am using CDO, which
requires 'reflective' feature delegation method this doesn't work.

Where is the correct place to compute the value of the derived feature?
</pre>
</blockquote>
<pre wrap="">
if you are using EMF 2.5+ you could set feature delegation to 'dynamic'
and implement the generated getter methods. See note at the bottom of
<a class="moz-txt-link-freetext" href="http://wiki.eclipse.org/Preparing_EMF_Models_for_CDO">http://wiki.eclipse.org/Preparing_EMF_Models_for_CDO</a>.

Best regards, Ralf
</pre>
</blockquote>
</body>
</html>

--------------070507000001090704010205
Content-Type: image/png;
name="blogger.png"
Content-Transfer-Encoding: base64
Content-ID: <part1.01000701.05070901@esc-net.de>
Content-Disposition: inline;
filename="blogger.png"

iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAAK/I NwWK6QAAABl0
RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAADkUExURf9xEv9m AP////9lAP+Q
SP9kAP9jAP9fAP9nAf9vD//x5/9hAP/iz/9iAP9eAP/s4P9vEP9yEv9qAP9q B/+LRP+we/90
I/+RSP/z6/+jZv/y6P+8kP/59f5yE//awf/Ttv9hAf9nAv/17v+4if9sC/9o BP+bWP/r3v/k
0v+wfP+QRv/o2f9gAP+OQ/93HP/l0/+0gv/Rsv/9/P/j0P+pcP+0hf/dx//D m//+/v+td/9o
AP+NQv/Yvf+zgv/x6P/q2/9xG//p2f9pAP/s3//8+fxxE//ex/+AK/9oCP/j 0f/Uuv///4Xw
StcAAABMdFJOU/////////////////////////////////////////////// ////////////
/////////////////////////////////////////wCejeTMAAAAsklEQVR4 2kSP1w6DMBAE
7cMGQg0hvffee++d//+f2IaIeTlppNXtIo88UAjxEIlhjCUG5lwJQuwoulqh FuUGcWGSiTF7
bt40EEoXBKtyIPQS5PffFqyHlhCS2obTK5kDmJ8lXxgA0zsPXer0L3zSUVmI D9ip3SC+hKwQ
2CxCtXYYL25gu1S8bf4jib5fTM+MNE079jom/+KwJUojwnAVifcQ46jM4M23 BHmkEK53iPcT
YACE/Q4KzoVQVwAAAABJRU5ErkJggg==
--------------070507000001090704010205
Content-Type: image/png;
name="twitter.png"
Content-Transfer-Encoding: base64
Content-ID: <part2.03050507.07080607@esc-net.de>
Content-Disposition: inline;
filename="twitter.png"

iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/ AP+gvaeTAAAA
CXBIWXMAAABIAAAASABGyWs+AAAACXZwQWcAAAAQAAAAEABcxq3DAAABxUlE QVQ4y4WTMW4U
QRBFX3X3zoy8FgZphTCYAEg4gAPEYbgBJEgEXIALkHMfAjIwItnAAfLK2JYB r3dmuj7BzI5m
2WBLqqzq//q/fxt9NTmrzo7MCIhgRpWSsaMSgEta5czcjYtWTKPxfALZXTEE 2wmAxLXD11VL
BZy2MAuJB/iuA3oAoJb4lUUCVkAGTM5t06gjATMjBiPFaFsADvx1MTFoBd/q zHkMeLcLgCEe
JqjbrCJ1IAkghGDz20Z/XEzMMMTnZTsSYANMAl7fq7YlZOBaUCCk4WowwyRA mBmL7CxcmwDu
rh+rzKU71YhQ/dnr8VbiaRF4MgmbAAZkxJU7lRk3Wby5W3FcJlbSICAjZjFS jJ42rSXWgoWL
fYPfLvaCMTVxJ0XoJTmQ/stF6GPABDhzcepi7uJ74yQDuXcDErjjGhkwNvHx xCjMOMkCg3eX
S85zyVEMtGt24GWVxvsM5yi3+nBV8/7iBmJv0gaZQMZhNL4cHXBYdDkY7HQL vD0oebVfQuud
a8FGHSAaP1vnpMmbHgDEECwafLq/x8fZlGfJKCVKiapvXLyoEsdl3JYwBMpd uW1YEjlz4aMh
AY+iURiU/Vf/B6EE4kjfs5YLAAAAAElFTkSuQmCC
--------------070507000001090704010205
Content-Type: image/png;
name="linkedin.png"
Content-Transfer-Encoding: base64
Content-ID: <part3.03060909.07070900@esc-net.de>
Content-Disposition: inline;
filename="linkedin.png"

iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/ AP+gvaeTAAAA
CXBIWXMAAABIAAAASABGyWs+AAAACXZwQWcAAAAQAAAAEABcxq3DAAACGklE QVQ4y6WTO2sU
URTHf3dmdp0kTnZJzErSrPjKYqNY2GljodhoLRLB1sLCD2DrZxAsfCAE/AaC grY+SBQSFTSC
xizGzZ3MTiYz92UxY5KNYuOBP+eew/3/73lwxfWHT9yjuR8YL0CwyxygAAPo Cqr0ntFcvjBB
cH++x8WzJzm8v/EnWVdks0PEgNWO95/XePD4HZ4ADk6MAhD6Hs26/08yBjwr ODrZBK0JADyv
LP7GsX2Evse9xR5Lsvgr+XfsO7ctoKwj9AWh7wEQIFCF+3sFGjCmgiJwQFwY Yge3X3cZrwXM
r2SDg9tJ1rokaw1alRXI3NAO61w60AAHTkE7qtNu1PjSUywsb3L60AgjNcHz hZgXb39WApoA
C3FqsIGjMxYC8OZbxlQU0GmFTLdCznWireV0pobYSDKevuzilMZDg0wN/cxu XdrMLVqX53TT
cu3OJ87cmmdlrQBgemoYKTMwqhSI+4Z0QMBhjANgcTnj1UdJHGd8Xc0AmBit Ecu0moGGODH0
h7cF8tyidSmgjSWWG6AUWpkypw1xLwXA4z8tQINcN/T3moEWtLZbr0mZQV5s 55RFJuU8RHR1
1iWtIzQ8nxOtIVCw9D2lWbM06w4ZZ8wtrEJRcLw9TDMUyKRg7kOPSHQR0ZVZ lyRjMDkOOVAU
FfLS57viHRaJLsHM+THuPtuDUgLTW2U0X672t47rrw82vOu/z9w8xS+MkDzV Boy6+QAAAABJ
RU5ErkJggg==
--------------070507000001090704010205
Content-Type: image/png;
name="xing.png"
Content-Transfer-Encoding: base64
Content-ID: <part4.02000903.02010206@esc-net.de>
Content-Disposition: inline;
filename="xing.png"

iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAACXBIWXMAAAsT AAALEwEAmpwY
AAABsklEQVR42mP8//8/AymAEb+G1x9333hU9fffZy52ZTONrQQ0/P7z7sLd hJfvN7Mw80mL
ROkqTodqAIKvv379+fuXhZmZh50dpv7f49dLLt1LYWD4ryRZCETsrJIIDYdu 3y5fu16AizPE
0CTFzgoo8fPXoxPX/T9/v8DHbWCito6LXRHFDw/evnXpm3D39Ws1Eck9xVmy wqLP3/SevlXC
ysKtLtuoJFmMxdObL17ymzqN8S9LnZddua/VrUcWD149FRNwNFFby8oiiEXD itNnImfN5WTi
nBhu7Gvw5OLdiv+MQnqKU6WEI7AE6+vPnx17+68+fmGrJL0wRe/rl/jbL94r isfqKs1kZuJE
1/Dt16/27TtatmzjYeZcnuZpqnDi3J16FmZxYDhKCAViibiVp8+Ur1v39N0H X12DFRkJ33/u
O3LVk+E/i5xYqq7iNCwaXn769PLTZ0ZGBnFePjE+3j9/3155kPvk9XIudgV9 5XnCfI6Ek8a7
T4dO3vD4+++HlHC4kepywhr+/P0ITEIPXk5jZxXTVpgE1EY48X36euHs7fBv P+8CVespzYGH
FSOpyRsAAuDh4a3m5z0AAAAASUVORK5CYII=
--------------070507000001090704010205--

--------------010104060408080101060800--


Re: [CDO] volatile and derived feature [message #545277 is a reply to message #545251] Wed, 07 July 2010 10:45 Go to previous messageGo to next message
Nils Israel is currently offline Nils IsraelFriend
Messages: 72
Registered: May 2010
Member
Hi Ralf and Eike,

@Ralf you were right, it works with dynamic feature delegation, thanks.

@Eike The way you described in the other post is the way I tried before.
I just replaced the generated code with my own. I am using databinding
to update the textfields but the textfield of the derived feature
doesn't get updated since the databinding code uses the eGet method
instead of my own getter.
And you were right, I don't want to persist the computed value. The
feature ist flagged as: derived, volatile and transient. (BTW: whats the
difference between volatile and transient?)

Could you explain what is wrong about using dynamic feature delegation
and overriding the getter method?

Thanks,
Nils

Am 07.07.2010 11:56, schrieb Eike Stepper:
> Hi Ralf,
>
> You're generally right about the dynamic feature delegation, but I
> suspect (and hope) that Nils really wants to replace the whole getter
> logic without persisting anything for the derived features.
>
> Cheers
> /Eike
>
> Contact: http://www.esc-net.de Blogger
> <http://thegordian.blogspot.com>Twitter
> <http://twitter.com/eikestepper>Linkedin
> <http://de.linkedin.com/in/eikestepper>Xing
> <http://www.xing.com/profile/Eike_Stepper>
> Article: What exactly is inside that p2 repository?
> < http://thegordian.blogspot.com/2010/05/what-exactly-is-insid e-that-p2.html>
>
>
> Am 07.07.2010 11:46, schrieb Ralf Ellner:
>
>> Nils,
>>
>>> I have an Ecode model with classes with some volatile and derived
>>> features. Without CDO I would
>>> set the feature delegation method to 'none' and would override the
>>> generated getter methods. But since I am using CDO, which
>>> requires 'reflective' feature delegation method this doesn't work.
>>>
>>> Where is the correct place to compute the value of the derived feature?
>> if you are using EMF 2.5+ you could set feature delegation to 'dynamic'
>> and implement the generated getter methods. See note at the bottom of
>> http://wiki.eclipse.org/Preparing_EMF_Models_for_CDO
>>
>> Best regards, Ralf
Re: [CDO] volatile and derived feature [message #545299 is a reply to message #545277] Wed, 07 July 2010 11:21 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6690
Registered: July 2009
Senior Member
Am 07.07.2010 12:45, schrieb Nils Israel:
> Hi Ralf and Eike,
>
> @Ralf you were right, it works with dynamic feature delegation, thanks.
>
> @Eike The way you described in the other post is the way I tried before. I just replaced the generated code with my own. I am using databinding to update the textfields but the textfield of the derived feature doesn't get updated since the databinding code uses the eGet method instead of my own getter.
Well, that's a piece of information that you didn't give in your first question ;-(

> And you were right, I don't want to persist the computed value. The feature ist flagged as: derived, volatile and transient. (BTW: whats the difference between volatile and transient?)
>
> Could you explain what is wrong about using dynamic feature delegation and overriding the getter method?
Nothing, then.


Re: [CDO] volatile and derived feature [message #545301 is a reply to message #545299] Wed, 07 July 2010 11:32 Go to previous message
Nils Israel is currently offline Nils IsraelFriend
Messages: 72
Registered: May 2010
Member
Am 07.07.2010 13:21, schrieb Eike Stepper:
> Am 07.07.2010 12:45, schrieb Nils Israel:
>> Hi Ralf and Eike,
>>
>> @Ralf you were right, it works with dynamic feature delegation, thanks.
>>
>> @Eike The way you described in the other post is the way I tried
>> before. I just replaced the generated code with my own. I am using
>> databinding to update the textfields but the textfield of the derived
>> feature doesn't get updated since the databinding code uses the eGet
>> method instead of my own getter.
> Well, that's a piece of information that you didn't give in your first
> question ;-(
>
>> And you were right, I don't want to persist the computed value. The
>> feature ist flagged as: derived, volatile and transient. (BTW: whats
>> the difference between volatile and transient?)
>>
>> Could you explain what is wrong about using dynamic feature delegation
>> and overriding the getter method?
> Nothing, then.
OK ;)

Thank you both,
Nils
Previous Topic:ResourceSet uses default EPackage instead of created/assigned EPackage during resource.load()
Next Topic:Bidirectional references in Ecore Models
Goto Forum:
  


Current Time: Mon Sep 23 06:26:02 GMT 2024

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

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

Back to the top