This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-04-08
Channels
- # bangalore-clj (4)
- # beginners (160)
- # calva (132)
- # cider (18)
- # clara (1)
- # cljsrn (2)
- # clojure (129)
- # clojure-boston (1)
- # clojure-europe (5)
- # clojure-italy (5)
- # clojure-losangeles (1)
- # clojure-nl (33)
- # clojure-uk (49)
- # clojurescript (88)
- # cursive (20)
- # datomic (5)
- # duct (3)
- # fulcro (33)
- # graphql (7)
- # jobs (3)
- # kaocha (3)
- # nrepl (41)
- # off-topic (58)
- # pathom (18)
- # re-frame (1)
- # reagent (5)
- # shadow-cljs (148)
- # spacemacs (7)
- # tools-deps (7)
dealing with serious Java interop for the first time.. is there any way to get info about class constructors etc.?
reflect
may be useful; see https://stackoverflow.com/questions/5821286/how-can-i-get-the-methods-of-a-java-class-from-clojure
I sometimes use something like this:
(->> (clojure.reflect/reflect "") :members (sort-by :name) (clojure.pprint/print-table [:name :flags :parameter-types :return-type]))
eg. when cursor is in
(java.awt.Dimension. )
I'd like the minibuffer to show something like
java.awt.Dimension.: ([] [^int width ^int height] [^java.awt.Dimension d])
currently having to switch back and forth between the online documentation, I'm surprised this doesn't exist in some way
eg. when cursor is in
(java.awt.Dimension. )
I'd like the minibuffer to show something like
java.awt.Dimension.: ([] [^int width ^int height] [^java.awt.Dimension d])
@qythium You can also inspect the class, it will list the constructors and methods
@bozhidar @cichli I become progressively more annoyed with how the recent changes to printing/recentering in the REPL buffer behave. My scroll-conservatively
is set to 101
by the way. Are you sure this feature is properly baked? I would rather opt out of this, to be honest.
Look how after the pause the cursor will not to scroll the new output. This happens if the first output moves the previous prompt precisely to the beginning of the screen.
Yeah I realise I can inspect everything via reflection, the question was more about the editor integration
eg. Cider already shows variadic class method arglists using Eldoc, so extending that to constructors shouldn't be that much of a stretch?
@alexyakushev I haven’t tested the fallback to the old behaviour to be honest, so I can’t really say. For me the new default always worked reasonably well.
I’d suggest filing a ticket for this, as I’m pretty busy this week, so I won’t be able to debug this soon.
> eg. Cider already shows variadic class method arglists using Eldoc, so extending that to constructors shouldn’t be that much of a stretch?
> I’d suggest filing a ticket for this, as I’m pretty busy this week, so I won’t be able to debug this soon. It just seems to me that problems like this one, and the one I had before, are ducttape-patched, so they will keep on showing.