private static VirtualFile extractVirtualFile(@NotNull List<MavenSimpleNode> selectedNodes) {
    for (MavenSimpleNode each : selectedNodes) {
      VirtualFile file = each.getVirtualFile();
      if (file != null && file.isValid()) return file;
    }

    var projectNode = getContextProjectNode(selectedNodes);
    if (projectNode == null) return null;
    VirtualFile file = projectNode.getMavenProject().getFile();
    if (!file.isValid()) return null;
    return file;
  }
private static VirtualFile extractVirtualFile(@NotNull List<MavenSimpleNode> selectedNodes)