public API for kotlin plugin

This commit is contained in:
Ekaterina Tuzova
2017-04-06 14:54:32 +03:00
parent dcb5454532
commit 21d7fd0b9c
3 changed files with 6 additions and 3 deletions
@@ -646,7 +646,7 @@ public class StudySerializationUtils {
}
}
}
LOG.warn("No task type found in json " + json.getAsString());
LOG.warn("No task type found in json " + json.toString());
return null;
}
}
@@ -71,7 +71,6 @@ public class Course {
public Lesson getLesson(@NotNull final String name) {
int lessonIndex = EduUtils.getIndex(name, EduNames.LESSON);
List<Lesson> lessons = getLessons();
if (!EduUtils.indexIsValid(lessonIndex, lessons)) {
return null;
}
@@ -53,6 +53,10 @@ public class StudyGenerator {
public static void createTask(@NotNull final Task task, @NotNull final VirtualFile lessonDir) throws IOException {
VirtualFile taskDir = lessonDir.createChildDirectory(lessonDir, EduNames.TASK + Integer.toString(task.getIndex()));
createTaskContent(task, taskDir);
}
public static void createTaskContent(@NotNull Task task, VirtualFile taskDir) throws IOException {
int i = 0;
for (Map.Entry<String, TaskFile> taskFile : task.getTaskFiles().entrySet()) {
TaskFile taskFileContent = taskFile.getValue();
@@ -97,7 +101,7 @@ public class StudyGenerator {
}
private static void createChildFile(@NotNull VirtualFile taskDir, String name, String text) throws IOException {
public static void createChildFile(@NotNull VirtualFile taskDir, String name, String text) throws IOException {
String newDirectories = null;
String fileName = name;
VirtualFile dir = taskDir;