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 (action.isEnabled()) {
                boolean trace = Policy.TRACE_ACTIONS;
                long ms = System.currentTimeMillis();
                if (trace)
                    System.out.println("Running action: " + action.getText()); 
                action.runWithEvent(e);
                if (trace)
                    System.out.println((System.currentTimeMillis() - ms)
                            + " ms to run action: " + action.getText()); 
            }
        }
    }
    /* (non-Javadoc)
     * Method declared on Object.
     */
    public int hashCode() {
        return action.hashCode();
    }
    /**
     * Returns whether the given action has any images.
     * 
     * @param actionToCheck the action
     * @return <code>true</code> if the action has any images, <code>false</code> if not
     */
    private boolean hasImages(IAction actionToCheck) {
        return actionToCheck.getImageDescriptor() != null
                || actionToCheck.getHoverImageDescriptor() != null