Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 360355 - [Viewers] ILazyTreeContentProvider.updateElement(Object,int) called in undocumented circumstances
Summary: [Viewers] ILazyTreeContentProvider.updateElement(Object,int) called in undocu...
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-09 09:07 EDT by Missing name CLA
Modified: 2019-11-11 08:30 EST (History)
1 user (show)

See Also:


Attachments
Code reproducing the problem. (3.03 KB, text/x-java)
2011-10-09 09:08 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-09 09:07:08 EDT
Build Identifier: 20110301-1815

The documentation of updateElement(Object,int) suggests that it is called only "when a previously-blank element becomes visible". Although it is not documented when an element is considered blank, I would expect that means that is was never displayed or that its parent's child count has changed.

Somewhat surprisingly, calling viewer.refresh(Object) on some element causes updateElement to be called for that same element. This is surprising, since I would expect refresh should be called after changes to the element, but the viewer responds to it by asking to replace the element object altogether, which may override those changes. There seems to be no way in the API to reach the already existing element that is being refreshed inside updateElement, or even to tell whether the call is due to a missing element or due to a refresh(). Even worse, that call happens only after updateElement was called for all children, so if elements are created with a reference to their parent inside updateElement, the references in the children will be broken.

Reproducible: Always
Comment 1 Missing name CLA 2011-10-09 09:08:31 EDT
Created attachment 204834 [details]
Code reproducing the problem.
Comment 2 Eclipse Genie CLA 2019-11-11 08:30:51 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.

--
The automated Eclipse Genie.