Bug 67413 [KeyBindings] misc: Block accelerators that are in use
I meet a error after following these steps: - Remove hot keys Navigate->Open:F3 then add a new one Ctrl+Enter - Remove hot keys Edit->Find Previous:Ctrl+Shift+K then add a new one Shift+F3 - Remove hot keys Edit->Find Next:Ctrl+K then add a new one F3 Everything work fine with the new assigned keys except for editing an ant file (build.xml). When editing ant file, the ui understand the old hot keys: F3 for open and Ctrl+K for Find Next.
bundles/org.eclipse.jface/src/org/eclipse/jface/action/ActionContributionItem.java
private boolean isCommandActive() {
        IAction actionToCheck = getAction();
        if (actionToCheck != null) {
            String commandId = actionToCheck.getActionDefinitionId();
            ExternalActionManager.ICallback callback = ExternalActionManager
                    .getInstance().getCallback();
            if (callback != null)
                return callback.isActive(commandId);
        }
        return true;
    }
    /**
     * The action item implementation of this <code>IContributionItem</code>
     * method returns <code>true</code> for menu items and <code>false</code>
     * for everything else.
     */
    public boolean isDynamic() {
        if (widget instanceof MenuItem) {
             
            boolean itemIsCheck = (widget.getStyle() & SWT.CHECK) != 0;
            boolean actionIsCheck = getAction() != null
                    && getAction().getStyle() == IAction.AS_CHECK_BOX;
            boolean itemIsRadio = (widget.getStyle() & SWT.RADIO) != 0;
            boolean actionIsRadio = getAction() != null
                    && getAction().getStyle() == IAction.AS_RADIO_BUTTON;
            return (itemIsCheck != actionIsCheck)
                    || (itemIsRadio != actionIsRadio);
        }
        return false;
    }