private static @Nullable Object getElementFromStructureView(@NotNull Project project, @NotNull FileEditor editor) {
    StructureViewBuilder builder = editor.getStructureViewBuilder();
    if (builder == null) return null;
    return getElementFromStructureView(project, editor, builder);
  }
private static @Nullable Object getElementFromStructureView(@NotNull Project project, @NotNull FileEditor editor)