94376a13ae3dc2966fcc85c1fdfd7a491a5acd2a
[idea/community.git] / python / educational-core / course-creator / src / com / jetbrains / edu / coursecreator / projectView / CCStudentInvisibleFileNode.java
1 package com.jetbrains.edu.coursecreator.projectView;
2
3 import com.intellij.ide.projectView.PresentationData;
4 import com.intellij.ide.projectView.ViewSettings;
5 import com.intellij.ide.projectView.impl.nodes.PsiFileNode;
6 import com.intellij.openapi.project.Project;
7 import com.intellij.psi.PsiFile;
8 import com.intellij.ui.SimpleTextAttributes;
9
10 /**
11  * represents a file which is invisible for student in student mode
12  */
13 public class CCStudentInvisibleFileNode extends PsiFileNode{
14
15   public CCStudentInvisibleFileNode(Project project,
16                                     PsiFile value,
17                                     ViewSettings viewSettings) {
18     super(project, value, viewSettings);
19   }
20
21
22   @Override
23   protected void updateImpl(PresentationData data) {
24     super.updateImpl(data);
25     String text = data.getPresentableText();
26     data.clearText();
27     data.addText(text, SimpleTextAttributes.GRAY_ATTRIBUTES);
28   }
29 }