hide and make visible from prev subtasks actions
[idea/community.git] / python / educational-core / course-creator / src / com / jetbrains / edu / coursecreator / actions / CCMakeVisibleForPrevSubtasks.java
1 package com.jetbrains.edu.coursecreator.actions;
2
3 import com.jetbrains.edu.learning.courseFormat.AnswerPlaceholder;
4
5 public class CCMakeVisibleForPrevSubtasks extends CCChangePlaceholderVisibility {
6
7   public static final String TITLE = "Make Visible For Previous Subtasks";
8
9   protected CCMakeVisibleForPrevSubtasks() {
10     super(TITLE, TITLE);
11   }
12
13   @Override
14   protected String getName() {
15     return TITLE;
16   }
17
18   @Override
19   protected boolean isVisible() {
20     return true;
21   }
22
23   @Override
24   protected boolean isAvailable(AnswerPlaceholder placeholder) {
25     return placeholder.getActiveSubtaskInfo().isNeedInsertText();
26   }
27 }