show in project view only active subtask test
[idea/community.git] / python / educational-core / course-creator / src / com / jetbrains / edu / coursecreator / projectView / CCStudentInvisibleFileNode.java
index 94376a13ae3dc2966fcc85c1fdfd7a491a5acd2a..e163eee2b238baa75f9052d39494234d05636ff3 100644 (file)
@@ -10,20 +10,29 @@ import com.intellij.ui.SimpleTextAttributes;
 /**
  * represents a file which is invisible for student in student mode
  */
-public class CCStudentInvisibleFileNode extends PsiFileNode{
+public class CCStudentInvisibleFileNode extends PsiFileNode {
+  private final String myName;
 
   public CCStudentInvisibleFileNode(Project project,
                                     PsiFile value,
                                     ViewSettings viewSettings) {
     super(project, value, viewSettings);
+    myName = value.getName();
+  }
+
+  public CCStudentInvisibleFileNode(Project project,
+                                    PsiFile value,
+                                    ViewSettings viewSettings,
+                                    String name) {
+    super(project, value, viewSettings);
+    myName = name;
   }
 
 
   @Override
   protected void updateImpl(PresentationData data) {
     super.updateImpl(data);
-    String text = data.getPresentableText();
     data.clearText();
-    data.addText(text, SimpleTextAttributes.GRAY_ATTRIBUTES);
+    data.addText(myName, SimpleTextAttributes.GRAY_ATTRIBUTES);
   }
 }