Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Unnecessary resetting of object references
Unnecessary resetting of object references [message #114851] Sun, 16 March 2008 13:33 Go to next message
Manfred Hahn is currently offline Manfred HahnFriend
Messages: 64
Registered: July 2009
Member
Hi Martin,

in the context of another problem I had with the generated gmf source (for
a detailed description look at my question in the gmf group) I discovered
that the EReferencePropertyHandler.set() does a reset of an object even if
the new object is the same as the old one.

If the reference is not bidirectional the current source lines are
if (curValue == null && value == null) {
return; // do nothing in this case
}
...

Could this be replaced by something like this
if (curValue == value) {
return; // do nothing in this case
}
...
without any harm?

Best regards

Manfred
Re: Unnecessary resetting of object references [message #114865 is a reply to message #114851] Sun, 16 March 2008 18:11 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Manfred,
Yes no problem, I will make the change. There will probably be a new build today. Btw, I also worked
on the GMF-teneo integration incl. persisting the diagram. I will probably publish a new tutorial
today also.

gr. Martin

Manfred Hahn wrote:
> Hi Martin,
>
> in the context of another problem I had with the generated gmf source
> (for a detailed description look at my question in the gmf group) I
> discovered that the EReferencePropertyHandler.set() does a reset of an
> object even if the new object is the same as the old one.
>
> If the reference is not bidirectional the current source lines are
> if (curValue == null && value == null) {
> return; // do nothing in this case
> }
> ...
>
> Could this be replaced by something like this
> if (curValue == value) {
> return; // do nothing in this case
> }
> ...
> without any harm?
>
> Best regards
>
> Manfred
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: Unnecessary resetting of object references [message #615893 is a reply to message #114851] Sun, 16 March 2008 18:11 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Manfred,
Yes no problem, I will make the change. There will probably be a new build today. Btw, I also worked
on the GMF-teneo integration incl. persisting the diagram. I will probably publish a new tutorial
today also.

gr. Martin

Manfred Hahn wrote:
> Hi Martin,
>
> in the context of another problem I had with the generated gmf source
> (for a detailed description look at my question in the gmf group) I
> discovered that the EReferencePropertyHandler.set() does a reset of an
> object even if the new object is the same as the old one.
>
> If the reference is not bidirectional the current source lines are
> if (curValue == null && value == null) {
> return; // do nothing in this case
> }
> ...
>
> Could this be replaced by something like this
> if (curValue == value) {
> return; // do nothing in this case
> }
> ...
> without any harm?
>
> Best regards
>
> Manfred
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Previous Topic:Unnecessary resetting of object references
Next Topic:teneo:circular loop on DB2 error
Goto Forum:
  


Current Time: Fri Apr 26 22:39:10 GMT 2024

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

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

Back to the top