Community
Participate
Working Groups
We are observing regression from bug 302918. We have view with CommandContributionItem's contributed to the toolbar. Some of them are initially disabled. Before 4.14 we see "disabled" icons on the toolbar, after update to 4.16 we don't see anything but the buttons *are* there, because there is a tooltip while hovering over them. I've bisected this to bug 302918 changes. The problem here is: 1) CommandContributionItem creates ToolItem without icon in org.eclipse.ui.menus.CommandContributionItem.fill(ToolBar, int) 2) ToolItem.setEnabled(false) is called from CommandContributionItem.updateToolItem() 3) ToolItem.enabled is now false 4) CommandContributionItem.updateIcons() calls now with non-null icon to ToolItem.setImage(Image) 5) ToolItem.enabled is false, disabledImage is null, so the check below is true and we return without setting the image. if (!enabled && disabledImage != image) { return; } The patch would be to additionally check if the disabled image is not null before refusing to set enabled image: if (!enabled && disabledImage != image && disabledImage != null) { return; } setImage(image); I will provide a patch.
New Gerrit change created: https://git.eclipse.org/r/163333
@Andrey, gerrit already has +1, I think additional vote on bug is not required.
Gerrit change https://git.eclipse.org/r/163333 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=bafd10404c2982b2b5b5e75b583e4839b54288d6
Created attachment 283021 [details] Invisible command button without patch
Created attachment 283022 [details] Example project to reproduce
resolving