mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
toolbar button to clear console contents (IDEA-80849)
This commit is contained in:
@@ -985,7 +985,7 @@ public class ConsoleViewImpl extends JPanel implements ConsoleView, ObservableCo
|
||||
|
||||
public static class ClearAllAction extends DumbAwareAction {
|
||||
public ClearAllAction() {
|
||||
super(ExecutionBundle.message("clear.all.from.console.action.name"));
|
||||
super(ExecutionBundle.message("clear.all.from.console.action.name"), "Clear the contents of the console", IconLoader.findIcon("/actions/gc.png"));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1356,21 +1356,20 @@ public class ConsoleViewImpl extends JPanel implements ConsoleView, ObservableCo
|
||||
final AnAction autoScrollToTheEndAction = new ScrollToTheEndToolbarAction(myEditor);
|
||||
|
||||
//Initializing custom actions
|
||||
final AnAction[] consoleActions = new AnAction[4 + customActions.size()];
|
||||
final AnAction[] consoleActions = new AnAction[5 + customActions.size()];
|
||||
consoleActions[0] = prevAction;
|
||||
consoleActions[1] = nextAction;
|
||||
consoleActions[2] = switchSoftWrapsAction;
|
||||
consoleActions[3] = autoScrollToTheEndAction;
|
||||
consoleActions[4] = new ClearAllAction();
|
||||
//consoleActions[4] = new ShowRecentlyChanged();
|
||||
for (int i = 0; i < customActions.size(); ++i) {
|
||||
consoleActions[i + 4] = customActions.get(i);
|
||||
consoleActions[i + 5] = customActions.get(i);
|
||||
}
|
||||
ConsoleActionsPostProcessor[] postProcessors = Extensions.getExtensions(ConsoleActionsPostProcessor.EP_NAME);
|
||||
AnAction[] result = consoleActions;
|
||||
if (postProcessors != null) {
|
||||
for (ConsoleActionsPostProcessor postProcessor : postProcessors) {
|
||||
result = postProcessor.postProcess(this, result);
|
||||
}
|
||||
for (ConsoleActionsPostProcessor postProcessor : postProcessors) {
|
||||
result = postProcessor.postProcess(this, result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user