Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General clean up #132

Merged
merged 6 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.lein-deps-sum
classes/
lib/
target/
.lein-repl-history
.nrepl-port
13 changes: 7 additions & 6 deletions project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:main clooj.core
:dependencies [[org.clojure/clojure "1.5.1"]
[clj-inspector "0.0.12"]
[slamhound "1.2.0"]
[com.cemerick/pomegranate "0.0.11"]
[com.fifesoft/rsyntaxtextarea "2.5.0"]
[org.clojure/tools.nrepl "0.2.3"]])
:jvm-opts ["--add-exports" "java.desktop/com.apple.eawt=ALL-UNNAMED"]
:dependencies [[org.clojure/clojure "1.11.1"]
[clj-inspector "0.0.16"]
[slamhound "1.5.5"]
[com.cemerick/pomegranate "1.1.0"]
[com.fifesoft/rsyntaxtextarea "3.4.0"]
[nrepl/nrepl "1.1.1"]])
4 changes: 2 additions & 2 deletions src/clooj/repl/lein.clj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

(ns clooj.repl.lein
(:import (java.io BufferedReader File InputStreamReader))
(:require [clojure.tools.nrepl :as nrepl]
(:require [nrepl.core :as nrepl]
[clojure.java.io :as io]
[clooj.protocols :as protocols]
[clooj.utils :as utils]))
Expand Down Expand Up @@ -65,7 +65,7 @@
[project-path cmd]
(->
(doto (ProcessBuilder. ["lein" cmd])
(.redirectErrorStream true)
(.redirectErrorStream false)
(.directory (io/file (or project-path "."))))
.start))

Expand Down
2 changes: 1 addition & 1 deletion src/clooj/repl/main.clj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
(java.util.concurrent LinkedBlockingQueue))
(:require [clj-inspector.jars :as jars]
[clojure.string :as string]
[clojure.tools.nrepl :as nrepl]
[nrepl.core :as nrepl]
[clojure.java.io :as io]
[clooj.brackets :as brackets]
[clooj.help :as help]
Expand Down
29 changes: 3 additions & 26 deletions src/clooj/utils.clj
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,6 @@
(try (Class/forName class-name)
(catch Throwable _ nil)))

(defn static-method [class-name method-name & arg-types]
(let [method
(some-> class-name
class-for-name
(.getMethod method-name
(into-array Class arg-types)))]
(fn [& args]
(.invoke method nil (object-array args)))))

;; preferences

;; define a UUID for clooj preferences
Expand Down Expand Up @@ -570,23 +561,9 @@

;; OS-specific utils

(defn enable-mac-fullscreen
(defmacro enable-mac-fullscreen
"Shows the Mac full-screen double arrow, as introduced in
OS X Lion, if possible."
[window]
(when (is-mac)
(let [enable (static-method
"com.apple.eawt.FullScreenUtilities"
"setWindowCanFullScreen"
java.awt.Window
Boolean/TYPE)]
(enable window true))))









(when (is-mac)
`(com.apple.eawt.FullScreenUtilities/setWindowCanFullScreen ~window true)))