import com.jetbrains.edu.learning.courseFormat.TaskFile;
import org.jetbrains.annotations.NotNull;
+import java.io.File;
+
public class CCVirtualFileListener extends VirtualFileAdapter {
@Override
}
String name = createdFile.getName();
+
+ CCLanguageManager manager = CCUtils.getStudyLanguageManager(course);
+ if (manager != null && manager.doNotPackFile(new File(createdFile.getPath()))) {
+ return;
+ }
+
if (CCUtils.isTestsFile(project, createdFile)
|| StudyUtils.isTaskDescriptionFile(name)
|| name.contains(EduNames.WINDOW_POSTFIX)
import com.jetbrains.python.run.PythonCommandLineState;
import org.jetbrains.annotations.NotNull;
+import java.io.File;
+
public class PyCCCommandLineState extends PythonCommandLineState {
private final PyCCRunTestConfiguration myRunConfiguration;
private final VirtualFile myTaskDir;
assert course != null;
group.addParameter(myRunConfiguration.getPathToTest());
- group.addParameter(course.getCourseDirectory());
+ group.addParameter(new File(course.getCourseDirectory()).getPath());
group.addParameter(getFirstTaskFilePath());
}
@NotNull
private String getFirstTaskFilePath() {
String firstTaskFileName = StudyUtils.getFirst(myTask.getTaskFiles().keySet());
+ String taskDirPath = FileUtil.toSystemDependentName(myTaskDir.getPath());
return myTaskDir.findChild(EduNames.SRC) != null ?
- FileUtil.join(myTaskDir.getPath(), EduNames.SRC, firstTaskFileName) :
- FileUtil.join(myTaskDir.getPath(), firstTaskFileName);
+ FileUtil.join(taskDirPath, EduNames.SRC, firstTaskFileName) :
+ FileUtil.join(taskDirPath, firstTaskFileName);
}
@Override
return null;
}
+ String taskDirPath = FileUtil.toSystemDependentName(taskDir.getPath());
String testsPath = taskDir.findChild(EduNames.SRC) != null ?
- FileUtil.join(taskDir.getPath(), EduNames.SRC, EduNames.TESTS_FILE) :
- FileUtil.join(taskDir.getPath(), EduNames.TESTS_FILE);
+ FileUtil.join(taskDirPath, EduNames.SRC, EduNames.TESTS_FILE) :
+ FileUtil.join(taskDirPath, EduNames.TESTS_FILE);
return file.getPath().equals(testsPath) ? testsPath : null;
}