Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 278828 - Invalid Icon after adding/removing SubModuleNodes
Summary: Invalid Icon after adding/removing SubModuleNodes
Status: RESOLVED FIXED
Alias: None
Product: Riena
Classification: RT
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P2 normal (vote)
Target Milestone: 1.2.0.M3   Edit
Assignee: Elias Volanakis CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-02 12:56 EDT by Stefan Flick CLA
Modified: 2009-10-22 18:42 EDT (History)
3 users (show)

See Also:


Attachments
Screenshots of Navigation aera (91.80 KB, image/jpeg)
2009-06-02 12:59 EDT, Stefan Flick CLA
no flags Details
patch (8.74 KB, patch)
2009-10-21 09:38 EDT, Sabine Achilles CLA
elias: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Flick CLA 2009-06-02 12:56:50 EDT
When adding a SubModuleNode 'B' as child to another SubModuleNode 'A' via the navigate() API, the given icon of SubModuleNode 'A' (snapshot1) is changed to a closed folder Icon (snapshot2). 
The changing to a folder icon is maybe ok, but because the child is activated the folder icon should be opened and not closed. 
Then after removing the SubModuleNode 'B' (dispose) the original icon should appear again (snapshot3).
Comment 1 Stefan Flick CLA 2009-06-02 12:59:08 EDT
Created attachment 138028 [details]
Screenshots of Navigation aera

snapshot1
snapshot2
snapshot3
Comment 2 Elias Volanakis CLA 2009-09-17 00:39:35 EDT
A sample project to reproduce this would be very helpful.
Comment 3 Sabine Achilles CLA 2009-10-21 09:38:51 EDT
Created attachment 150111 [details]
patch
Comment 4 Sabine Achilles CLA 2009-10-21 10:23:34 EDT
The patch includes the fix and an enhancement of the ExampleClient to reproduce the Bug.

The Problem can be reproduced in the SWT ExampleClient after applying the patch only on the example client project.
Go to Module 1.1.2 (closeable) and then select Navigation. Press the Button "Add Sub-Module this Node". Without the Fix, the folder of the SubModule "Navigation" would be closed. With the fix it is open.
Then change to the "Navigate" SubModule and click the button "Remove all children". Without the fix the folder icon would still be there. With the fix the original icon is loaded.

The problem was, that the method getImageKey in TreeRidgetLabelProvider was called before the expanded state was set.
Comment 5 Sabine Achilles CLA 2009-10-21 10:36:24 EDT
Elias, could you please review the patch, since you recently made some changes in the same area?
Comment 6 Elias Volanakis CLA 2009-10-22 00:45:18 EDT
Thanks, will look at this tomorrow (Thu).
Comment 7 Elias Volanakis CLA 2009-10-22 18:42:16 EDT
Thanks - looks good! Committed to HEAD.