Bug 90415 [Contributions] NPE in ActionContributionItem.update when trying to set accelerator in menu
Exception in thread "main" java.lang.NullPointerException at org.eclipse.jface.action.ActionContributionItem.update(ActionContributionItem.java:749) at org.eclipse.jface.action.ActionContributionItem.fill(ActionContributionItem.java:281) at org.eclipse.jface.action.MenuManager.update(MenuManager.java:627) at org.eclipse.jface.action.MenuManager.update(MenuManager.java:549) at org.eclipse.jface.action.MenuManager.createMenuBar(MenuManager.java:158) at org.eclipse.jface.window.ApplicationWindow.createTrimWidgets(ApplicationWindow.java:332) at org.eclipse.jface.window.ApplicationWindow.configureShell(ApplicationWindow.java:320) at org.eclipse.jface.window.Window.createShell(Window.java:483) at org.eclipse.jface.window.Window.create(Window.java:417) at org.eclipse.jface.window.Window.open(Window.java:770) at MenuActionTest.main(MenuActionTest.java:76)
bundles/org.eclipse.jface/src/org/eclipse/jface/action/ActionContributionItem.java
private static final int LOWER_GTK_ACCEL_BOUND = SWT.MOD1 | SWT.MOD2 | 'A';
    /**
     * This is the lower bound of the continuous range of accelerator values
     * that should be handled specially on GTK.  This is to circumnavigate the
     * special input mode in some cases.
     */
    private static final int UPPER_GTK_ACCEL_BOUND = SWT.MOD1 | SWT.MOD2 | 'F';
    
    private static final String ellipsis = "..."; 
    private static boolean USE_COLOR_ICONS = true;
    /**
     * Returns whether color icons should be used in toolbars.
     * 
     * @return <code>true</code> if color icons should be used in toolbars, 
     *   <code>false</code> otherwise
     */
    public static boolean getUseColorIconsInToolbars() {
        return USE_COLOR_ICONS;
    }
    /**
     * Sets whether color icons should be used in toolbars.
     * 
     * @param useColorIcons <code>true</code> if color icons should be used in toolbars, 
     *   <code>false</code> otherwise
     */
    public static void setUseColorIconsInToolbars(boolean useColorIcons) {
        USE_COLOR_ICONS = useColorIcons;
    }
    /**
     * The presentation mode.