   :args (s/cat :pane spec/pane? :systems (s/coll-of keyword? #{})))
 
 (fdef get-selected-build-system
-  :args (s/cat :runtime-state map? :project-path string?)
+  :args (s/cat :pane spec/pane?)
   :ret (s/nilable keyword?))
 
 (fdef start-builder!

            (isConsole []
              true))))))

(defn update-builder-buttons! [pane systems]
  (when (< (count systems) 2)
    (.setManaged (.lookup pane "#boot") false)
    (.setManaged (.lookup pane "#lein") false))
  (cond
    (:boot systems)
    (.setSelected (.lookup pane "#boot") true)
    (:lein systems)
    (.setSelected (.lookup pane "#lein") true)))

(defn get-selected-build-system [runtime-state ^String project-path]
  (when-let [pane (get-in runtime-state [:project-panes project-path])]
    (cond
      (.isSelected (.lookup pane "#boot")) :boot
      (.isSelected (.lookup pane "#lein")) :lein)))

(defn start-builder! [pref-state runtime-state-atom print-str cmd]
  (when-let [project-path (u/get-project-path pref-state)]
    (refresh-builder! @runtime-state-atom project-path (= cmd "repl"))
    (when-let [system (get-selected-build-system @runtime-state-atom project-path)]
      (start-builder-process! runtime-state-atom project-path print-str [(name system) cmd]))))

(defn stop-builder! [pref-state runtime-state-atom]
  (when-let [project-path (u/get-project-path pref-state)]

  (:import [clojure.lang LineNumberingPushbackReader]
           [javafx.scene.web WebEngine]
           [java.io PipedWriter PipedReader PrintWriter]
           [javafx.application Platform]
           [javafx.beans.value ChangeListener]))

(defn pipe-into-console! [^WebEngine engine in-pipe]
  (let [ca (char-array 256)]
