Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » unary reference f, fESet=true, despite setting feature to null, is this correct?
unary reference f, fESet=true, despite setting feature to null, is this correct? [message #958621] Fri, 26 October 2012 04:59 Go to next message
Philipp Kutter is currently offline Philipp KutterFriend
Messages: 306
Registered: July 2009
Senior Member
I a unary reference f, the generated code for the setter includes

fESet=true

even if I am setting the feature to null, is this correct?

I would expect:

if (oldF!=null) {fESet=true}


Regards, Philipp



*Philipp W. Kutter
*CEO, Dr. sc. ETH*
* Montages AG
Stampfenbachstr. 48
CH-8006 Zürich

tel: +41 44 260 75 57
mob: +41 79 338 06 17
web: *www.montages.com*
<http://www.linkedin.com/in/kutter>

Get a signature like this.
<http://r1.wisestamp.com/r/landing?promo=18&dest=http%3A%2F%2Fwww.wisestamp.com%2Femail-install%3Futm_source%3Dextension%26utm_medium%3Demail%26utm_campaign%3Dpromo_18>
Click here.
<http://r1.wisestamp.com/r/landing?promo=18&dest=http%3A%2F%2Fwww.wisestamp.com%2Femail-install%3Futm_source%3Dextension%26utm_medium%3Demail%26utm_campaign%3Dpromo_18>
Re: unary reference f, fESet=true, despite setting feature to null, is this correct? [message #958635 is a reply to message #958621] Fri, 26 October 2012 05:14 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Philipp,

Comments below.

On 26/10/2012 6:59 AM, Philipp W. Kutter | Montages AG wrote:
> I a unary reference f, the generated code for the setter includes
>
> fESet=true
>
> even if I am setting the feature to null, is this correct?
Yes, there is always one bit of additional state information associated
with an unsettable feature, i.e., the state of being used. This state
is always in addition of the value the feature has while in the state of
being set or uset.
>
> I would expect:
>
> if (oldF!=null) {fESet=true}
No, then a feature could not be considered set when set to null and
therefore we'd not be able to represent <feature xsi:nil="true/> as
being detectably different from the absence of that element from the XML
leaving us able to preserve this information upon reserialization.
>
>
> Regards, Philipp
>
>
>
> *Philipp W. Kutter
> *CEO, Dr. sc. ETH*
> * Montages AG
> Stampfenbachstr. 48
> CH-8006 Zürich
>
> tel: +41 44 260 75 57
> mob: +41 79 338 06 17
> web: *www.montages.com*
> <http://www.linkedin.com/in/kutter>
>
> Get a signature like this.
> <http://r1.wisestamp.com/r/landing?promo=18&dest=http%3A%2F%2Fwww.wisestamp.com%2Femail-install%3Futm_source%3Dextension%26utm_medium%3Demail%26utm_campaign%3Dpromo_18>
> Click here.
> <http://r1.wisestamp.com/r/landing?promo=18&dest=http%3A%2F%2Fwww.wisestamp.com%2Femail-install%3Futm_source%3Dextension%26utm_medium%3Demail%26utm_campaign%3Dpromo_18>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:EMF Enum editing
Next Topic:How to set a default value of an attribute in a subclass?
Goto Forum:
  


Current Time: Thu Apr 25 11:53:28 GMT 2024

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

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

Back to the top