Community
Participate
Working Groups
Looks like I cannot trigger the visible flag via the model editor on a toolbar in a trimbar. Is this a bug in the model editor or a limitation of our model?
Created attachment 282792 [details] Screenshot
(In reply to Lars Vogel from comment #0) > Is this a bug in the model editor or a limitation of our model? Rolf, do you know this?
(In reply to Lars Vogel from comment #2) > (In reply to Lars Vogel from comment #0) > > Is this a bug in the model editor or a limitation of our model? > > Rolf, do you know this? There is a hack in org.eclipse.e4.ui.workbench.renderers.swt.TrimBarLayout#hideManagedTB that insists on changing back the visibility flag when you try to toggle it.
(In reply to Rolf Theunissen from comment #3) > (In reply to Lars Vogel from comment #2) > > (In reply to Lars Vogel from comment #0) > > > Is this a bug in the model editor or a limitation of our model? > > > > Rolf, do you know this? > > There is a hack in > org.eclipse.e4.ui.workbench.renderers.swt.TrimBarLayout#hideManagedTB that > insists on changing back the visibility flag when you try to toggle it. Do you think this is required or is this a bug?
I think it is a bug. The method is called hideManagedTB, and is supposed to mark empty toolbars as invisible. However, it also marks non-empty toolbars as visible. Moreover, the code checks widgets to update the visibility of the model. The model should always drive the widgets, not the other way around. This one of the things to fix in the overall visibility story. I am thinking to introduce a visibility processor addon to manage all the visibility attributes. This addon would mark the toolbars invisible based on the child items (and tags) in the model. This code would then be obsolete.
Deleting the method hideManagedTB does not make a difference to me at runtime (AFAICS). Does you see new bugs if you delete this method? I push a Gerrit for testing and will mark it with -2 to ensure that this test Gerrit is not merged without sufficient testing.
New Gerrit change created: https://git.eclipse.org/r/164915
I updated the Gerrit to ignore empty toolbars when calculating the size (and laying out the control). This removes the need to mark the toolbars hidden (or forcing to be shown) in the model. If showing/hiding of the toolbars in the model is needed, it should be handled in the CleanupAddon. But it is explicitly disabled there, because otherwise toolbars will show up unexpectedly.
Mass change to 4.19 M1, please update the target if you have other plans.
Mass move 4.19 M1 bugs to M3
Mass Move out of 4.20