private AnAction createConsoleStoppingAction(final AnAction generalStopAction) { final AnAction stopAction = new DumbAwareAction() { @Override public void update(AnActionEvent e) { generalStopAction.update(e); } @Override public void actionPerformed(AnActionEvent e) { e = stopConsole(e); generalStopAction.actionPerformed(e); } }; stopAction.copyFrom(generalStopAction); return stopAction; }
@Override protected AnAction createCloseAction( Executor defaultExecutor, final RunContentDescriptor descriptor) { final AnAction generalCloseAction = super.createCloseAction(defaultExecutor, descriptor); final AnAction stopAction = new DumbAwareAction() { @Override public void update(AnActionEvent e) { generalCloseAction.update(e); } @Override public void actionPerformed(AnActionEvent e) { e = stopConsole(e); clearContent(descriptor); generalCloseAction.actionPerformed(e); } }; stopAction.copyFrom(generalCloseAction); return stopAction; }