EDU-661 Adaptive Courses: disable Show hint button in Task view's toolbar

This commit is contained in:
Valentina Kiryushkina
2016-07-29 18:07:27 +03:00
parent ea0791043e
commit 02bee28aa5
@@ -87,6 +87,15 @@ public class StudyShowHintAction extends StudyActionWithShortcut {
@Override
public void update(@NotNull AnActionEvent e) {
final Project project = e.getProject();
if (project != null) {
final Course course = StudyTaskManager.getInstance(project).getCourse();
if (course != null && course.isAdaptive()) {
e.getPresentation().setEnabled(false);
return;
}
}
StudyUtils.updateAction(e);
}