EDU-543 IAE in StudyBrowser if several projects opened
[idea/community.git] / python / educational-core / student / src / com / jetbrains / edu / learning / ui / StudyJavaFxToolWindow.java
index e740d3fba715dc227711c6e2f11de05e0a7720c0..873c987da77dc652e89fc6af9b5efebcbe69592f 100644 (file)
@@ -14,6 +14,7 @@
  * limitations under the License.
  */
 package com.jetbrains.edu.learning.ui;
+import com.intellij.openapi.project.Project;
 import com.intellij.openapi.project.ProjectUtil;
 import com.jetbrains.edu.learning.StudyToolWindowConfigurator;
 import com.jetbrains.edu.learning.StudyUtils;
@@ -28,10 +29,10 @@ public class StudyJavaFxToolWindow extends StudyToolWindow {
   }
 
   @Override
-  public JComponent createTaskInfoPanel(String taskText) {
+  public JComponent createTaskInfoPanel(String taskText, Project project) {
     myBrowserWindow = new StudyBrowserWindow(true, false);
     myBrowserWindow.addBackAndOpenButtons();
-    myBrowserWindow.loadContent(taskText, StudyUtils.getConfigurator(ProjectUtil.guessCurrentProject(this)));
+    myBrowserWindow.loadContent(taskText, StudyUtils.getConfigurator(project));
     JPanel panel = new JPanel();
     panel.setLayout(new BoxLayout(panel, BoxLayout.PAGE_AXIS));
     panel.add(myBrowserWindow.getPanel());