franks42 / clj-ns-browser

Smalltalk-like namespace/class/var/function browser for clojure docs and source-code based on seesaw
Eclipse Public License 1.0
175 stars 11 forks source link

Categorization shows (nil) for some imported Java classes #15

Closed jafingerhut closed 12 years ago

jafingerhut commented 12 years ago

Example: Select namespace clojure.java.browse with categorization on, and vars-cbx with "imports" selected. Symbol URI is shown under category (nil) instead of java.lang.Class like most imported classes are.

This occurs because the symbol URI is in the ns-map of namespace clojure.java.browse, but it is not in the map of the current namespace ns when the function (clj-info.doc2map/get-docs-map 'URI) is called (which in turn calls (clj-info.doc2map/docs-map 'URI)) to look up the documentation for the class. Given that we can select multiple namespaces at once, and perhaps different namespaces could have different symbols 'URI mapping to different Java classes (TBD: possible? Test case?) it seems like we would need a way to pass the namespace in addition to the symbol to properly resolve these, and use (ns-resolve ) instead of (resolve ) in the docs-map implementation.

jafingerhut commented 12 years ago

Such classes also don't display documentation at all.

Even the Java classes that are under the category java.lang.Class have a poor way of displaying documentation. Try out "All" on doc-cbx and improve the code until that display looks reasonable.

franks42 commented 12 years ago

This issue may have been resolved (no pun intended) by the fix that uses fqname on the var/fq-classname... Please test and confirm... and hopefully just close this issue.

jafingerhut commented 12 years ago

Agreed that it looks better now. Nice. I'll create a separate issue for the poor display of All documentation (or just examples, see alsos, or comments) for Java classes.