EDU-536 Open task file with placeholders when new task opened

This commit is contained in:
Liana Bakradze
2016-06-24 15:08:11 +03:00
parent ba2c8bedea
commit 343aa6cab9
@@ -92,8 +92,10 @@ abstract public class StudyTaskNavigationAction extends StudyActionWithShortcut
VirtualFile srcDir = taskDir.findChild(EduNames.SRC);
VirtualFile vf = srcDir == null ? taskDir.findChild(name) : srcDir.findChild(name);
if (vf != null) {
FileEditorManager.getInstance(project).openFile(vf, true);
if (!taskFile.getAnswerPlaceholders().isEmpty()) {
if (shouldBeActive != null) {
FileEditorManager.getInstance(project).openFile(vf, true);
}
if (shouldBeActive == null && !taskFile.getAnswerPlaceholders().isEmpty()) {
shouldBeActive = vf;
}
}