@Override
  public CustomPaths customizePaths(@NotNull List<String> args) {
    updatePathSelectorForCommunityEditions(args);
    
    Path newConfig;
    Path basePerProcessDir = getFolderForPerProcessData();

    int directoryCounter = 0;
    while (true) {
      newConfig = basePerProcessDir.resolve("per_process_config_" + directoryCounter);

      FileLock configLock = tryLockDirectory(newConfig);
      if (configLock != null) {
        ourConfigLock = configLock;
        break;
      }

      if (directoryCounter > 1000) {
        System.err.println("Can't lock temp directories in " + basePerProcessDir);
        return null;
      }

      directoryCounter++;
    }

    Path newSystem = basePerProcessDir.resolve("per_process_system_" + directoryCounter);
    Path baseLogDir = getBaseLogDir();
    Path newLog = computeLogDirPath(baseLogDir, directoryCounter);
    if (newLog == null) {
      System.err.println("Can't create log directory in " + baseLogDir);
      return null;
    }
    cleanDirectory(newConfig);
    cleanDirectory(newSystem);

    String originalPluginsPath = PathManager.getPluginsPath();
    boolean customizePluginsPath = useCustomPluginsPath(originalPluginsPath);
    String pluginsPath = customizePluginsPath ? originalPluginsPath + File.separator + "frontend" : originalPluginsPath;
    boolean migratePlugins = customizePluginsPath && !Files.exists(Paths.get(pluginsPath));
    PerProcessPathCustomization.prepareConfig(newConfig, PathManager.getConfigDir(), migratePlugins);

    Path startupScriptDir = PerProcessPathCustomization.getStartupScriptDir().resolve("frontend");
    P3SupportInstaller.INSTANCE.installPerProcessInstanceSupportImplementation(new ClientP3Support());
    enabled = true;
    return new CustomPaths(newConfig.toString(), newSystem.toString(), pluginsPath, newLog.toString(), startupScriptDir);
  }
@Override
  public CustomPaths customizePaths(@NotNull List<String> args)