Permalink
Browse files

moved java file in its own source tree for leiningen

  • Loading branch information...
1 parent c481a14 commit c5fc570f9c8aeb6dd1cc9383fcf32bdaa9b936e3 @franks42 committed May 11, 2015
Showing with 163 additions and 6 deletions.
  1. +151 −0 pom.xml
  2. +1 −4 project.clj
  3. 0 {src → src-java}/clj_ns_browser/BrowserForm.java
  4. +11 −2 src/clj_ns_browser/browser.clj
View
151 pom.xml
@@ -0,0 +1,151 @@
+<?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>
+ <artifactId>clj-ns-browser</artifactId>
+ <packaging>jar</packaging>
+ <version>1.3.2-SNAPSHOT</version>
+ <name>clj-ns-browser</name>
+ <description>Smalltalk-like namespace/class/var/function browser for Clojure.</description>
+ <url>https://github.com/franks42/clj-ns-browser</url>
+ <licenses>
+ <license>
+ <name>Eclipse Public License</name>
+ <url>http://www.eclipse.org/legal/epl-v10.html</url>
+ </license>
+ </licenses>
+ <scm>
+ <connection>scm:git:git://github.com/franks42/clj-ns-browser.git</connection>
+ <developerConnection>scm:git:ssh://git@github.com/franks42/clj-ns-browser.git</developerConnection>
+ <tag>c481a1426b2f928e89366a4c7a0eec58cd35b10c
+</tag>
+ <url>https://github.com/franks42/clj-ns-browser</url>
+ </scm>
+ <build>
+ <sourceDirectory>src</sourceDirectory>
+ <testSourceDirectory>test</testSourceDirectory>
+ <resources>
+ <resource>
+ <directory>resource</directory>
+ </resource>
+ </resources>
+ <testResources>
+ <testResource>
+ <directory>dev-resources</directory>
+ </testResource>
+ <testResource>
+ <directory>resource</directory>
+ </testResource>
+ </testResources>
+ <directory>target</directory>
+ <outputDirectory>target/classes</outputDirectory>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.7</version>
+ <executions>
+ <execution>
+ <id>add-source</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>add-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>src-java</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <repositories>
+ <repository>
+ <id>central</id>
+ <url>https://repo1.maven.org/maven2/</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>clojars</id>
+ <url>https://clojars.org/repo/</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ </repositories>
+ <dependencies>
+ <dependency>
+ <groupId>org.clojure</groupId>
+ <artifactId>clojure</artifactId>
+ <version>1.6.0</version>
+ </dependency>
+ <dependency>
+ <groupId>seesaw</groupId>
+ <artifactId>seesaw</artifactId>
+ <version>1.4.5</version>
+ </dependency>
+ <dependency>
+ <groupId>org.clojure</groupId>
+ <artifactId>tools.namespace</artifactId>
+ <version>0.1.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.clojure</groupId>
+ <artifactId>tools.trace</artifactId>
+ <version>0.7.8</version>
+ </dependency>
+ <dependency>
+ <groupId>clojure-complete</groupId>
+ <artifactId>clojure-complete</artifactId>
+ <version>0.2.3</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.clojure</groupId>
+ <artifactId>clojure</artifactId>
+ </exclusion>
+ </exclusions>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.thnetos</groupId>
+ <artifactId>cd-client</artifactId>
+ <version>0.3.6</version>
+ </dependency>
+ <dependency>
+ <groupId>hiccup</groupId>
+ <artifactId>hiccup</artifactId>
+ <version>1.0.5</version>
+ </dependency>
+ <dependency>
+ <groupId>clj-info</groupId>
+ <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>
+
+<!-- This file was autogenerated by Leiningen.
+ Please do not edit it directly; instead edit project.clj and regenerate it.
+ It should not be considered canonical data. For more information see
+ https://github.com/technomancy/leiningen -->
View
@@ -16,10 +16,7 @@
;[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-source-path "src"
- ;; Use this for Leiningen version 1
- :resources-path "resource"
+ :java-source-paths ["src-java"]
;; Use this for Leiningen version 2
:resource-paths ["resource"]
;:main clj-ns-browser.core
@@ -373,10 +373,19 @@
:handler (fn [a] (future (clj-ns-browser.web/browse-url "http://clojure.org")))))
(add-app-action :go-clojuredocs-action
(action :name "ClojureDocs..."
- :handler (fn [a] (future (clj-ns-browser.web/browse-url "http://clojuredocs.org")))))
+ ;;:handler (fn [a] (future (clj-ns-browser.web/browse-url "http://clojuredocs.org")))))
+ :handler (fn [e]
+ (let [id (partial select-id (to-root e))]
+ (let [fqn (config (id :doc-tf) :text)]
+ (if-let [fqn-name (fqname fqn)]
+ (let [ns-n-class (ns-name-class-str fqn-name)
+ sname (if (nil? (second ns-n-class)) (first ns-n-class)(second ns-n-class))
+ nsname (first ns-n-class)]
+ (future (clj-ns-browser.web/browse-url
+ (str "http://clojuredocs.org/" nsname "/" sname))))))))))
(add-app-action :go-cheatsheet-action
(action :name "Clojure CheatSheet..."
- :handler (fn [a] (future (clj-ns-browser.web/browse-url "http://jafingerhut.github.com/cheatsheet-clj-1.3/cheatsheet-tiptip-no-cdocs-summary.html")))))
+ :handler (fn [a] (future (clj-ns-browser.web/browse-url "https://jafingerhut.github.io/cheatsheet/clojuredocs/cheatsheet-tiptip-no-cdocs-summary.html")))))
(add-app-action :go-jira-action
(action :name "JIRA..."
:handler (fn [a] (future (clj-ns-browser.web/browse-url

0 comments on commit c5fc570

Please sign in to comment.