@Override public void actionPerformed(ActionEvent e) { CommandImpl command = commandProducer.createCommand(); commandExecutor.executeCommand(command); } }
/** Creates actions for the given {@link CommandProducer}. */ private void createActionsForProducer(CommandProducer producer) { BaseAction action = commandProducerActionFactory.create(producer.getName(), producer); actionManager.registerAction(producer.getName(), action); commandActionsPopUpGroup.add(action); }
@Override public void update(ActionEvent e) { e.getPresentation().setEnabledAndVisible(commandProducer.isApplicable()); }