private static boolean selectOpened(Editor editor, JsonLineExtractor jsonLineExtractor, FileEditorManager fileEditorManager) {
    for (FileEditor fileEditor : fileEditorManager.getAllEditors()) {
      if (fileEditor instanceof TextEditor textEditor) {
        VirtualFile file = FileDocumentManager.getInstance().getFile(textEditor.getEditor().getDocument());
        if (file instanceof LightVirtualFile) {
          Integer line = LINE_KEY.get(file);
          if (line != null && line == jsonLineExtractor.getLine()) {
            WeakReference<Editor> editorReference = EDITOR_REF_KEY.get(file);
            if (SoftReference.dereference(editorReference) == editor) {
              fileEditorManager.openFile(file, true, true);
              return true;
            }
          }
        }
      }
    }
    return false;
  }
private static boolean selectOpened(Editor editor, JsonLineExtractor jsonLineExtractor, FileEditorManager fileEditorManager)