Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » [DataBinding]Bug in ListBinding?
[DataBinding]Bug in ListBinding? [message #329001] Tue, 10 June 2008 10:54 Go to next message
Daniel Zweifel is currently offline Daniel ZweifelFriend
Messages: 4
Registered: July 2009
Junior Member
Hi all

In the ListBinding class in the updateModelToTarget and
updateTargetToModel methods the ListDiffs are computed against
Collections.EMPTY_LIST and not against the old content of the underlying
lists. This has the effect that changed entries in the lists are marked as
new entries, added again to the list and in the end these changed entries
are twice in the list.

Is this behaviour intended or is it a bug? If it's a feature how can I
avoid these doubled entries?

Thanks for any help

Daniel
Re: [DataBinding]Bug in ListBinding? [message #329016 is a reply to message #329001] Tue, 10 June 2008 15:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: malloovidio.bluewin.ch

Hi Daniel,

have you tried whether you are indeed getting those double entries?
I think this should not happen with the current implementation since
on explicit updates, the target list is always cleared before performing
the update. See the flags passed to the doUpdate(...) method.

Regards,
Ovidio


Daniel Zweifel wrote:
> Hi all
>
> In the ListBinding class in the updateModelToTarget and
> updateTargetToModel methods the ListDiffs are computed against
> Collections.EMPTY_LIST and not against the old content of the
> underlying lists. This has the effect that changed entries in the lists
> are marked as new entries, added again to the list and in the end these
> changed entries are twice in the list.
>
> Is this behaviour intended or is it a bug? If it's a feature how can I
> avoid these doubled entries?
>
> Thanks for any help
>
> Daniel
>
Re: [DataBinding]Bug in ListBinding? [message #329036 is a reply to message #329016] Tue, 10 June 2008 20:25 Go to previous messageGo to next message
Boris Bokowski is currently offline Boris BokowskiFriend
Messages: 272
Registered: July 2009
Senior Member
Daniel,

If Ovidio's response didn't help and you are still seeing double entries,
can you please file a bug (ideally, with a test case or snippet with which
we can reproduce)?

Thanks
Boris

"Ovidio Mallo" <malloovidio@bluewin.ch> wrote in message
news:g2m6jh$6bf$1@build.eclipse.org...
> Hi Daniel,
>
> have you tried whether you are indeed getting those double entries?
> I think this should not happen with the current implementation since
> on explicit updates, the target list is always cleared before performing
> the update. See the flags passed to the doUpdate(...) method.
>
> Regards,
> Ovidio
>
>
> Daniel Zweifel wrote:
>> Hi all
>>
>> In the ListBinding class in the updateModelToTarget and
>> updateTargetToModel methods the ListDiffs are computed against
>> Collections.EMPTY_LIST and not against the old content of the underlying
>> lists. This has the effect that changed entries in the lists are marked
>> as new entries, added again to the list and in the end these changed
>> entries are twice in the list.
>>
>> Is this behaviour intended or is it a bug? If it's a feature how can I
>> avoid these doubled entries?
>>
>> Thanks for any help
>>
>> Daniel
>>
Re: [DataBinding]Bug in ListBinding? [message #329045 is a reply to message #329036] Wed, 11 June 2008 07:53 Go to previous messageGo to next message
Daniel Zweifel is currently offline Daniel ZweifelFriend
Messages: 4
Registered: July 2009
Junior Member
Hi Boris and Ovidio

Thank you for your answers.
Yes, I really see these double entries whether it is in the wrapped list
in the debugger or in the setter method of the model, they are there.

I will try to make a snippet and file a bug.

Thank you

Daniel

Boris Bokowski wrote:

> Daniel,

> If Ovidio's response didn't help and you are still seeing double entries,
> can you please file a bug (ideally, with a test case or snippet with which
> we can reproduce)?

> Thanks
> Boris

> "Ovidio Mallo" <malloovidio@bluewin.ch> wrote in message
> news:g2m6jh$6bf$1@build.eclipse.org...
>> Hi Daniel,
>>
>> have you tried whether you are indeed getting those double entries?
>> I think this should not happen with the current implementation since
>> on explicit updates, the target list is always cleared before performing
>> the update. See the flags passed to the doUpdate(...) method.
>>
>> Regards,
>> Ovidio
>>
>>
>> Daniel Zweifel wrote:
>>> Hi all
>>>
>>> In the ListBinding class in the updateModelToTarget and
>>> updateTargetToModel methods the ListDiffs are computed against
>>> Collections.EMPTY_LIST and not against the old content of the underlying
>>> lists. This has the effect that changed entries in the lists are marked
>>> as new entries, added again to the list and in the end these changed
>>> entries are twice in the list.
>>>
>>> Is this behaviour intended or is it a bug? If it's a feature how can I
>>> avoid these doubled entries?
>>>
>>> Thanks for any help
>>>
>>> Daniel
>>>
Re: [DataBinding]Bug in ListBinding? [message #329052 is a reply to message #329045] Wed, 11 June 2008 13:13 Go to previous message
Boris Bokowski is currently offline Boris BokowskiFriend
Messages: 272
Registered: July 2009
Senior Member
Thanks! You have indeed found a bug - JavaBeanObservableList.clear() did not
have any effect. The fix for this will be in 3.4.1 (sorry - too late for 3.4
unfortunately), but I have described two possible workarounds in bugzilla:

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

Boris

"Daniel Zweifel" <daniel.zweifel@adesso.ch> wrote in message
news:b603d063026fcde3bd9b6e6275f412c2$1@www.eclipse.org...
> Hi Boris and Ovidio
>
> Thank you for your answers.
> Yes, I really see these double entries whether it is in the wrapped list
> in the debugger or in the setter method of the model, they are there.
>
> I will try to make a snippet and file a bug.
>
> Thank you
>
> Daniel
>
> Boris Bokowski wrote:
>
>> Daniel,
>
>> If Ovidio's response didn't help and you are still seeing double entries,
>> can you please file a bug (ideally, with a test case or snippet with
>> which we can reproduce)?
>
>> Thanks
>> Boris
>
>> "Ovidio Mallo" <malloovidio@bluewin.ch> wrote in message
>> news:g2m6jh$6bf$1@build.eclipse.org...
>>> Hi Daniel,
>>>
>>> have you tried whether you are indeed getting those double entries?
>>> I think this should not happen with the current implementation since
>>> on explicit updates, the target list is always cleared before performing
>>> the update. See the flags passed to the doUpdate(...) method.
>>>
>>> Regards,
>>> Ovidio
>>>
>>>
>>> Daniel Zweifel wrote:
>>>> Hi all
>>>>
>>>> In the ListBinding class in the updateModelToTarget and
>>>> updateTargetToModel methods the ListDiffs are computed against
>>>> Collections.EMPTY_LIST and not against the old content of the
>>>> underlying lists. This has the effect that changed entries in the lists
>>>> are marked as new entries, added again to the list and in the end these
>>>> changed entries are twice in the list.
>>>>
>>>> Is this behaviour intended or is it a bug? If it's a feature how can I
>>>> avoid these doubled entries?
>>>>
>>>> Thanks for any help
>>>>
>>>> Daniel
>>>>
>
>
Previous Topic:.syncinfo file deleted RDZ
Next Topic:Problems with keeping editors opened
Goto Forum:
  


Current Time: Sun Dec 22 12:25:47 GMT 2024

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

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

Back to the top