• Stars
    star
    176
  • Rank 216,987 (Top 5 %)
  • Language
    Clojure
  • License
    Eclipse Public Li...
  • Created over 12 years ago
  • Updated 10 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Smalltalk-like namespace/class/var/function browser for clojure docs and source-code based on seesaw

Clojure Namespace Browser (clj-ns-browser)

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"].

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.

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

  • Andy concocted a cool, new, button-row widget that allows for flexible display of var/class/namespace information.

  • syntax highlighting of source code thru use of rsyntaxtextarea

  • improved invocation of external browser

  • many invisible improvements

While the "old" features still work of course:

  • see the loaded and unloaded namespaces, and "require" with one-click

  • see the doc-string of a selected var/namespace plus optionally the clojuredocs' examples, comments and see alsos, as well as the source code.

  • seeing the list of vars/classes either as local names or as fully qualified ones.

  • select one or more namespaces and use a regex filter to display the var-list... even with optional searching/matching of the vars' doc-strings.

  • Predefined var/class-filters to see only macros/functions/protocols/multimethods/dynamic or deftypes/defrecords, or refers with and w/o clojure.core. - in addition you can still use a regex-filter on those results

  • adding a trace to a function with a simple button click and seeing the invocation information in your repl as the function is called - tools.trace is an underused gem of a tool!

  • (optional) color-coding based on the var-type: macros are red... functions are green.

  • optional download and caching of the most recent clojuredocs-repo copy with on/off-line clojuredocs-info retrieval through simple menu commands

  • see basic info about (java-)classes like their class-inheritance list and the set of implemented interfaces

  • see the type and values of vars and the type and value of the @var... with their associated meta-data.

  • see live-updates in realtime of new namespaces, new vars, and changed values... as they are defined by you at the repl or by your running program.

  • on top of all that, we also have demo videos where Andy walks you thru the browser's features one-by-one (Part 1 and Part 2)

Flexible Display of Var's Doc/Source/Value

Above the Documentation panel's text area, we have a (very cool) new row of buttons: Doc, Source, Examples, Comments, See alsos, and Value.

By clicking any of those buttons, the associated information is displayed about the selected symbol/var/class/namespace.

By Command/CTRL clicking, multiple button can be selected, and the info for all those buttons will be displayed.

Lastly, the buttons can be dragged to change the order in which the info is displayed in the text area.

![Var's flexible doc/source/value view thru Andy's concocted button-row widget!] (https://github.com/franks42/clj-ns-browser/raw/master/clj-ns-browser-source.png "Var's flexible doc/source/value view")

Install & Start-up

For any project where you want to add the ability to browse your currently loaded/unloaded namespaces for the available classes/vars/functions/macros/etc. with their docs/source/values, you should add clj-ns-browser to your :dev-dependencies list by adding to your project.clj:

    ;; Leiningen version 1
    :dev-dependencies [[clj-ns-browser "1.3.1"]]

    ;; Leiningen version 2
    :profiles {:dev {:dependencies [[clj-ns-browser "1.3.1"]]}}

Then fire-up your repl, refer to the sdoc macro in clj-ns-browser.sdoc, and start the browser with (sdoc):

$ lein deps  
$ lein repl  
user=> (use 'clj-ns-browser.sdoc)  
user=> (sdoc)  

... and the browser window should popup on your screen - very easy!

It should actually work from any repl - tested on MacOSX, Linux, even Windows... with Leiningen 1.7.1 & 2.0.0, repls, repl-y, emacs and Sublime Text 2.

Documentation, Usage, Issues, Futures...

Please take a look at the clj-ns-browser's wiki for detailed information about features, usage, and feedback: "https://github.com/franks42/clj-ns-browser/wiki" (a work in progress...)

Authors

  • franks42 (Frank Siebenlist)

  • jafingerhut (Andy Fingerhut)

Acknowledgment

Seesaw and its main author Dave Ray - fantastic tool and near real-time support on the mailing list!
(Seesaw turns the Horror of Swing into a friendly, well-documented, Clojure library: "https://github.com/daveray/seesaw")

All the open source libraries that the clj-ns-browser depends on, like: seesaw, clj-info, hiccup, clojure-complete, tools.namespace, tools.trace, cd-client, clojuredocs, swank-clojure, leiningen, lib.devlinsf.clip-utils....and all the libs they depend on, ... and clojure of course.

License

Copyright (C) 2013 - Frank Siebenlist and Andy Fingerhut

Distributed under the Eclipse Public License, the same as Clojure uses. See the file COPYING.

More Repositories

1

lein-repls

A persistent repl-server as a leiningen task/plugin "lein repls" and a lightweight shell-script client "cljsh".
Shell
29
star
2

cljs-uuid-utils

Micro lib with ClojureScript implementation of a random, type 4 UUID generator compatible with cljs.core/UUID
Clojure
20
star
3

cljs-info

Doc, apropos, source, all-ns, ns-map & friends for clojurescript
Clojure
13
star
4

naclj

Clojure library that abstracts libsodium's NaCl primitives (curve25519, ed25519, blake2b, box/unbox, sign/verify, etc.)
Clojure
10
star
5

2circlingBalls-lua

2circlingBalls-lua - Corona physics example of body:applyForce()
7
star
6

colors-rgb.lua

color-name to rgb mapping for Lua (Corona)
5
star
7

prudentTable-Lua

Lua module to facilitate a safer and more consistent working with standard lua-tables, table-sizes, nils, insert, remove, add, default values, permanent keys, constraints, iterators,etc.
Lua
4
star
8

SaveTheCheerleader-Lua

save the Corona World - persist/reinstate a physics world snapshot to/from json
Lua
4
star
9

clj-info

Enhanced clojure doc-info facility for use in REPL and beyond.
Clojure
4
star
10

CollectibleItems2.9FS

Butchered Collectible Items Lime tutorial example
3
star
11

kitjensink

Clojure project with a collection of "interesting" libraries
Clojure
2
star
12

NamedObjects

name-object registry - garbage-collection friendly and Corona display-object aware
2
star
13

SenjaTouch

clojurized sencha
1
star
14

coronaUtils

1
star
15

clj-conform

Set of predicate functions to validate conformance of the identifiers used in symbols/keywords to the spec at "http://clojure.org/reader".
Clojure
1
star
16

HashPrice

iOS app that provides information about the Provenance Blockchain Utility Token Hash' exchange rate.
Swift
1
star
17

clj-growlnotify

Clojure interface to the "growlnotify" command line tool to post growl notifications
Clojure
1
star