Bug 70088 [Actions] ActionContributionItem.fill(Composite) creates button with wrong text
1. Create an action with setText ("&Go@Ctrl+G"); 2. Use ActionContributionItem.fill(Composite) to create a button 3. The label of the button will be "_G_o@Ctrl+G" Looking at the source, it seems that the code which handles the text for buttons doesn't take the accelerator in account. Quick fix: Remove any text after the @ (incl) in the "set text for button" code. Suggested fix: Remove the ugly "@text" hack and use the real accelerator (set with setAccelerator()) instead (removes code duplication, too).
bundles/org.eclipse.jface/src/org/eclipse/jface/action/ActionContributionItem.java
boolean textChanged = propertyName == null
                    || propertyName.equals(IAction.TEXT);
            boolean imageChanged = propertyName == null
                    || propertyName.equals(IAction.IMAGE);
            boolean tooltipTextChanged = propertyName == null
                    || propertyName.equals(IAction.TOOL_TIP_TEXT);
            boolean enableStateChanged = propertyName == null
                    || propertyName.equals(IAction.ENABLED)
                    || propertyName
                            .equals(IContributionManagerOverrides.P_ENABLED);
            boolean checkChanged = (action.getStyle() == IAction.AS_CHECK_BOX || action
                    .getStyle() == IAction.AS_RADIO_BUTTON)
                    && (propertyName == null || propertyName
                            .equals(IAction.CHECKED));
            if (widget instanceof ToolItem) {
                ToolItem ti = (ToolItem) widget;
                String text = action.getText();
                
                boolean showText = text != null
                        && ((getMode() & MODE_FORCE_TEXT) != 0 || !hasImages(action));
                
                if (showText && text != null) {
                    text = Action.removeAcceleratorText(text);
                    text = Action.removeMnemonics(text);
                }
                if (textChanged) {
                    String textToSet = showText ? text : ""; 
                    boolean rightStyle = (ti.getParent().getStyle() & SWT.RIGHT) != 0;
                    if (rightStyle || !ti.getText().equals(textToSet)) {