Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'nb8'
  • Loading branch information
Eric Thor authored and Eric Thor committed Jan 11, 2010
2 parents ef0c8e8 + 72aa458 commit 48ffb96
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 9 deletions.
Expand Up @@ -507,12 +507,12 @@
<runtime-relative-path>ext/slf4j-jdk14-1.5.8.jar</runtime-relative-path>
<binary-origin>release/modules/ext/slf4j-jdk14-1.5.8.jar</binary-origin>
</class-path-extension>
<!--

<class-path-extension>
<runtime-relative-path>ext/tools.jar</runtime-relative-path>
<binary-origin>release/modules/ext/tools.jar</binary-origin>
</class-path-extension>
-->

</data>
</configuration>
</project>
Expand Up @@ -43,8 +43,8 @@
(java.io File FileWriter IOException StringReader StringWriter
PrintStream PrintWriter OutputStream ByteArrayOutputStream)
(java.net JarURLConnection URL URI)
(com.sun.jdi VirtualMachine VirtualMachineManager ReferenceType
ClassType)))
;(com.sun.jdi VirtualMachine VirtualMachineManager ReferenceType ClassType)
))

; setup logging
(logger/ensure-logger)
Expand Down Expand Up @@ -186,6 +186,16 @@
(set (apply concat (map #(.getPaths (GlobalPathRegistry/getDefault) %)
["classpath/source" "classpath/compile"]))))

(defn get-all-project-classpaths
"Puts all the source roots first so clojure will be able to find the source files.
After that follows the compile dependant classpaths for each of the projects."
[]
(let [[src compile]
(map #(ClassPathSupport/createProxyClassPath
(into-array (.getPaths (GlobalPathRegistry/getDefault) %)))
["classpath/source" "classpath/compile"])]
(str src File/pathSeparator compile)))

(defn get-all-classpaths-launch-string []
(build-launcher-cp-string (get-all-classpaths)))

Expand Down
Expand Up @@ -63,7 +63,7 @@
FileUtil JarFileSystem URLMapper)
(java.io File FileWriter IOException StringReader StringWriter
PrintStream PrintWriter OutputStream ByteArrayOutputStream)
(com.sun.jdi VirtualMachine VirtualMachineManager ReferenceType ClassType)
;(com.sun.jdi VirtualMachine VirtualMachineManager ReferenceType ClassType)
))

; setup logging
Expand Down
Expand Up @@ -189,19 +189,24 @@ and port settings." repl-id) e)))))
"Top level function that grabs the preferences and starts a stand alone repl"
[action]
(try
(let [prefs (enclojure-options-category/get-stand-alone-settings)]
(let [{:keys [include-all-project-classpaths jvm-additional-args] :as prefs}
(enclojure-options-category/get-stand-alone-settings)]
(start-stand-alone-repl
"Stand-alone REPL"
(:jvm-additional-args prefs)
jvm-additional-args
(apply str (classpath-utils/classpath-for-repl)
java.io.File/pathSeparator
(interpose java.io.File/pathSeparator
(:classpaths (:platform prefs))))))
(:classpaths (:platform prefs)))
(when include-all-project-classpaths
(str java.io.File/pathSeparator
(classpath-utils/get-all-classpaths))))))
(catch Exception e
(error-reporting/report-error
(str "Stand alone repl failed to start. Make sure you have Clojure
and Clojure.contrib jars in assigned Clojure Platform for the standalone REPL.
See the Enclojure category under preferences to view your settings" (.getMessage e)) e))))
See the Enclojure category under preferences to view your settings"
(.getMessage e)) e))))


(declare reset-repl)
Expand Down

0 comments on commit 48ffb96

Please sign in to comment.