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
}
            } else if ((style & SWT.RADIO) != 0) {
                if (action.getStyle() == IAction.AS_RADIO_BUTTON) {
                    action.setChecked(selection);
                }
            } else if ((style & SWT.DROP_DOWN) != 0) {
                if (e.detail == 4) { 
                    if (action.getStyle() == IAction.AS_DROP_DOWN_MENU) {
                        IMenuCreator mc = action.getMenuCreator();
                        ToolItem ti = (ToolItem) item;
                        
                        
                        
                        
                        
                        
                        if (mc != null) {
                            Menu m = mc.getMenu(ti.getParent());
                            if (m != null) {
                                
                                Rectangle b = ti.getBounds();
                                Point p = ti.getParent().toDisplay(
                                        new Point(b.x, b.y + b.height));
                                m.setLocation(p.x, p.y); 
                                m.setVisible(true);
                                return; 
                            }
                        }
                    }
                }