void (@NotNull AnActionEvent e) { selected = !selected; if (selected) { System.out.println("Unmute buttons"); enabledArray[0] = true; enabledArray[1] = true; } else { System.out.println("Mute buttons"); enabledArray[0] = false; enabledArray[1] = false; } Toggleable.setSelected(e.getPresentation(), selected); }