Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362212 - [Viewers] ILazyTreeContentProvider: new elements remain uninitialized when child count increases
Summary: [Viewers] ILazyTreeContentProvider: new elements remain uninitialized when ch...
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-27 11:41 EDT by Missing name CLA
Modified: 2019-11-14 03:45 EST (History)
1 user (show)

See Also:


Attachments
Code reproducing the problem. (3.23 KB, text/x-java)
2011-10-27 11:47 EDT, Missing name CLA
no flags Details
screenshot (7.11 KB, image/png)
2011-10-27 11:50 EDT, Missing name CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Missing name CLA 2011-10-27 11:41:09 EDT
Build Identifier: 20110301-1815

When an ILazyTreeContentProvider reports an increased number of children from updateChildCount(Object,int) in response to a viewer refresh, the new items sometimes remain uninitialized: 
 - The label provider is not called to retrieve their labels.
 - If using an OwnerDrawLabelProvider, its paint(..) method is called with element==null
 - The items are drawn as empty

Calling TreeViewer.refresh() a second time seems to solve the problem.

Reproducible: Always

Steps to Reproduce:
1. Run the attached code
2. Click the button until the problem appears. The problem occurs on most, but not all, click. However it seems to follow a consistent pattern depending on the number of children - in the attached code it occurs consistently on the second click.
3. Uncommenting the second call to refresh() fixes the problem.
Comment 1 Missing name CLA 2011-10-27 11:47:44 EDT
Created attachment 206079 [details]
Code reproducing the problem.
Comment 2 Missing name CLA 2011-10-27 11:50:00 EDT
Created attachment 206080 [details]
screenshot
Comment 3 Lars Vogel CLA 2019-11-14 03:45:29 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

If the bug is still relevant, please remove the "stalebug" whiteboard tag.