Ever since it was first bundled with the JDE, I have been unable to use
jde-completion's complete-at-point on either linux or sparc solaris
(using current releases of xemacs in both cases). As you can see in
the lisp backtrace at the end of this message, the completion attempt
chokes when emacs is asked to eval a variable "//" returned by the beanshell.
Working backwards with the backtrace (or is it forwards with the backtrace,
ha ha), I learned that the beanshell is unable to find the
jde.util.Completion class it needs to find appropriate methods. This
is reproducible by simply interactively feeding the same static method
invocation into the *bsh* buffer:
BeanShell 0.96 beta - by Pat Niemeyer ([EMAIL PROTECTED])
bsh % jde.util.Completion.getClassInfo("Vector");
// Error: bsh.EvalError: Class: jde.util.Completion not found in namespace : jde .util
.Completion .getClassInfo ( "Vector" )
bsh %
Aha! There's that nettlesome '//' that the jde complains about.
A workaround - adding jde.jar and bsh.jar to your CLASSPATH before launching
emacs seems to "fix" the problem.
This is admittedly half-baked - other jde packages (jde-wiz, for example)
work just fine with the beanshell, so I'm at a loss to explain what
specifically is broken in jde-completion.
This much is certain - whatever lisp routines evaluate beanshell output
probably should test for the "// Error: bsh.EvalError" message instead
of letting emacs cough up an obscure error about "//" being a void variable.
I'd be grateful for a more solid fix if anyone can produce one. Until then,
the classpath hack will have to do.
Eric
;;; backtrace from failed invocation of jde-complete-at-point
;;; with point where the 'X' is in the following
;;;
;;; Vector v = new Vector();
;;; v.aX
;;;
Signaling: (void-variable //)
eval(//)
(if (not (null result)) (eval (read result)) nil)
)
(let ((guessed ...) result) (if (stringp guessed) (setq result ...) (if ... ...)) (if
(not ...) (eval ...) nil))
)
jde-complete-get-classinfo("Vector")
(setq classinfo (jde-complete-get-classinfo vtype))
)
(progn (setq classinfo (jde-complete-get-classinfo vtype)) (setq fulllist
(jde-complete-build-completion-list classinfo)) (setq jde-complete-current-list
(jde-complete-find-all-completions ... fulllist)) (setq
jde-complete-current-list-index -1) (jde-complete-complete-cycle))
)
(if (not (null vtype)) (progn (setq classinfo ...) (setq fulllist ...) (setq
jde-complete-current-list ...) (setq jde-complete-current-list-index -1)
(jde-complete-complete-cycle)) (message (format "Can't find any declaration for `%s'!"
...)))
)
(progn (setq vtype (jde-parse-declared-type-of ...)) (if (not ...) (progn ... ...
... ... ...) (message ...)))
)
(if (not (null pair)) (progn (setq vtype ...) (if ... ... ...)) (message "No
completion at this point."))
)
(let* ((pair ...) vtype classinfo fulllist) (setq jde-complete-current-list nil) (if
(not ...) (progn ... ...) (message "No completion at this point.")))
)
(lambda nil "Smart-complete the method at point." (interactive) (if (and ... ... ...
... ... ... ... ...) (jde-complete-complete-cycle)) (let* (... vtype classinfo
fulllist) (setq jde-complete-current-list nil) (if ... ... ...)))()
call-interactively(jde-complete-at-point)
command-execute(jde-complete-at-point t)
execute-extended-command(nil)
call-interactively(execute-extended-command)