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
if (toolItemListener == null) {
            toolItemListener = new Listener() {
                public void handleEvent(Event event) {
                    switch (event.type) {
                    case SWT.Dispose:
                        handleWidgetDispose(event);
                        break;
                    case SWT.Selection:
                        Widget ew = event.widget;
                        if (ew != null) {
                            handleWidgetSelection(event, ((ToolItem) ew)
                                    .getSelection());
                        }
                        break;
                    }
                }
            };
        }
        return toolItemListener;
    }
    /**
     * Handles a widget dispose event for the widget corresponding to this item.
     */
    private void handleWidgetDispose(Event e) {
        
        if (e.widget == widget) {
            
            if (action.getStyle() == IAction.AS_DROP_DOWN_MENU) {
                IMenuCreator mc = action.getMenuCreator();
                if (mc != null) {