use of jetbrains.communicator.core.commands.NamedUserCommand in project intellij-plugins by JetBrains.
the class BaseAction method update.
public void update(AnActionEvent e) {
super.update(e);
UserCommand command = getCommand(e);
e.getPresentation().setEnabled(command != null && command.isEnabled());
if (command instanceof NamedUserCommand) {
NamedUserCommand userCommand = (NamedUserCommand) command;
e.getPresentation().setText(userCommand.getName(), true);
e.getPresentation().setIcon(userCommand.getIcon());
}
}
Aggregations