diff options
author | Ben Smith-Mannschott <bsmith.occs@gmail.com> | 2010-08-23 20:56:45 +0200 |
---|---|---|
committer | Stuart Sierra <mail@stuartsierra.com> | 2010-09-03 12:23:36 -0400 |
commit | dee2466054cf2ff5a845bde70091fbd78b8c1a0e (patch) | |
tree | 1865d0f9d06a2f2e48a5be5665198f0ce894c3b7 | |
parent | 1be54b2f9bd3c9f35385a015b14fc93337bffcac (diff) |
remove deprecated clojure.contrib.javadoc
Signed-off-by: Stuart Sierra <mail@stuartsierra.com>
-rw-r--r-- | modules/complete/pom.xml | 5 | ||||
-rw-r--r-- | modules/javadoc/pom.xml | 26 | ||||
-rw-r--r-- | modules/javadoc/src/main/clojure/clojure/contrib/javadoc.clj | 4 | ||||
-rw-r--r-- | modules/javadoc/src/main/clojure/clojure/contrib/javadoc/browse.clj | 51 | ||||
-rw-r--r-- | modules/javadoc/src/main/clojure/clojure/contrib/javadoc/browse_ui.clj | 31 | ||||
-rw-r--r-- | modules/repl-utils/pom.xml | 5 | ||||
-rw-r--r-- | modules/repl-utils/src/main/clojure/clojure/contrib/repl_utils.clj | 2 | ||||
-rw-r--r-- | pom.xml | 1 |
8 files changed, 1 insertions, 124 deletions
diff --git a/modules/complete/pom.xml b/modules/complete/pom.xml index 2c195bbe..3151d6be 100644 --- a/modules/complete/pom.xml +++ b/modules/complete/pom.xml @@ -172,11 +172,6 @@ </dependency> <dependency> <groupId>org.clojure.contrib</groupId> - <artifactId>javadoc</artifactId> - <version>1.3.0-SNAPSHOT</version> - </dependency> - <dependency> - <groupId>org.clojure.contrib</groupId> <artifactId>jmx</artifactId> <version>1.3.0-SNAPSHOT</version> </dependency> diff --git a/modules/javadoc/pom.xml b/modules/javadoc/pom.xml deleted file mode 100644 index 4479bb97..00000000 --- a/modules/javadoc/pom.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?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/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.clojure.contrib</groupId> - <artifactId>parent</artifactId> - <version>1.3.0-SNAPSHOT</version> - <relativePath>../parent</relativePath> - </parent> - <artifactId>javadoc</artifactId> - <dependencies> - <dependency> - <groupId>org.clojure.contrib</groupId> - <artifactId>shell</artifactId> - <version>1.3.0-SNAPSHOT</version> - </dependency> - <dependency> - <groupId>org.clojure.contrib</groupId> - <artifactId>def</artifactId> - <version>1.3.0-SNAPSHOT</version> - </dependency> - </dependencies> -</project> diff --git a/modules/javadoc/src/main/clojure/clojure/contrib/javadoc.clj b/modules/javadoc/src/main/clojure/clojure/contrib/javadoc.clj deleted file mode 100644 index 7ac30a4e..00000000 --- a/modules/javadoc/src/main/clojure/clojure/contrib/javadoc.clj +++ /dev/null @@ -1,4 +0,0 @@ -(ns ^{:deprecated "1.2"} - clojure.contrib.javadoc) - -(throw (Exception. "clojure.contrib.javadoc/javadoc can now be found in clojure.java.javadoc")) diff --git a/modules/javadoc/src/main/clojure/clojure/contrib/javadoc/browse.clj b/modules/javadoc/src/main/clojure/clojure/contrib/javadoc/browse.clj deleted file mode 100644 index a47fc0cd..00000000 --- a/modules/javadoc/src/main/clojure/clojure/contrib/javadoc/browse.clj +++ /dev/null @@ -1,51 +0,0 @@ -;;; browse.clj -- start a web browser from Clojure - -; Copyright (c) Christophe Grand, December 2008. All rights reserved. -; The use and distribution terms for this software are covered by the -; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) -; which can be found in the file epl-v10.html at the root of this -; distribution. -; By using this software in any fashion, you are agreeing to be bound by -; the terms of this license. -; You must not remove this notice, or any other, from this software. - -(ns - ^{:author "Christophe Grand", - :deprecated "1.2" - :doc "Start a web browser from Clojure"} - clojure.contrib.javadoc.browse - (:require [clojure.contrib.shell :as sh]) - (:import (java.net URI))) - -(defn- macosx? [] - (-> "os.name" System/getProperty .toLowerCase - (.startsWith "mac os x"))) - -(def *open-url-script* (when (macosx?) "/usr/bin/open")) - -(defn open-url-in-browser - "Opens url (a string) in the default system web browser. May not - work on all platforms. Returns url on success, nil if not - supported." - [url] - (try - (when (clojure.lang.Reflector/invokeStaticMethod "java.awt.Desktop" - "isDesktopSupported" (to-array nil)) - (-> (clojure.lang.Reflector/invokeStaticMethod "java.awt.Desktop" - "getDesktop" (to-array nil)) - (.browse (URI. url))) - url) - (catch ClassNotFoundException e - nil))) - -(defn open-url-in-swing - "Opens url (a string) in a Swing window." - [url] - ; the implementation of this function resides in another namespace to be loaded "on demand" - ; this fixes a bug on mac os x where requiring repl-utils turns the process into a GUI app - ; see http://code.google.com/p/clojure-contrib/issues/detail?id=32 - (require 'clojure.contrib.javadoc.browse-ui) - ((find-var 'clojure.contrib.javadoc.browse-ui/open-url-in-swing) url)) - -(defn browse-url [url] - (or (open-url-in-browser url) (when *open-url-script* (sh/sh *open-url-script* (str url)) true) (open-url-in-swing url))) diff --git a/modules/javadoc/src/main/clojure/clojure/contrib/javadoc/browse_ui.clj b/modules/javadoc/src/main/clojure/clojure/contrib/javadoc/browse_ui.clj deleted file mode 100644 index 388c76d5..00000000 --- a/modules/javadoc/src/main/clojure/clojure/contrib/javadoc/browse_ui.clj +++ /dev/null @@ -1,31 +0,0 @@ -;;; browse_ui.clj -- starts a swing web browser :-( - -; Copyright (c) Christophe Grand, December 2008. All rights reserved. -; The use and distribution terms for this software are covered by the -; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) -; which can be found in the file epl-v10.html at the root of this -; distribution. -; By using this software in any fashion, you are agreeing to be bound by -; the terms of this license. -; You must not remove this notice, or any other, from this software. - -(ns ^{:deprecated "1.2"} - clojure.contrib.javadoc.browse-ui) - -(defn open-url-in-swing - "Opens url (a string) in a Swing window." - [url] - (let [htmlpane (javax.swing.JEditorPane. url)] - (.setEditable htmlpane false) - (.addHyperlinkListener htmlpane - (proxy [javax.swing.event.HyperlinkListener] [] - (hyperlinkUpdate [^javax.swing.event.HyperlinkEvent e] - (when (= (.getEventType e) (. javax.swing.event.HyperlinkEvent$EventType ACTIVATED)) - (if (instance? javax.swing.text.html.HTMLFrameHyperlinkEvent e) - (-> htmlpane .getDocument (.processHTMLFrameHyperlinkEvent e)) - (.setPage htmlpane (.getURL e))))))) - (doto (javax.swing.JFrame.) - (.setContentPane (javax.swing.JScrollPane. htmlpane)) - (.setBounds 32 32 700 900) - (.show)))) - diff --git a/modules/repl-utils/pom.xml b/modules/repl-utils/pom.xml index 449d7677..1377caa2 100644 --- a/modules/repl-utils/pom.xml +++ b/modules/repl-utils/pom.xml @@ -14,11 +14,6 @@ <dependencies> <dependency> <groupId>org.clojure.contrib</groupId> - <artifactId>javadoc</artifactId> - <version>1.3.0-SNAPSHOT</version> - </dependency> - <dependency> - <groupId>org.clojure.contrib</groupId> <artifactId>seq</artifactId> <version>1.3.0-SNAPSHOT</version> </dependency> diff --git a/modules/repl-utils/src/main/clojure/clojure/contrib/repl_utils.clj b/modules/repl-utils/src/main/clojure/clojure/contrib/repl_utils.clj index fdb321a5..bc9787b5 100644 --- a/modules/repl-utils/src/main/clojure/clojure/contrib/repl_utils.clj +++ b/modules/repl-utils/src/main/clojure/clojure/contrib/repl_utils.clj @@ -20,7 +20,7 @@ (clojure.lang RT Compiler Compiler$C)) (:require [clojure.contrib.string :as s]) (:use [clojure.contrib.seq :only (indexed)] - [clojure.contrib.javadoc.browse :only (browse-url)])) + [clojure.java.browse :only (browse-url)])) ;; ---------------------------------------------------------------------- ;; Examine Java classes @@ -49,7 +49,6 @@ <module>modules/io</module> <module>modules/jar</module> <module>modules/java-utils</module> - <module>modules/javadoc</module> <module>modules/jmx</module> <module>modules/json</module> <module>modules/lazy-seqs</module> |