Community
Participate
Working Groups
The code in ToolItemRenderer#setItemText() causes the bound keysequence to be embedded in the corresponding ToolItem's label text. This doesn't seem to be the desired action, does it?
Is this a new bug (presumably caused by the renderer changes on Friday to support translations)?
(In reply to comment #1) > Is this a new bug (presumably caused by the renderer changes on Friday to > support translations)? I don't think so. The code is: private void setItemText(MToolItem model, ToolItem item) { String text = model.getLabel(); if (model instanceof MHandledItem) { ... TriggerSequence sequence = [BindingService].getBestSequenceFor(handledItem); if (sequence != null) { text = text + '\t' + sequence.format(); } item.setText(text); } ... } The changes for translation replaced String text = model.getLabel(); with String text = model.getLocalizedLabel();
Created attachment 189144 [details] Proposed patch to ToolItemRenderer I suppose this problem isn't commonly seen as most ToolItems in actual use specify an icon. I think the code came from a copy-n-paste from HandledMenuItemRenderer. Embedding the keysequence is definitely not correct for the ToolItem label. But it would make sense for the tooltip?
Created attachment 192083 [details] v02 setItemText() doesn't need to compute the tooltip at all; that's done in getToolTipText() directly below.
Patch v02 committed to HEAD