mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Move update tool window method to StudyUtils
This commit is contained in:
@@ -128,10 +128,9 @@ public class StudyUtils {
|
||||
}
|
||||
|
||||
public static void updateToolWindows(@NotNull final Project project) {
|
||||
final ToolWindowManager windowManager = ToolWindowManager.getInstance(project);
|
||||
StudyToolWindowFactory factory = new StudyToolWindowFactory();
|
||||
factory.update(project);
|
||||
update(project);
|
||||
|
||||
final ToolWindowManager windowManager = ToolWindowManager.getInstance(project);
|
||||
createProgressToolWindowContent(project, windowManager);
|
||||
}
|
||||
|
||||
@@ -479,4 +478,12 @@ public class StudyUtils {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void update(Project project) {
|
||||
final StudyToolWindow studyToolWindow = getStudyToolWindow(project);
|
||||
if (studyToolWindow != null) {
|
||||
String taskText = getTaskText(project);
|
||||
studyToolWindow.setTaskText(taskText);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-9
@@ -10,7 +10,6 @@ import com.intellij.ui.content.ContentManager;
|
||||
import com.jetbrains.edu.courseFormat.Course;
|
||||
import com.jetbrains.edu.learning.StudyProjectComponent;
|
||||
import com.jetbrains.edu.learning.StudyTaskManager;
|
||||
import com.jetbrains.edu.learning.StudyUtils;
|
||||
import icons.InteractiveLearningIcons;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -39,12 +38,4 @@ public class StudyToolWindowFactory implements ToolWindowFactory, DumbAware {
|
||||
Disposer.register(project, studyToolWindow);
|
||||
}
|
||||
}
|
||||
|
||||
public void update(Project project) {
|
||||
final StudyToolWindow studyToolWindow = StudyUtils.getStudyToolWindow(project);
|
||||
if (studyToolWindow != null) {
|
||||
String taskText = StudyUtils.getTaskText(project);
|
||||
studyToolWindow.setTaskText(taskText);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user