mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fixed: [RUBY-6630] Remove unused icon from the Test runner toolbar
This commit is contained in:
@@ -49,10 +49,12 @@ public class ToggleBooleanProperty extends ToggleAction {
|
||||
}
|
||||
|
||||
protected abstract boolean isEnabled();
|
||||
protected abstract boolean isVisible();
|
||||
|
||||
public void update(AnActionEvent e) {
|
||||
super.update(e);
|
||||
e.getPresentation().setEnabled(isEnabled());
|
||||
e.getPresentation().setVisible(isVisible());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,6 +32,11 @@ public abstract class ToggleModelAction extends ToggleBooleanProperty.Disablable
|
||||
super(text, description, icon, properties, property);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isVisible() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public abstract void setModel(TestFrameworkRunningModel model);
|
||||
|
||||
}
|
||||
+5
@@ -37,6 +37,11 @@ public class ScrollToTestSourceAction extends ToggleBooleanProperty.Disablable {
|
||||
return isEnabled(properties, model);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isVisible() {
|
||||
return true;
|
||||
}
|
||||
|
||||
private static boolean isEnabled(final AbstractProperty.AbstractPropertyContainer properties, final TestFrameworkRunningModel model) {
|
||||
if (!TestConsoleProperties.TRACK_RUNNING_TEST.value(properties)) return true;
|
||||
return model != null && !model.isRunning();
|
||||
|
||||
Reference in New Issue
Block a user