diff --git a/src/main/java/rife/bld/idea/console/BldConsoleActionClear.java b/src/main/java/rife/bld/idea/console/BldConsoleActionClear.java index 73b6c3c..50b541b 100644 --- a/src/main/java/rife/bld/idea/console/BldConsoleActionClear.java +++ b/src/main/java/rife/bld/idea/console/BldConsoleActionClear.java @@ -24,6 +24,15 @@ public void actionPerformed(AnActionEvent e) { } } + @Override + public void update(AnActionEvent event) { + var project = event.getProject(); + if (project != null) { + var presentation = event.getPresentation(); + presentation.setEnabled(BldConsoleManager.getConsole(project).getContentSize() != 0); + } + } + @Override public @NotNull ActionUpdateThread getActionUpdateThread() { return ActionUpdateThread.BGT; diff --git a/src/main/java/rife/bld/idea/console/BldConsoleActionScrollEnd.java b/src/main/java/rife/bld/idea/console/BldConsoleActionScrollEnd.java index 1066cea..0a32a96 100644 --- a/src/main/java/rife/bld/idea/console/BldConsoleActionScrollEnd.java +++ b/src/main/java/rife/bld/idea/console/BldConsoleActionScrollEnd.java @@ -22,6 +22,15 @@ public BldConsoleActionScrollEnd() { return ActionUpdateThread.BGT; } + @Override + public void update(AnActionEvent event) { + var project = event.getProject(); + if (project != null) { + var presentation = event.getPresentation(); + presentation.setEnabled(BldConsoleManager.getConsole(project).getContentSize() != 0); + } + } + @Override public void actionPerformed(AnActionEvent e) { var project = e.getProject(); diff --git a/src/main/java/rife/bld/idea/console/BldConsoleActionScrollTop.java b/src/main/java/rife/bld/idea/console/BldConsoleActionScrollTop.java index e24fc86..8e66e05 100644 --- a/src/main/java/rife/bld/idea/console/BldConsoleActionScrollTop.java +++ b/src/main/java/rife/bld/idea/console/BldConsoleActionScrollTop.java @@ -22,6 +22,15 @@ public BldConsoleActionScrollTop() { return ActionUpdateThread.BGT; } + @Override + public void update(AnActionEvent event) { + var project = event.getProject(); + if (project != null) { + var presentation = event.getPresentation(); + presentation.setEnabled(BldConsoleManager.getConsole(project).getContentSize() != 0); + } + } + @Override public void actionPerformed(AnActionEvent e) { var project = e.getProject();