[英]Evaluation in Clojure REPL with CounterClockwise and Eclipse
I normally use Emacs but was inspired to try CCW + Eclipse again. 我通常使用Emacs但受到启发再次尝试CCW + Eclipse。 I have a Clojure test project with a source file src/user.clj with the following contents:
我有一个带有源文件src / user.clj的Clojure测试项目,其中包含以下内容:
(ns user)
(println "hi")
I have a REPL which I started with Window->Show View->Other->Clojure Views->REPL. 我有一个REPL,我开始使用Window-> Show View-> Other-> Clojure Views-> REPL。
When I select the println expression (all of '(println "hi")') and hit Command-enter, the expression itself gets echoed in the REPL window, but no output occurs. 当我选择println表达式(全部为'(println“hi”)')并按下Command-enter时,表达式本身会在REPL窗口中回显,但不会发生输出。 Similar with expressions like '(take 10 (range))'.
与'(取10(范围))'等表达式相似。
If I type the expression in the REPL directly, and hit Enter, I get 如果我直接在REPL中键入表达式,然后按Enter,我就会得到
=> (take 10 (range))
but there doesn't seem to be any additional output of the evaluation. 但似乎没有任何额外的评估结果。
Thanks for any ideas. 谢谢你的任何想法。 I looked over the docs but nothing obvious jumped out at me.
我查看了文档,但没有任何明显的东西跳出来。
You need to be connected to a REPL to get a response. 您需要连接到REPL才能获得响应。
There are two options: 有两种选择:
To connect to an existing REPL, you can use Window -> Connect to REPL. 要连接到现有REPL,可以使用Window - > Connect to REPL。
To run your project, Right click your project; 要运行项目,请右键单击您的项目; Run As -> Clojure Application.
运行方式 - > Clojure应用程序。 If that's not an option, Right Click -> Configure -> As Clojure Application
如果这不是一个选项,请右键单击 - >配置 - >作为Clojure应用程序
Sounds like your REPL is disconnected - it needs to be connected to a running Clojure process in order for you to interact with the live environment. 听起来您的REPL已断开连接 - 它需要连接到正在运行的Clojure流程才能与实时环境进行交互。
I usually just launch a REPL and load the file simultaneously by pressing Ctrl-Alt-L
in the code editor window. 我通常只需在代码编辑器窗口中按
Ctrl-Alt-L
启动REPL并同时加载文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.