<commit_before>package com.reason.dune;

import com.intellij.execution.*;
import com.intellij.execution.configurations.*;
import com.intellij.execution.process.*;
import com.intellij.facet.*;
import com.intellij.openapi.components.*;
import com.intellij.openapi.module.*;
import com.intellij.openapi.project.*;
import com.intellij.openapi.projectRoots.*;
import com.intellij.openapi.roots.*;
import com.intellij.openapi.vfs.*;
import com.intellij.util.containers.*;
import com.reason.Compiler;
import com.reason.Platform;
import com.reason.*;
import com.reason.ide.console.*;
import com.reason.ide.facet.*;
import org.jetbrains.annotations.*;

import java.util.*;
import java.util.concurrent.atomic.*;

import static com.intellij.notification.NotificationListener.*;

public final class DuneProcess implements CompilerProcess {
  private static final Log LOG = Log.create("dune.compiler");

  public static final String CONFIGURE_DUNE_SDK = "<html>"
                                                      + "When using a dune config file, you need to create an OCaml SDK and associate it to the project.\n"
                                                      + "see <a href=\"https://github.com/reasonml-editor/reasonml-idea-plugin/blob/master/docs/configuring-ocaml-project.md\">github</a>."
                                                      + "</html>";

  private final @NotNull Project m_project;
  private final @NotNull ProcessListener m_outputListener;
  private final AtomicBoolean m_started = new AtomicBoolean(false);

  private @Nullable KillableColoredProcessHandler m_processHandler;

  DuneProcess(@NotNull Project project) {
    m_project = project;
    m_outputListener = new DuneOutputListener(m_project, this);
  }

  // Wait for the tool window to be ready before starting the process
  @Override
  public void startNotify() {
    if (m_processHandler != null && !m_processHandler.isStartNotified()) {
      try {
        m_processHandler.startNotify();
      } catch (Throwable e) {
        // already done ?
      }
    }
  }

  @Override<commit_msg>Updated Dune setup link.<commit_after>package com.reason.dune;

import static com.intellij.notification.NotificationListener.URL_OPENING_LISTENER;

import com.intellij.execution.ExecutionException;
import com.intellij.execution.configurations.GeneralCommandLine;
import com.intellij.execution.process.*;
import com.intellij.facet.FacetManager;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.projectRoots.Sdk;
import com.intellij.openapi.roots.ModuleRootManager;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.util.containers.ContainerUtil;
import com.reason.Compiler;
import com.reason.*;
import com.reason.ide.console.CliType;
import com.reason.ide.facet.DuneFacet;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;

public final class DuneProcess implements CompilerProcess {
  private static final Log LOG = Log.create("dune.compiler");

  public static final String CONFIGURE_DUNE_SDK = "<html>"
                                                      + "When using a dune config file, you need to create an OCaml SDK and associate it to the project.\n"
                                                      + "see <a href=\"https://reasonml-editor.github.io/reasonml-idea-plugin/docs/build-tools/dune\">github</a>."
                                                      + "</html>";

  private final @NotNull Project m_project;
  private final @NotNull ProcessListener m_outputListener;
  private final AtomicBoolean m_started = new AtomicBoolean(false);

  private @Nullable KillableColoredProcessHandler m_processHandler;

  DuneProcess(@NotNull Project project) {
    m_project = project;
    m_outputListener = new DuneOutputListener(m_project, this);
  }

  // Wait for the tool window to be ready before starting the process
  @Override
  public void startNotify() {
    if (m_processHandler != null && !m_processHandler.isStartNotified()) {
      try {
        m_processHandler.startNotify();
      } catch (Throwable e) {
        // already done ?
      }
    }
  }

  @Override
{'fraction_non_alphanumeric': 0.1005497022446175, 'fraction_numerical': 0.0, 'mean_word_length': 3.211186113789778, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3427168', 'n_tokens_mistral': 1227, 'n_tokens_neox': 1193, 'n_words': 288}