This is very nice. Here are some suggestions on your install - problems I ran into.
> 1. Put `jde-completion.el' in a directory that is in your
> `load-path', e.g. your JDE source directory.
> 2. Make sure the directory `java' (containing the Java classes used
> internally) is in your CLASSPATH.
Specificly, ./jde/completion/*.class needs to be in the CLASSPATH.
> 3. Load `jde-completion' by evaluating "(require 'jde-completion)".
> (Put this into your .emacs to load jde-completion every time Emacs
> starts up.)
I needed to do this before jde was loaded, otherwise my .emacs boot sequence is toast.
> 4. I've had problems with the BeanShell if it had not been started
> prior to invocation of `bsh-eval'. If you get `End of file during
> parsing' errors, set jde::*bsh-ugly-workaround* to `t'.
>
> 5. test/Test.java is a non-functional Java class that you can use to
> test `jde-completion'. It lists several test cases for you to try
> out and explains what should happen if everything works properly.
David Lichteblau wrote:
>
> Recently I've watched a short presentation of JBuilder. One of the
> features demonstrated was a completion facility allowing dynamic
> completion of field and method names.
>
> So far I haven't investigated what exactly JBuilder can do, but having
> decided that Emacs needs something similar, I implemented a completion
> package based on JDE and BeanShell.
>
> It's available as a tarball containing the Elisp and Java sources:
> <URL:http://www.inf.fu-berlin.de/~lichtebl/jde-completion-0.1.tar.gz>
>
> Please send comments and suggestions to me. The package has not been
> tested extensively; I'd appreciate both bug reports and feature
> requests. If you think jde-completion is suited for inclusion into JDE
> or the ``Contributed Software'' section, feel free to add it to the
> distribution.
>
> -->8--------
> C-c SPC runs the command jde:complete
> which is an interactive Lisp function in `jde-completion'.
> (jde:complete)
>
> Complete Java field or method name before point using the minibuffer.
>
> Looks at the point to find an expression like `Class.name' and looks up
> all public methods and fields `Class' has. If there is only one such
> completion starting with `name', it is inserted into the buffer. If there
> are several possible completions, the user is asked to complete `name' in
> the minibuffer using `completing-read'.
>
> If `Class' is really a qualified class name like `my.pkg.Class', this
> qualified name is looked up. Otherwise the `import' declarations and the
> `package' declaration in the current buffer are examined and all
> possible class names are tried until one matches.
>
> Instead of a Class name, you can also use a variable name as in
> String str = ...;
> ...
> str.[X] <=== Point is here
> C-c SPC will then try to find `str''s declaration and look up
> its class. The declaration is searched for in the method and at the
> beginning of the class the point is in, so that both local variables
> and instance variables will be found. (Fields declared between methods
> will not be found currently.)
>
> As `jde:complete' uses Java (via the BeanShell) to look up method and
> field names, the classes providing these have to be compiled prior to
> its invocation. The class that is currently edited need not be compiled,
> however. (But completing anything related to the current class is not
> supported anyway and certainly won't work unless it was compiled. Using
> `this' is not supported.)
>
> Using `super' is supported and works by looking at the `extends' clause
> to find the superclass.
> -->8--------
--
Ben Groeneveld
@Work Technologies, Inc., 775 Lindsay Blvd., Idaho Falls, ID 83402
Mailto:[EMAIL PROTECTED], phone:208.529.2640, fax:208.522.4202