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
* Handles a property change event on the action (forwarded by nested listener).
     */
    private void actionPropertyChange(final PropertyChangeEvent e) {
        
        if (isVisible() && widget != null) {
            Display display = widget.getDisplay();
            if (display.getThread() == Thread.currentThread()) {
                update(e.getProperty());
            } else {
                display.asyncExec(new Runnable() {
                    public void run() {
                        update(e.getProperty());
                    }
                });
            }
        }
    }
    /**
     * Compares this action contribution item with another object.
     * Two action contribution items are equal if they refer to the identical Action.
     */
    public boolean equals(Object o) {
        if (!(o instanceof ActionContributionItem)) {
            return false;
        }
        return action.equals(((ActionContributionItem) o).action);
    }
    /**
     * The <code>ActionContributionItem</code> implementation of this
     * <code>IContributionItem</code> method creates an SWT <code>Button</code> for