Not sure what you mean when you say 'see' your functions. I'm
assuming you are either talking about the REPL having the functions
loaded in the JVM that the REPL is talking to or being seen by the
completion engine.
1. Loading code into the JVM
When you start a project REPL, it uses the classpath defined by the
project and it's dependancies to start a remote JVM, creates a REPL
window within the Netbeans instances and connects to the remote JVM
via a socket. At that point only the default Clojure code is loaded
and no code from the project is loaded. You can highlight a set of
files, right-click and load them. I also plan on having the ability
to load all files at the Project level. That will be in the next
release:
https://www.assembla.com/spaces/enclojure/tickets/21-Be-able-to-load-ALL-files-within-a-project-into-a-running-repl-with-a-single-command-
When I start a project REPL I'm usually interested in working on some
code in a particular file or starting up a new file. I start the
REPL, open the file and load it. Clojure will find any dependancies
and load them as well. At that point, assuming there are no errors,
you have your code and functions loaded and they can be 'seen' within
the REPL (connected to the remote JVM where the code was actually
loaded).
There are several hotkeys for loading code in the REPL which you can
get to and see the bindings by right-clicking in an edit window of a
Clojure source file.
2. Completion Engine
The completion engine currently works with static analysis of source
by using the (ns ...) node of the current file open in the editor to
load the context for completion at the REPL. It will work just like
the code in the editor meaning that:
:use, :require, :refer and any aliases will work exactly as they code
in the source.
Consider:
(ns org.enclojure.ide.repl.repl-manager
(:use org.enclojure.repl.main)
(:require [org.enclojure.commons.c-slf4j :as logger]
[org.enclojure.commons.validation :as validation]
[org.enclojure.ide.repl.repl-data :as repl-data])
(:import (java.util.logging Logger Level)
(
java.io PipedOutputStream PipedInputStream LineNumberReader
InputStreamReader File)
(org.apache.commons.exec CommandLine ExecuteResultHandler
PumpStreamHandler DefaultExecutor ExecuteException
ExecuteWatchdog)))
Here all the symbols within the repl-manager file and
org.enclojure.repl.main will be available in the REPL for completion
with no qualification.
The namespaces in the :require are defined with aliases so they
require qualification...so for functions within
org.enclojure.commons.c-slf4j you would use:
logger/<func>
Also, any functions defined at the REPL prompt are 'visible'.
I was unable to reproduce any problems with 'in-ns.
You do have to be in front of the prompt in order to type anything in
the REPL. If you are behind it, there is no edit capability.
Let me know if this answers your questions.
Thanks,
Eric