private ICommandListener getCommandListener() { if (commandListener == null) { commandListener = commandEvent -> { if (commandEvent.isHandledChanged() || commandEvent.isEnabledChanged() || commandEvent.isDefinedChanged()) { updateCommandProperties(commandEvent); } }; } return commandListener; }
@Override public void commandChanged(final CommandEvent commandEvent) { if (commandEvent.isDefinedChanged()) { final Command command = commandEvent.getCommand(); final String commandId = command.getId(); final boolean commandIdAdded = command.isDefined(); if (commandIdAdded) { definedHandleObjects.add(command); } else { definedHandleObjects.remove(command); } if (isListenerAttached()) { fireCommandManagerChanged(new CommandManagerEvent(this, commandId, commandIdAdded, true, null, false, false)); } } }
@Override public final void commandChanged(final CommandEvent commandEvent) { if (commandEvent.isDefinedChanged()) { final Command command = commandEvent.getCommand(); final String commandId = command.getId(); final boolean commandIdAdded = command.isDefined(); if (commandIdAdded) { definedHandleObjects.add(command); } else { definedHandleObjects.remove(command); } if (isListenerAttached()) { fireCommandManagerChanged(new CommandManagerEvent(this, commandId, commandIdAdded, true, null, false, false)); } } }
@Override public final void commandChanged(final CommandEvent commandEvent) { if (commandEvent.isDefinedChanged()) { final Command command = commandEvent.getCommand(); final String commandId = command.getId(); final boolean commandIdAdded = command.isDefined(); if (commandIdAdded) { definedHandleObjects.add(command); } else { definedHandleObjects.remove(command); } if (isListenerAttached()) { fireCommandManagerChanged(new CommandManagerEvent(this, commandId, commandIdAdded, true, null, false, false)); } } }
@Override public void commandChanged(final CommandEvent commandEvent) { final ICommand command = new CommandLegacyWrapper(commandEvent.getCommand(), bindingManager); final boolean definedChanged = commandEvent.isDefinedChanged(); final boolean descriptionChanged = commandEvent.isDescriptionChanged(); final boolean handledChanged = commandEvent.isHandledChanged(); final boolean nameChanged = commandEvent.isNameChanged(); listener.commandChanged(new org.eclipse.ui.commands.CommandEvent( command, false, false, definedChanged, descriptionChanged, handledChanged, false, nameChanged, null)); }