Community
Participate
Working Groups
Version: 4.2.0 (for M4) Build id: I20111205-2330 Using Tom's live model editor, I tried toggling the visible flags for several elements in a window's shared elements list. Although the element disappears when setting visible=false, it is not restore when setting visible=true.
Should probably figure out the cause before EclipseCon as I imagine a lot of people will be clicking around with Tom's editor.
I have traced this through on 4.5 because the CleanupAddon is hiding my editor area and setVisible(true) will not bring it back. The problem is that the PartRenderingEngine.subscribeVisibilityHandler is using the Window as the parent of the shared element. The shared elements widget get reparented onto the Windows Shell instead of reparenting it onto the placeholder that contains the shared element.
(In reply to Ben Steffensmeier from comment #2) > I have traced this through on 4.5 ... Cool, do you want to provide a patch? https://wiki.eclipse.org/Platform_UI/How_to_Contribute
One of the problems is that a the StackRenderer ignores the visibility of a reference in a MPlaceholder, see method createTab. Regardless of the visibility of the reference, a tab is created and the part is made visible. When setting visible=false on a current visible tab, the tab remains, but the part is hidden. Setting visible=true again, does not make the tab visible again. In both cases, PartRenderingEngine.subscribeVisibilityHandler does not consider the case of MPlaceholder to tell the 'parent' of changed visibility. Therefore, the wrong parent is notified. (Note, it makes me wonder why a child has to tell the parent about changed visibility, instead of a parent listening to changed children) When switching back and forth between tabs, the part contents is made visible again, regardless of the value of 'visible'.
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.