Appengine-magic in eclipse

20 views
Skip to first unread message

Chris Wilson

unread,
Apr 8, 2011, 7:29:16 AM4/8/11
to Clojure Web Development
Hi,

I don't know if this is something to post here or in the ccw list, but
I'm having a problem getting appengine-magic running in eclipse. It
doesn't seem to be processing the instruction:

(if (in-appengine-interactive-mode?)
(load "core_local")
(load "core_google"))

in the core file - therefore the start methods etc are not available
on the repl. Anyone here dealt with this problem? If not, has anyone
got any suggestions - or do people think its something for the ccw
list?

Cheers,

Chris

Constantine Vetoshev

unread,
Apr 8, 2011, 12:32:37 PM4/8/11
to clojure...@googlegroups.com
On Fri, Apr 8, 2011 at 4:29 AM, Chris Wilson <ch...@cjetech.co.uk> wrote:
> in the core file - therefore the start methods etc are not available
> on the repl.  Anyone here dealt with this problem?  If not, has anyone
> got any suggestions - or do people think its something for the ccw
> list?

I think you might be the first Eclipse CCW appengine-magic user,
congratulations. :)

The appengine-magic.core/in-appengine-interactive-mode? function does
not detect CCW correctly. It's unfortunate that this detection needs
to be explicitly coded for every development environment, but I can't
think of any cleaner solution.

From inside the CCW REPL, could you run this form

(clojure.pprint/pprint (seq (.getStackTrace (Thread/currentThread))))

and send me the result? With luck, the stack trace will give me a clue
about detecting Eclipse or CCW.

Chris Wilson

unread,
Apr 8, 2011, 12:42:05 PM4/8/11
to clojure...@googlegroups.com
The appengine-magic.core/in-appengine-interactive-mode? function
returns true (as the stacktrace contains clojure.main$repl) - I assume
that's correct?

Chris

Chris Wilson

unread,
Apr 8, 2011, 12:54:18 PM4/8/11
to clojure...@googlegroups.com
But here is the stack trace incase I'm misunderstanding:

(#<StackTraceElement java.lang.Thread.getStackTrace(Thread.java:1452)>
#<StackTraceElement user$eval2421.invoke(NO_SOURCE_FILE:1)>
#<StackTraceElement clojure.lang.Compiler.eval(Compiler.java:5424)>
#<StackTraceElement clojure.lang.Compiler.eval(Compiler.java:5391)>
#<StackTraceElement clojure.core$eval.invoke(core.clj:2382)>
#<StackTraceElement
clojure.main$repl$read_eval_print__5624.invoke(main.clj:183)>
#<StackTraceElement clojure.main$repl$fn__5629.invoke(main.clj:204)>
#<StackTraceElement clojure.main$repl.doInvoke(main.clj:204)>
#<StackTraceElement clojure.lang.RestFn.invoke(RestFn.java:702)>
#<StackTraceElement clojure.tools.nrepl$handle_request.invoke(nrepl.clj:272)>
#<StackTraceElement clojure.lang.Var.invoke(Var.java:373)>
#<StackTraceElement
clojure.tools.nrepl$message_dispatch$fn__199$fn__202.invoke(nrepl.clj:336)>
#<StackTraceElement clojure.lang.AFn.call(AFn.java:18)>
#<StackTraceElement
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)>
#<StackTraceElement java.util.concurrent.FutureTask.run(FutureTask.java:166)>
#<StackTraceElement
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)>
#<StackTraceElement
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)>
#<StackTraceElement java.lang.Thread.run(Thread.java:636)>)

Chris

Reply all
Reply to author
Forward
0 new messages