void (final DataContext dataContext) { AnActionEvent event = new AnActionEvent( null, dataContext, myPlace, myPresentationFactory.getPresentation(myAction), ActionManager.getInstance(), 0 ); event.setInjectedContext(myAction.isInInjectedContext()); myAction.update(event); setVisible(event.getPresentation().isVisible()); setEnabled(event.getPresentation().isEnabled()); }