public static boolean openAssociatedApplication(@NotNull VirtualFile file) {
    if (!file.isInLocalFileSystem()) {
      throw new IllegalArgumentException("Non-local file: " + file + "; FS=" + file.getFileSystem());
    }

    List<String> commands = new ArrayList<>();
    if (SystemInfo.isWindows) {
      //noinspection SpellCheckingInspection
      commands.add("rundll32.exe");
      commands.add("url.dll,FileProtocolHandler");
    }
    else if (SystemInfo.isMac) {
      commands.add("/usr/bin/open");
    }
    else if (SystemInfo.hasXdgOpen()) {
      commands.add("xdg-open");
    }
    else {
      return false;
    }
    commands.add(file.getPresentableUrl());

    try {
      new GeneralCommandLine(commands).createProcess();
      return true;
    }
    catch (Exception e) {
      return false;
    }
  }
public static boolean openAssociatedApplication(@NotNull VirtualFile file)