| Summary: | [Viewers] DecoratingLabelProvider does not support updating an element shown more than once in the tree | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Travis London <travis.london> | ||||
| Component: | UI | Assignee: | Platform UI Triaged <platform-ui-triaged> | ||||
| Status: | CLOSED WONTFIX | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | ob1.eclipse, pwebster | ||||
| Version: | 3.5.2 | Keywords: | helpwanted | ||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | stalebug | ||||||
| Attachments: |
|
||||||
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. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. 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. |
Created attachment 219542 [details] Plugin showing the issue I have a TreeViewer that supports decorations and also shows the same element in more than one location. The tree viewer's label provider is set as follows: viewer.setLabelProvider(new DecoratingLabelProvider(new ViewLabelProvider(), PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator())); If I rename one of the TreeItems that represent this element that is shown more than once, only the first one created (TreeItem that is) will have its text updated. Using refresh manually after this does not help. Browsing the code it looks to be due to the HashMaps used during the decoration phase. These elements will always equal each other. To reproduce you can download the attachment and import it into a workspace, then launch an Eclipse application. Run Show > View > Other... > Sample Category > Sample View. In the sample view expand all and you will notice Leaf 1 showing under both Parent 1 and Parent 2. Right Click and select "Action 1". You will see one of the Leaf 1 items renamed, while the other one is not. Note you may see it work the first time in which case run the action again and only one will be updated. This occurs on Windows as well as Linux, and I tried the code in 4.2 and saw the same behavior. I am using 3.5.2 as my delivery platform though.