I have made some more tests and this is what i have found:
Two possible bugs:
1: If you have a package-folder starting from root code-completion doesn't work in Jde
2.2.2 but it does work in Jde 2.2.1
2: If a variable name is the same as the Classname but with initial small letter then
code-completion doesn't work in Jde 2.2.2 but it does work in Jde 2.2.1 ( Car car =
new Car() ; )
Steps to produce the errors (at least for me on my machine, Win2000)
Possible bug 1)
I have a folder named tmp
If this folder is placed directly on D:/ (that is the path will be D:/tmp )
Code-completion fails in Jde 2.2.2 but works in Jde 2.2.1
If this folder is placed in some subfolder to D:/ (that is the path will be for
example D:/test/tmp ) Code-completion
works in Jde 2.2.2
I have four files in the folder: prj.el, Test1.java, Test2.java, Test1.class
*** Test1.java ***
// File: Test1.java
package tmp ;
public class Test1
{
int nr = 0 ;
public int getNr()
{
return nr ;
}
}
*** Test2.java ***
// File: Test2.java
package tmp ;
public class Test2
{
public static void main (String[] args)
{
Test1 testobj = new Test1() ;
testobj. // Here i try to use C-c C-v C-.
System.out.println( testobj.getNr() ) ;
} // end of main ()
}
*** prj.el ***
(jde-set-project-name "default")
(jde-set-variables
'(jde-run-classic-mode-vm nil)
; '(jde-global-classpath (quote ("../")) t) also tried this setting didn't make any
difference
'(jde-global-classpath (quote ("d:/")) t))
I Start emacs
Open the file d:/tmp/Test2.java
Try to do Code-completion in the place marked above
This produces the error in Jde 2.2.2 (if the tmp folder is moved to d:/test and the
classpath changed accordingly then it works again)
****** Backtrace-buffer, Message-buffer, bsh-buffer *************
*** Backtrace ***
Signaling: (error "No reply from BeanShell")
signal(error ("No reply from BeanShell"))
error("No reply from BeanShell")
(if (not (accept-process-output bsh-process bsh-eval-timeout 100)) (error "No reply
from BeanShell"))
(progn (setq bsh-tq-reply nil) (set-process-filter bsh-process (quote
bsh-eval-filter)) (process-send-string bsh-process (concat expr "\n")) (if (not ...)
(error "No reply from BeanShell")) (set-process-filter bsh-process comint-filter) (if
(string-match "// Error:" bsh-tq-reply) (progn ... ...)) (if eval-return (if
bsh-tq-reply ... ...) bsh-tq-reply))
(if bsh-process (progn (setq bsh-tq-reply nil) (set-process-filter bsh-process ...)
(process-send-string bsh-process ...) (if ... ...) (set-process-filter bsh-process
comint-filter) (if ... ...) (if eval-return ... bsh-tq-reply)))
(when bsh-process (setq bsh-tq-reply nil) (set-process-filter bsh-process (quote
bsh-eval-filter)) (process-send-string bsh-process (concat expr "\n")) (if (not ...)
(error "No reply from BeanShell")) (set-process-filter bsh-process comint-filter) (if
(string-match "// Error:" bsh-tq-reply) (progn ... ...)) (if eval-return (if
bsh-tq-reply ... ...) bsh-tq-reply))
(let* ((bsh-process ...) (comint-filter ...)) (when bsh-process (setq bsh-tq-reply
nil) (set-process-filter bsh-process ...) (process-send-string bsh-process ...) (if
... ...) (set-process-filter bsh-process comint-filter) (if ... ...) (if eval-return
... bsh-tq-reply)))
bsh-eval("jde.util.JdeUtilities.classExists(\"testobj\");" t)
bsh-eval-r("jde.util.JdeUtilities.classExists(\"testobj\");")
jde-complete-class-exists("testobj")
(if (jde-complete-class-exists name) name (let (... shortname fullname tmp result)
(while ... ... ... ... ...) result))
jde-complete-get-qualified-name("testobj")
(setq qualified-name (jde-complete-get-qualified-name expr))
(cond ((string= "this" expr) (jde-complete-get-qualified-name ...)) ((string=
"super" expr) (throw ... ...)) ((setq qualified-name ...) qualified-name) (t (let ...
...)))
jde-complete-eval-type-of("testobj")
(let ((type ...)) (if type (if ... ... ...)))
jde-complete-find-completion-for-pair(("testobj" ""))
(let* ((pair ...) completion-list) (if (string= ... "") (progn ... ... ... ...)) (if
(null pair) (progn ... ... ... ...)) (jde-complete-find-completion-for-pair pair)
(setq completion-list jde-complete-current-list) (if completion-list (if jde-xemacsp
... ...) (message "No completion at this point.")))
jde-complete-at-point-menu()
* call-interactively(jde-complete-at-point-menu)
*** Messages ***
For information about the GNU Project and its goals, type C-h C-p.
Loading d:/tmp/prj.el (source)...
Loading d:/tmp/prj.el (source)...done
Fontifying Test2.java...
Fontifying Test2.java... (regexps.............)
Loading d:/tmp/prj.el (source)...done
Fontifying *scratch*...
Fontifying *scratch*... (regexps............)
Loading d:/tmp/prj.el (source)...done
Starting the BeanShell. Please wait...
Loading debug...
Loading debug...done
Entering debugger...
[2 times]
Mark set
Region saved
*** bsh ***
cd d:/tmp/
javaw -classpath d:/Andreas Dokument/- (Studier)/- Studier
Datalogi/extra/packages/jde-2.2.2/java/bsh-commands;d:/Andreas Dokument/- (Studier)/-
Studier Datalogi/extra/packages/jde-2.2.2/java/lib/jde.jar;d:/Andreas Dokument/-
(Studier)/- Studier Datalogi/extra/packages/jde-2.2.2/java/lib/bsh.jar;d:/
bsh.Interpreter
BeanShell 1.0 beta - by Pat Niemeyer ([EMAIL PROTECTED])
bsh %
Process bsh exited abnormally with code 1
Possible bug 2)
I have a class named "Car"
I have a class named "Main"
In main I have a variable named "car"
Trying to do Code-completion on "car" doesn't work in Jde 2.2.2 but it works in Jde
2.2.1
Renaming the variable to "ocar" Code-completion works again :)
****** Backtrace-buffer, Message-buffer, bsh-buffer *************
*** Backtrace ***
Signaling: (error "Beanshell eval error. See messages buffer for details.")
signal(error ("Beanshell eval error. See messages buffer for details."))
error("Beanshell eval error. See messages buffer for details.")
(progn (message "Beanshell expression evaluation error.\n Expression: %s\n Error:
%s" expr bsh-tq-reply) (error "Beanshell eval error. See messages buffer for
details."))
(if (string-match "// Error:" bsh-tq-reply) (progn (message "Beanshell expression
evaluation error.\n Expression: %s\n Error: %s" expr bsh-tq-reply) (error "Beanshell
eval error. See messages buffer for details.")))
(progn (setq bsh-tq-reply nil) (set-process-filter bsh-process (quote
bsh-eval-filter)) (process-send-string bsh-process (concat expr "\n")) (if (not ...)
(error "No reply from BeanShell")) (set-process-filter bsh-process comint-filter) (if
(string-match "// Error:" bsh-tq-reply) (progn ... ...)) (if eval-return (if
bsh-tq-reply ... ...) bsh-tq-reply))
(if bsh-process (progn (setq bsh-tq-reply nil) (set-process-filter bsh-process ...)
(process-send-string bsh-process ...) (if ... ...) (set-process-filter bsh-process
comint-filter) (if ... ...) (if eval-return ... bsh-tq-reply)))
(when bsh-process (setq bsh-tq-reply nil) (set-process-filter bsh-process (quote
bsh-eval-filter)) (process-send-string bsh-process (concat expr "\n")) (if (not ...)
(error "No reply from BeanShell")) (set-process-filter bsh-process comint-filter) (if
(string-match "// Error:" bsh-tq-reply) (progn ... ...)) (if eval-return (if
bsh-tq-reply ... ...) bsh-tq-reply))
(let* ((bsh-process ...) (comint-filter ...)) (when bsh-process (setq bsh-tq-reply
nil) (set-process-filter bsh-process ...) (process-send-string bsh-process ...) (if
... ...) (set-process-filter bsh-process comint-filter) (if ... ...) (if eval-return
... bsh-tq-reply)))
bsh-eval(#("jde.util.JdeUtilities.classExists(\"packageA.car\");" 0 35 nil 35 43
(face font-lock-constant-face) 43 50 nil) t)
bsh-eval-r(#("jde.util.JdeUtilities.classExists(\"packageA.car\");" 0 35 nil 35 43
(face font-lock-constant-face) 43 50 nil))
jde-complete-class-exists(#("packageA.car" 0 8 (face font-lock-constant-face) 8 12
nil))
(and (string= "*" shortname) (jde-complete-class-exists fullname))
(cond ((and ... ...) (setq result fullname)) ((string= name shortname) (setq result
fullname)) (t (setq importlist ...)))
(while (and importlist (null result)) (setq tmp (car importlist)) (setq shortname
(car ...)) (setq fullname (concat ... name)) (cond (... ...) (... ...) (t ...)))
(let ((importlist ...) shortname fullname tmp result) (while (and importlist ...)
(setq tmp ...) (setq shortname ...) (setq fullname ...) (cond ... ... ...)) result)
(if (jde-complete-class-exists name) name (let (... shortname fullname tmp result)
(while ... ... ... ... ...) result))
jde-complete-get-qualified-name("car")
(setq qualified-name (jde-complete-get-qualified-name expr))
(cond ((string= "this" expr) (jde-complete-get-qualified-name ...)) ((string=
"super" expr) (throw ... ...)) ((setq qualified-name ...) qualified-name) (t (let ...
...)))
jde-complete-eval-type-of("car")
(let ((type ...)) (if type (if ... ... ...)))
jde-complete-find-completion-for-pair(("car" ""))
(let* ((pair ...) completion-list) (if (string= ... "") (progn ... ... ... ...)) (if
(null pair) (progn ... ... ... ...)) (jde-complete-find-completion-for-pair pair)
(setq completion-list jde-complete-current-list) (if completion-list (if jde-xemacsp
... ...) (message "No completion at this point.")))
jde-complete-at-point-menu()
* call-interactively(jde-complete-at-point-menu)
*** Messages ***
For information about the GNU Project and its goals, type C-h C-p.
Loading d:/DBC/test_proj/src/packageA/prj.el (source)...
Loading d:/DBC/test_proj/src/packageA/prj.el (source)...done
Fontifying Main.java...
Fontifying Main.java... (regexps.............)
Loading d:/DBC/test_proj/src/packageA/prj.el (source)...done
Fontifying *scratch*...
Fontifying *scratch*... (regexps............)
Loading d:/DBC/test_proj/src/packageA/prj.el (source)...done
Starting the BeanShell. Please wait...
Mark set
Beanshell expression evaluation error.
Expression: jde.util.JdeUtilities.classExists("packageA.car");
Error: // Error: // Uncaught Exception: java.lang.NoClassDefFoundError: packageA/car
(wrong name: packageA/Car)
Loading debug...
Loading debug...done
Entering debugger...
[2 times]
Mark set [2 times]
Region saved
*** bsh ***
cd d:/DBC/test_proj/src/packageA/
javaw -classpath d:/Andreas Dokument/- (Studier)/- Studier
Datalogi/extra/packages/jde-2.2.2/java/bsh-commands;d:/Andreas Dokument/- (Studier)/-
Studier Datalogi/extra/packages/jde-2.2.2/java/lib/jde.jar;d:/Andreas Dokument/-
(Studier)/- Studier
Datalogi/extra/packages/jde-2.2.2/java/lib/bsh.jar;../../Classes;../../Classes/classes.jar
bsh.Interpreter
BeanShell 1.0 beta - by Pat Niemeyer ([EMAIL PROTECTED])
bsh %
*** .emacs ***
;; This file is a minimal start file for emacs, it is used for debugging.
;; Time-stamp: <2000-08-09 13:15:32 andreas>
(setq debug-on-error t) ;will be cleared at end of buffer
(setq load-path
(nconc
'(
"~/extra/packages/jde-2.2.2/lisp"
"~/extra/packages/speedbar"
"~/extra/packages/semantic"
"~/extra/packages/oo-browser"
"~/extra/packages/oo-browser/hypb"
"~/extra/w3/lisp"
"~/extra/packages"
"~/extra/packages/_testing"
"~/extra/lispmodified"
"~/extra/packages/elib-1.0"
"~/extra/packages/pcl-cvs-2.9.9"
"~/extra/packages/records"
"~/extra/packages/jde-jcb-0.03"
)
load-path))
(require 'gnuserv)
(gnuserv-start)
(setq gnuserv-frame (selected-frame))
(require 'jde)
(custom-set-variables
'(show-paren-style (quote parenthesis))
'(recentf-save-file "d:/Andreas Dokument/- (Studier)/- Studier
Datalogi/.backups/.recentf")
'(show-paren-mode t nil (paren))
'(recentf-mode t nil (recentf))
'(pc-selection-mode t nil (pc-select)))
(custom-set-faces)
;(setq debug-on-error nil)
**************
/ Andreas Wieweg