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

"Java 11, HDPI, Clojure 1.10.3" #58

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
target/**
.lein*
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

Clj-ns-browser is a graphical namespace/class/var browser for Clojure's doc strings, source code, ClojureDocs.org examples & comments, and values. The browser's GUI is inspired by Smalltalk class library browsers, and is based on the Seesaw library.

Look for the last released version on clojars.org: [clj-ns-browser "1.3.1"].
Look for the last released version on clojars.org: [clj-ns-browser "1.3.4"]. It works with java 11, clojure 1.10.3 and hdpi displays.

![Clojure Namespace Browser](https://github.com/franks42/clj-ns-browser/raw/master/clj-ns-browser.png "Clojure Namespace Browser")

## Introduction

The 1.3.1 release upgrades the dependencies to clojure 1.5, and seesaw 1.4.3, but works fine with clojure 1.4 also.
The 1.3.4 release upgrades the dependencies to java 11, clojure 1.10.3.

A few of the highlights of the browser's feature set are:

Expand Down
58 changes: 27 additions & 31 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>clj-ns-browser</groupId>
<groupId>org.clojars.bel</groupId>
<artifactId>clj-ns-browser</artifactId>
<packaging>jar</packaging>
<version>1.3.2-SNAPSHOT</version>
<version>1.3.4</version>
<name>clj-ns-browser</name>
<description>Smalltalk-like namespace/class/var/function browser for Clojure.</description>
<description>Smalltalk-like namespace/class/var/function browser for Clojure. (I added javax.xml.bind/jaxb-api to make it work with Java 11)</description>
<url>https://github.com/franks42/clj-ns-browser</url>
<licenses>
<license>
Expand All @@ -14,11 +14,10 @@
</license>
</licenses>
<scm>
<connection>scm:git:git://github.com/franks42/clj-ns-browser.git</connection>
<developerConnection>scm:git:ssh://[email protected]/franks42/clj-ns-browser.git</developerConnection>
<tag>c481a1426b2f928e89366a4c7a0eec58cd35b10c
</tag>
<url>https://github.com/franks42/clj-ns-browser</url>
<url>https://github.com/bennoloeffler/clj-ns-browser</url>
<connection>scm:git:git://github.com/bennoloeffler/clj-ns-browser.git</connection>
<developerConnection>scm:git:ssh://[email protected]/bennoloeffler/clj-ns-browser.git</developerConnection>
<tag>c5fc570f9c8aeb6dd1cc9383fcf32bdaa9b936e3</tag>
</scm>
<build>
<sourceDirectory>src</sourceDirectory>
Expand All @@ -29,9 +28,6 @@
</resource>
</resources>
<testResources>
<testResource>
<directory>dev-resources</directory>
</testResource>
<testResource>
<directory>resource</directory>
</testResource>
Expand Down Expand Up @@ -73,7 +69,7 @@
</repository>
<repository>
<id>clojars</id>
<url>https://clojars.org/repo/</url>
<url>https://repo.clojars.org/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
Expand All @@ -82,38 +78,50 @@
</releases>
</repository>
</repositories>
<dependencyManagement>
<dependencies/>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.clojure</groupId>
<artifactId>clojure</artifactId>
<version>1.6.0</version>
<version>1.10.3</version>
</dependency>
<dependency>
<groupId>com.formdev</groupId>
<artifactId>flatlaf</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>seesaw</groupId>
<artifactId>seesaw</artifactId>
<version>1.4.5</version>
<version>1.5.0</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.4.0-b180830.0359</version>
</dependency>
<dependency>
<groupId>org.clojure</groupId>
<artifactId>tools.namespace</artifactId>
<version>0.1.3</version>
<version>1.1.0</version>
</dependency>
<dependency>
<groupId>org.clojure</groupId>
<artifactId>tools.trace</artifactId>
<version>0.7.8</version>
<version>0.7.11</version>
</dependency>
<dependency>
<groupId>clojure-complete</groupId>
<artifactId>clojure-complete</artifactId>
<version>0.2.3</version>
<version>0.2.5</version>
<exclusions>
<exclusion>
<groupId>org.clojure</groupId>
<artifactId>clojure</artifactId>
<groupId>org.clojure</groupId>
</exclusion>
</exclusions>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.thnetos</groupId>
Expand All @@ -130,18 +138,6 @@
<artifactId>clj-info</artifactId>
<version>0.3.1</version>
</dependency>
<dependency>
<groupId>org.clojure</groupId>
<artifactId>tools.nrepl</artifactId>
<version>0.2.6</version>
<exclusions>
<exclusion>
<groupId>org.clojure</groupId>
<artifactId>clojure</artifactId>
</exclusion>
</exclusions>
<scope>test</scope>
</dependency>
</dependencies>
</project>

Expand Down
34 changes: 20 additions & 14 deletions project.clj
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
(defproject clj-ns-browser "1.3.2-SNAPSHOT"
:description "Smalltalk-like namespace/class/var/function browser for Clojure."

; ATTENTION: with java 1.8 you dont need: [javax.xml.bind/jaxb-api "2.4.0-b180830.0359"]
; see: https://stackoverflow.com/questions/52502189/java-11-package-javax-xml-bind-does-not-exist

(defproject org.clojars.bel/clj-ns-browser "1.3.4"
:description "Smalltalk-like namespace/class/var/function browser for Clojure. (I added javax.xml.bind/jaxb-api to make it work with Java 11)"
:url "https://github.com/franks42/clj-ns-browser"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[seesaw "1.4.5"]
[org.clojure/tools.namespace "0.1.3"]
[org.clojure/tools.trace "0.7.8"]
[clojure-complete "0.2.4" :exclusions [org.clojure/clojure]]
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.10.3"]
[com.formdev/flatlaf "1.6.1"] ; HDPI
[seesaw "1.5.0"]
[javax.xml.bind/jaxb-api "2.4.0-b180830.0359"] ; java 11!
[org.clojure/tools.namespace "1.1.0"]
[org.clojure/tools.trace "0.7.11"]
[clojure-complete "0.2.5" :exclusions [org.clojure/clojure]]
[org.thnetos/cd-client "0.3.6"]
[hiccup "1.0.5"]
[clj-info "0.3.1"]
]
:dev-dependencies [[lein-marginalia "0.7.1"]
;[franks42/debug-repl "0.3.1-FS"]
[clj-info "0.3.1"]]

:dev-dependencies [[lein-marginalia "0.7.1"]
;[franks42/debug-repl "0.3.1-FS"]
[codox "0.6.4"]]
:jvm-opts ~(if (= (System/getProperty "os.name") "Mac OS X") ["-Xdock:name=Clj-NS-Browser"] [])
:java-source-paths ["src-java"]
;; Use this for Leiningen version 2
:resource-paths ["resource"]
:resource-paths ["resource"])
;:main clj-ns-browser.core
)

6 changes: 4 additions & 2 deletions src/clj_ns_browser/browser.clj
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
[seesaw.border]
[seesaw.mig]
[seesaw.dev]
[clj-info]))
[clj-info])
(:import (com.formdev.flatlaf FlatDarkLaf)))
;;[alex-and-georges.debug-repl]))


Expand Down Expand Up @@ -61,7 +62,8 @@
(declare auto-refresh-browser-handler)

;; seesaw docs say to call this early
(native!)
;(native!)
(FlatDarkLaf/install) ;make hdpi displays work


;; convenience functions for seesaw interaction
Expand Down
6 changes: 3 additions & 3 deletions src/clj_ns_browser/sdoc.clj
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"
([] (sdoc* "sdoc"))
([a-name]
(cond (string? a-name) `(sdoc* ~a-name)
(symbol? a-name) `(sdoc* ~(str a-name))
(= (type a-name) clojure.lang.Cons) `(sdoc* ~(str (second a-name))))))
(cond (string? a-name) `(sdoc* ~a-name)
(symbol? a-name) `(sdoc* ~(str a-name))
(= (type a-name) clojure.lang.Cons) `(sdoc* ~(str (second a-name))))))

5 changes: 3 additions & 2 deletions src/clj_ns_browser/utils.clj
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,9 @@
([ns s]
(var-traced? (ns-resolve ns s)))
([v]
(let [vv (or (and (var? v) v) (and (symbol? v) (resolve v)))]
(and (var? vv) (meta vv) ((meta vv) ::clojure.tools.trace/traced)))))
(let [vv (or (and (var? v) v) (and (symbol? v) (resolve v)))]
(and (var? vv) (meta vv))
((meta vv) :clojure.tools.trace/traced))))


;; should move to clj-info
Expand Down