new subtask action
[idea/community.git] / python / educational-core / course-creator / src / com / jetbrains / edu / coursecreator / CCLanguageManager.java
1 package com.jetbrains.edu.coursecreator;
2
3 import com.intellij.ide.fileTemplates.FileTemplate;
4 import com.intellij.lang.LanguageExtension;
5 import com.intellij.openapi.project.Project;
6 import com.intellij.openapi.vfs.VirtualFile;
7 import com.jetbrains.edu.learning.courseFormat.Task;
8 import org.jetbrains.annotations.NotNull;
9 import org.jetbrains.annotations.Nullable;
10
11 import java.io.File;
12
13 public interface CCLanguageManager {
14   LanguageExtension<CCLanguageManager> INSTANCE = new LanguageExtension<>("Edu.CCLanguageManager");
15
16   @Nullable
17   String getDefaultTaskFileExtension();
18
19   @Nullable
20   FileTemplate getTaskFileTemplateForExtension(@NotNull final Project project, String extension);
21
22   @Nullable
23   FileTemplate getTestsTemplate(@NotNull final Project project);
24
25   boolean doNotPackFile(File pathname);
26
27   default boolean isTestFile(VirtualFile file) {
28     return false;
29   }
30
31   default void createTestsForNewSubtask(@NotNull Project project, @NotNull Task task) {}
32 }