use of com.intellij.openapi.fileEditor.FileEditorManagerEvent in project intellij-plugins by StepicOrg.
the class StudyBasePluginConfigurator method getFileEditorManagerListener.
@NotNull
@Override
public FileEditorManagerListener getFileEditorManagerListener(@NotNull Project project) {
return new FileEditorManagerAdapter() {
@Override
public void selectionChanged(@NotNull FileEditorManagerEvent event) {
VirtualFile file = event.getNewFile();
if (file == null) {
return;
}
StudyNode stepNode = StudyUtils.getStudyNode(project, file);
if (stepNode != null) {
StepikProjectManager.setSelected(project, stepNode);
}
}
};
}
Aggregations